zoukankan      html  css  js  c++  java
  • beetle1.1性能测试报告

    这是针对beetle1.1进行的性能测试结果,其性能会比1.0有接近15%的提高,分别针对单一对象请求应答和列表对象请求应答来进行一个性能对比。

    单一对象结构:

            class User : IMessage
            {
                public string Name;
                public string EMail;
                public string City;
                public string Counrty;
                public void Save(BufferWriter writer)
                {
                    writer.Write(Name);
                    writer.Write(EMail);
                    writer.Write(City);
                    writer.Write(Counrty);
                }
                public void Load(BufferReader reader)
                {
                    Name = reader.ReadString();
                    EMail = reader.ReadString();
                    City = reader.ReadString();
                    Counrty = reader.ReadString();
                }
            }

    列表对象结构:

            class Order : Beetle.IMessage
            {
                public int OrderID;
                public string CustomerID;
                public int EmployeeID;
                public long OrderDate;
                public long RequiredDate;
                public string ShipName;
                public string ShipAddress;
                public string ShipCity;
                public string ShipRegion;
                public string ShipPostalCode;
                public string ShipCountry;
                public void Save(BufferWriter writer)
                {
                    writer.Write(OrderID);
                    writer.Write(CustomerID);
                    writer.Write(EmployeeID);
                    writer.Write(OrderDate);
                    writer.Write(RequiredDate);
                    writer.Write(ShipName);
                    writer.Write(ShipAddress);
                    writer.Write(ShipCity);
                    writer.Write(ShipRegion);
                    writer.Write(ShipPostalCode);
                    writer.Write(ShipCountry);
                }
                public void Load(BufferReader reader)
                {
                    OrderID = reader.ReadInt32();
                    CustomerID = reader.ReadString();
                    EmployeeID = reader.ReadInt32();
                    OrderDate = reader.ReadInt64();
                    RequiredDate = reader.ReadInt64();
                    ShipName = reader.ReadString();
                    ShipAddress = reader.ReadString();
                    ShipCity = reader.ReadString();
                    ShipRegion = reader.ReadString();
                    ShipPostalCode = reader.ReadString();
                    ShipCountry = reader.ReadString();
                }
            }
                    Response response = new Response();
                    for (int i = 0; i < 5; i++)
                    {
                        Order order = new Order();
                        order.OrderID = 10248;
                        order.CustomerID = "WILMK";
                        order.EmployeeID = 5;
                        order.OrderDate = 629720352000000000;
                        order.RequiredDate = 629744544000000000;
                        order.ShipAddress = "59 rue de l'Abbaye";
                        order.ShipCity = "Reims";
                        order.ShipCountry = "France";
                        order.ShipName = "Vins et alcools Chevalier";
                        order.ShipPostalCode = "51100";
                        order.ShipRegion = "RJ";
                        response.Orders.Add(order);
                    }
                    adapter.Send(response);

    测试结果:

    http://beetle.henryfan.net

    访问Beetlex的Github
  • 相关阅读:
    使用蓝图构建Flask项目目录
    python上下文管理器细读
    【LiteOS】STM32F103-LiteOS移植教程(详细篇)
    OSX 下 sftp 上传目录到服务器
    Homestead window10 storage:link 不能建立符号链接的处理办法
    Laravel Carbon 简明使用
    VMWare 虚拟机挂载 Homestead NFS 进行老项目(基于 Brophp)维护
    winnfsd 操作
    windows10 查看进程端口的情况
    NFS各个版本之间的比较
  • 原文地址:https://www.cnblogs.com/smark/p/2387219.html
Copyright © 2011-2022 走看看