lith před 4 roky
rodič
revize
59961685ba
21 změnil soubory, kde provedl 1318 přidání a 63 odebrání
  1. 15 12
      dotnet/Doc/Publish/echo qps.md
  2. 2 2
      dotnet/Doc/Publish/pack SersDocker.bat
  3. 0 24
      dotnet/Doc/Publish/publish sers单体压测(net6.0).bat
  4. 0 24
      dotnet/Doc/Publish/publish sers单体压测(netcoreapp2.1).bat
  5. 13 0
      dotnet/Doc/Publish/publish sers压测-分布式压测(net6.0).bat
  6. 13 0
      dotnet/Doc/Publish/publish sers压测-分布式压测(netcoreapp2.1).bat
  7. 24 0
      dotnet/Doc/Publish/publish sers压测-单体压测(net6.0).bat
  8. 24 0
      dotnet/Doc/Publish/publish sers压测-单体压测(netcoreapp2.1).bat
  9. 0 0
      dotnet/Doc/PublishFile/Sers压测/分布式压测/01 ServiceCenter.bat
  10. 0 0
      dotnet/Doc/PublishFile/Sers压测/分布式压测/01 start 4580.bat
  11. 8 0
      dotnet/Doc/PublishFile/Sers压测/分布式压测/04 Demo.bat
  12. 8 0
      dotnet/Doc/PublishFile/Sers压测/分布式压测/05 Robot.bat
  13. 380 0
      dotnet/Doc/PublishFile/Sers压测/分布式压测/Demo/appsettings.json
  14. 0 0
      dotnet/Doc/PublishFile/Sers压测/分布式压测/Robot/Data/App.Robot.json
  15. 206 0
      dotnet/Doc/PublishFile/Sers压测/分布式压测/Robot/appsettings.json
  16. 566 0
      dotnet/Doc/PublishFile/Sers压测/分布式压测/ServiceCenter/appsettings.json
  17. 8 0
      dotnet/Doc/PublishFile/Sers压测/单体压测/01 ServiceCenter.bat
  18. 6 0
      dotnet/Doc/PublishFile/Sers压测/单体压测/01 start 4580.bat
  19. 44 0
      dotnet/Doc/PublishFile/Sers压测/单体压测/ServiceCenter/Data/App.Robot.json
  20. 0 0
      dotnet/Doc/PublishFile/Sers压测/单体压测/ServiceCenter/appsettings.json
  21. 1 1
      删除发布文件.bat

+ 15 - 12
dotnet/Doc/Publish/echo qps.md

@@ -19,30 +19,33 @@ for i in {1..100}; do curl -s -H "Cookie: user=admin_123456" http://localhost:45
 
 
 
+dotnet /root/app/ServiceCenter/App.ServiceCenter.dll 
 
- dotnet /root/app/ServiceCenter/App.ServiceCenter.dll
- 
+http://127.0.0.1:4580/_gover_/index.html?user=admin_123456
 
- http://lanxing.cloud:4580/_gover_/index.html?user=admin_123456
 
 
 
- # qps: 150万	workThread: 16	requestThread: 16 
+#----------------------------------------------
+# sers单体压测(net6.0)
 
- # qps:		workThread: 24	requestThread: 24 
+CentOs8(2x24核) .net6
 
 
-方式 线程数(处理/请求)     qps
-workThread/requestThread qps
+方式 线程数(处理/请求)	qps(cpu利用率)
+type workThread/requestThread	qps(cpu利用率)
 
-CentOs8(2x24核) .net6
 
 ApiClientAsync 16/16	140-150万(15%)   
-ApiClientAsync 24/24	160-180万(21%)   
 
-   
-ApiClientAsync 22/22	160-190万(19%)	 
+ApiClientAsync 18/18	150-180万(18%) 
 
 ApiClientAsync 20/20	160-230万(18%)
+   
+ApiClientAsync 22/22	160-190万(19%)	
+
+ApiClientAsync 24/24	160-180万(21%)   
+
+
+
 
-ApiClientAsync 18/18	150-180万(18%)

+ 2 - 2
dotnet/Doc/Publish/pack SersDocker.bat

@@ -18,8 +18,8 @@ xcopy  "SersPublish\%netVersion%\Robot\appsettings.json" "SersDocker\docker
 xcopy  "SersPublish\%netVersion%\Robot" "SersDocker\docker齡鱗쓸獗Sers\sers-demo-robot\root\app\Robot" /e /i /r /y
 
 @echo "copy sers-demo-sersall"
-xcopy  "Sers데竟箕꿎\%netVersion%\ServiceCenter\appsettings.json" "SersDocker\docker꼬憾Sers\sers-demo-sersall" 
-xcopy  "Sers데竟箕꿎\%netVersion%\ServiceCenter" "SersDocker\docker齡鱗쓸獗Sers\sers-demo-sersall\root\app\ServiceCenter" /e /i /r /y
+xcopy  "Sers箕꿎\sers箕꿎-데竟箕꿎%netVersion%\ServiceCenter\appsettings.json" "SersDocker\docker꼬憾Sers\sers-demo-sersall" 
+xcopy  "Sers箕꿎\sers箕꿎-데竟箕꿎%netVersion%\ServiceCenter" "SersDocker\docker齡鱗쓸獗Sers\sers-demo-sersall\root\app\ServiceCenter" /e /i /r /y
 
 
 

+ 0 - 24
dotnet/Doc/Publish/publish sers单体压测(net6.0).bat

@@ -1,24 +0,0 @@
-
-set netVersion=net6.0
-
-
-
-@echo "copy  ServiceCenter"
-xcopy  "SersPublish\%netVersion%\ServiceCenter" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /e /i /r /y
-
-@echo "copy demo"
-xcopy  "SersPublish\%netVersion%\Demo\wwwroot" "Sers데竟箕꿎\%netVersion%\ServiceCenter\wwwroot" /e /i /r /y
-xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.dll" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.pdb" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.xml" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-
-
-@echo "copy  xml of Robot"
-xcopy  "SersPublish\%netVersion%\Robot\wwwroot" "Sers데竟箕꿎\%netVersion%\ServiceCenter\wwwroot" /e /i /r /y
-xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.dll" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.pdb" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.xml" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-
-
-@echo "copy PublishFile"
-xcopy  "..\PublishFile\Sers데竟箕꿎" "Sers데竟箕꿎\%netVersion%" /e /i /r /y

+ 0 - 24
dotnet/Doc/Publish/publish sers单体压测(netcoreapp2.1).bat

@@ -1,24 +0,0 @@
-
-set netVersion=netcoreapp2.1
-
-
-
-@echo "copy  ServiceCenter"
-xcopy  "SersPublish\%netVersion%\ServiceCenter" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /e /i /r /y
-
-@echo "copy demo"
-xcopy  "SersPublish\%netVersion%\Demo\wwwroot" "Sers데竟箕꿎\%netVersion%\ServiceCenter\wwwroot" /e /i /r /y
-xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.dll" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.pdb" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.xml" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-
-
-@echo "copy  xml of Robot"
-xcopy  "SersPublish\%netVersion%\Robot\wwwroot" "Sers데竟箕꿎\%netVersion%\ServiceCenter\wwwroot" /e /i /r /y
-xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.dll" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.pdb" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.xml" "Sers데竟箕꿎\%netVersion%\ServiceCenter" /i /r /y
-
-
-@echo "copy PublishFile"
-xcopy  "..\PublishFile\Sers데竟箕꿎" "Sers데竟箕꿎\%netVersion%" /e /i /r /y

+ 13 - 0
dotnet/Doc/Publish/publish sers压测-分布式压测(net6.0).bat

@@ -0,0 +1,13 @@
+
+set netVersion=net6.0
+set basePath=Sers压测\sers压测-分布式压测%netVersion%
+
+
+@echo "copy  station"
+xcopy  "SersPublish\%netVersion%\ServiceCenter" "%basePath%\ServiceCenter" /e /i /r /y
+xcopy  "SersPublish\%netVersion%\Demo" "%basePath%\Demo" /e /i /r /y
+xcopy  "SersPublish\%netVersion%\Robot" "%basePath%\Robot" /e /i /r /y
+
+
+@echo "copy PublishFile"
+xcopy  "..\PublishFile\Sers压测\分布式压测" "%basePath%" /e /i /r /y

+ 13 - 0
dotnet/Doc/Publish/publish sers压测-分布式压测(netcoreapp2.1).bat

@@ -0,0 +1,13 @@
+
+set netVersion=netcoreapp2.1
+set basePath=Sers压测\sers压测-分布式压测%netVersion%
+
+
+@echo "copy  station"
+xcopy  "SersPublish\%netVersion%\ServiceCenter" "%basePath%\ServiceCenter" /e /i /r /y
+xcopy  "SersPublish\%netVersion%\Demo" "%basePath%\Demo" /e /i /r /y
+xcopy  "SersPublish\%netVersion%\Robot" "%basePath%\Robot" /e /i /r /y
+
+
+@echo "copy PublishFile"
+xcopy  "..\PublishFile\Sers压测\分布式压测" "%basePath%" /e /i /r /y

+ 24 - 0
dotnet/Doc/Publish/publish sers压测-单体压测(net6.0).bat

@@ -0,0 +1,24 @@
+
+set netVersion=net6.0
+set basePath=Sers箕꿎\sers箕꿎-데竟箕꿎%netVersion%
+
+
+@echo "copy  ServiceCenter"
+xcopy  "SersPublish\%netVersion%\ServiceCenter" "%basePath%\ServiceCenter" /e /i /r /y
+
+@echo "copy demo"
+xcopy  "SersPublish\%netVersion%\Demo\wwwroot" "%basePath%\ServiceCenter\wwwroot" /e /i /r /y
+xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.dll" "%basePath%\ServiceCenter" /i /r /y
+xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.pdb" "%basePath%\ServiceCenter" /i /r /y
+xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.xml" "%basePath%\ServiceCenter" /i /r /y
+
+
+@echo "copy  xml of Robot"
+xcopy  "SersPublish\%netVersion%\Robot\wwwroot" "%basePath%\ServiceCenter\wwwroot" /e /i /r /y
+xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.dll" "%basePath%\ServiceCenter" /i /r /y
+xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.pdb" "%basePath%\ServiceCenter" /i /r /y
+xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.xml" "%basePath%\ServiceCenter" /i /r /y
+
+
+@echo "copy PublishFile"
+xcopy  "..\PublishFile\Sers箕꿎\데竟箕꿎" "%basePath%" /e /i /r /y

+ 24 - 0
dotnet/Doc/Publish/publish sers压测-单体压测(netcoreapp2.1).bat

@@ -0,0 +1,24 @@
+
+set netVersion=netcoreapp2.1
+set basePath=Sers箕꿎\sers箕꿎-데竟箕꿎%netVersion%
+
+
+@echo "copy  ServiceCenter"
+xcopy  "SersPublish\%netVersion%\ServiceCenter" "%basePath%\ServiceCenter" /e /i /r /y
+
+@echo "copy demo"
+xcopy  "SersPublish\%netVersion%\Demo\wwwroot" "%basePath%\ServiceCenter\wwwroot" /e /i /r /y
+xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.dll" "%basePath%\ServiceCenter" /i /r /y
+xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.pdb" "%basePath%\ServiceCenter" /i /r /y
+xcopy  "SersPublish\%netVersion%\Demo\Did.SersLoader.Demo.xml" "%basePath%\ServiceCenter" /i /r /y
+
+
+@echo "copy  xml of Robot"
+xcopy  "SersPublish\%netVersion%\Robot\wwwroot" "%basePath%\ServiceCenter\wwwroot" /e /i /r /y
+xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.dll" "%basePath%\ServiceCenter" /i /r /y
+xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.pdb" "%basePath%\ServiceCenter" /i /r /y
+xcopy  "SersPublish\%netVersion%\Robot\App.Robot.Station.xml" "%basePath%\ServiceCenter" /i /r /y
+
+
+@echo "copy PublishFile"
+xcopy  "..\PublishFile\Sers箕꿎\데竟箕꿎" "%basePath%" /e /i /r /y

+ 0 - 0
dotnet/Doc/PublishFile/Sers单体压测/01 ServiceCenter.bat → dotnet/Doc/PublishFile/Sers压测/分布式压测/01 ServiceCenter.bat


+ 0 - 0
dotnet/Doc/PublishFile/Sers单体压测/01 start 4580.bat → dotnet/Doc/PublishFile/Sers压测/分布式压测/01 start 4580.bat


+ 8 - 0
dotnet/Doc/PublishFile/Sers压测/分布式压测/04 Demo.bat

@@ -0,0 +1,8 @@
+
+:begin
+dotnet Demo/Did.SersLoader.Demo.dll
+
+ 
+ TIMEOUT /T 10
+@echo restart
+goto begin

+ 8 - 0
dotnet/Doc/PublishFile/Sers压测/分布式压测/05 Robot.bat

@@ -0,0 +1,8 @@
+:begin
+dotnet Robot/App.Robot.Station.dll
+
+ 
+ TIMEOUT /T 10
+@echo restart
+goto begin
+ 

+ 380 - 0
dotnet/Doc/PublishFile/Sers压测/分布式压测/Demo/appsettings.json

@@ -0,0 +1,380 @@
+{
+  /* Sers微服务配置 */
+  "Sers": {
+    /* 通讯层配置 */
+    "CL": {
+      /* 共用配置,子项共用,覆写子项未指定的配置 */
+      "Config": {
+
+        /* 请求超时时间(单位ms,默认300000) */
+        "requestTimeoutMs": 300000,
+
+        /* 后台处理消息的线程个数(单位个,默认2) */
+        "workThreadCount": 2,
+
+        //HeartBeat
+        /* 心跳检测时间间隔(单位ms,默认10000,若指定为0则不进行心跳检测) */
+        "heartBeatIntervalMs": 10000,
+        /* 心跳检测超时时间(单位ms,默认30000) */
+        "heartBeatTimeoutMs": 30000,
+        /* 心跳检测失败重试次数(单位次,默认10) */
+        "heartBeatRetryCount": 10,
+
+
+        /* 数据传输 加密协议,可多个,可不指定 */
+        "//security": [
+          {
+            // SampleSecurity
+            /* 在此Assembly中查找security */
+            "assemblyFile": "Sers.Core.dll",
+            /* the class of security in assemblyFile. 必须继承接口 Sers.Core.Util.StreamSecurity.ISecurity  */
+            "className": "Sers.Core.Util.StreamSecurity.Security.SampleSecurity",
+
+            /* (x.2) config */
+            /* 加密密钥 */
+            "secret": "security"
+          },
+          {
+            // SampleSecurity
+            /* 若不指定assemblyFile和className 则默认为Sers.Core.Util.StreamSecurity.Security.SampleSecurity */
+            "secret": "Two layer encryption"
+          }
+        ],
+
+
+        /* 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 */
+        "secretKey": "SersCL"
+      },
+      /* one conn is one channel.can be multiable */
+      "Client": [
+        {
+          // Ipc.NamedPipe
+          /* (x.1) type */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.Ipc.NamedPipe.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Ipc.NamedPipe.OrganizeClientBuilder",
+
+
+          /* (x.2) config */
+          // 命名管道只支持本机或局域网。
+          /* 服务端机器名或者ip地址(如 103.23.23.23 、win10f),默认 "." */
+          "serverName": ".",
+          /* 命名管道名称。例如: "Sers.CL.Ipc" */
+          "pipeName": "Sers.CL.Ipc.4501"
+        },
+        {
+          // Socket.Iocp
+          /* (x.1) type - Iocp */
+          /* 在此Assembly中查找builder */
+          //"assemblyFile": "Sers.CL.Socket.Iocp.dll",
+          /* the class of builder in assemblyFile  */
+          "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
+
+          /* 通信模式(默认值:Simple)。可为 Simple、Timer、SpinWait  */
+          //"mode": "Timer",
+
+          /* 接收缓存区大小(单位:byte,默认:8192)  */
+          //"receiveBufferSize": 8192,
+
+          /* 发送缓冲区刷新间隔(单位:毫秒,默认:1)(仅当mode为Timer和SpinWait时有效)  */
+          //"sendFlushInterval": 1,
+          /* 发送缓冲区数据块的最小大小(单位:byte,默认 1000000)(仅当mode为Timer和SpinWait时有效)  */
+          //"sendBufferSize": 1000000,
+          /* 发送缓冲区个数(默认1024)(仅当mode为Timer和SpinWait时有效)    */
+          //"sendBufferCount": 1024,
+
+
+          /* (x.2) config */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
+          "host": "127.0.0.1",
+          /* 服务端 监听端口号。例如: 4501 */
+          "port": 4501
+        },
+
+        {
+          // Socket.ThreadWait
+          /* (x.1) type - ThreadWait */
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Socket.ThreadWait.OrganizeClientBuilder",
+
+          /* (x.2) config */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
+          "host": "127.0.0.1",
+          /* 服务端 监听端口号。例如: 4501 */
+          "port": 4501
+        },
+
+        {
+          // Zmq.ThreadWait
+          /* (x.1) type */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.ClrZmq.ThreadWait.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.ClrZmq.ThreadWait.OrganizeClientBuilder",
+
+
+          /* (x.2) config */
+          /* 地址。例如: "tcp://127.0.0.1:4502" 、 "ipc://4502"  */
+          "endpoint": "tcp://127.0.0.1:4502"
+        },
+
+        {
+          // WebSocket
+          /* (x.1) type - WebSocket */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.WebSocket.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.WebSocket.OrganizeClientBuilder",
+
+
+          /* (x.2) config */
+          /* 服务端地址(默认为 "ws://127.0.0.1:4503") */
+          "host": "ws://127.0.0.1:4503"
+
+        },
+
+        {
+          // Zmq.FullDuplex
+          /* (x.1) type */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.Zmq.FullDuplex.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Zmq.FullDuplex.OrganizeClientBuilder",
+
+
+          /* (x.2) config */
+          /* 地址。例如: "tcp://127.0.0.1:4504" 、 "ipc://4504"  */
+          "endpoint": "tcp://127.0.0.1:4504"
+        },
+
+        {
+          // Ipc.SharedMemory
+          /* (x.1) type - Ipc.SharedMemory */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Ipc.SharedMemory.OrganizeClientBuilder",
+
+
+          /* (x.2) config */
+          /* 共享内存名称。例如: "ipcTest" */
+          "name": "ipcForStationDemo"
+        }
+      ]
+    },
+
+
+    // RpcData序列化模式。可不指定。默认为Text。
+    // 可为 Newtonsoft、Text、BytePointor。
+    // 效率依次递增。BytePointor 序列化为二进制数据而不是json字符串。
+    "RpcDataSerializeMode": "Text",
+
+
+    /* LocalApiService 配置,可不指定 */
+    "LocalApiService": {
+
+      /* 后台服务的线程个数(单位个,默认0,代表不开启服务)*/
+      "workThreadCount": 4,
+
+      /* 超时时间,若不指定则后台任务永不超时。(主动关闭超过此时间的任务,实际任务强制关闭的时间会在1倍超时时间到2倍超时时间内)。单位:ms。*/
+      //"timeout_ms": 300000,
+
+
+      /* 是否 输出本地Api的调用信息到(ApiTrace)Log文件。默认:false */
+      "PrintTrace": false,
+
+
+      /* 静态文件映射器。映射站点静态文件,可多个,可不指定 */
+      "//staticFiles": [
+        {
+          /* api路由前缀,例如 "/demo/ui/*" */
+          "route": "/demo/ui/*",
+          /* api描述,静态文件描述 */
+          "apiName": "demo站点静态文件",
+
+
+          /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则默认为入口程序所在目录。demo:"wwwroot/demo" */
+          "rootPath": "wwwroot/demo",
+
+          /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
+          "contentTypeMapFile": "contentTypeMap.json",
+
+          /* 回应静态文件时额外添加的http回应头。可不指定。 */
+          "responseHeaders": {
+
+            //设置浏览器静态文件缓存3600秒
+            "Cache-Control": "public,max-age=3600"
+          }
+        }
+      ],
+
+
+      /* 默认站点名称,可多个,可不指定 */
+      "apiStationNames": [ "demo" ],
+
+      /* Api加载器配置 */
+      "//ApiLoaders": [
+        {
+          /* 在此Assembly中查找api加载器(如 Sers.Core.dll 、Sers.NetcoreLoader.dll 、 Sers.Serslot.dll ) */
+          //"loader_assemblyFile": "Sers.Core.dll",
+          /* 加载器的类名,可为 Sers.SersLoader.ApiLoader 、 Sers.NetcoreLoader.ApiLoader、 Sers.Serslot.ApiLoader 等。若不指定则默认为"Sers.SersLoader.ApiLoader" */
+          //"loader_className": "Sers.SersLoader.ApiLoader",
+
+
+
+          //(通过反射从此包中获取要加载的api)
+          /* 在此Assembly中查找服务(如 Did.SersLoader.Demo.dll)(assembly、assemblyFile、assemblyName 指定任一即可) */
+          "assemblyFile": "Did.SersLoader.Demo.dll",
+
+          /* 在此Assembly中查找服务(如 Did.SersLoader.Demo)(assembly、assemblyFile、assemblyName 指定任一即可) */
+          //"assemblyName": "Did.SersLoader.Demo",
+
+
+
+          /* 强制指定ApiStation名称。可不指定。(优先级从高到低:  apiStationName_Force 、 在代码上的SsStationNameAttribute特性指定 、 apiStationName 、 appsettings.json指定) */
+          //"apiStationName_Force": "",
+
+          /* ApiStation名称。可不指定。(优先级从高到低:  apiStationName_Force 、 在代码上的SsStationNameAttribute特性指定 、 apiStationName 、 appsettings.json指定) */
+          "apiStationName": "demo"
+
+
+          /* 强制路由前缀,例如:"demo/v1"。可不指定。(优先级从高到低:  routePrefix_Force、在代码上的SsRoutePrefixAttribute特性指定 、 routePrefix) */
+          //"routePrefix_Force": "",
+
+          /* 路由前缀,例如:"demo/v1"。可不指定。(优先级从高到低:  routePrefix_Force、在代码上的SsRoutePrefixAttribute特性指定 、 routePrefix ) */
+          //"routePrefix": ""
+        }
+
+
+      ],
+
+
+
+      /* 调用Api时的自定义Scope对象。可不指定。事件顺序为  OnCreateScope -> BeforeCallApi -> OnDispose */
+      "//OnCreateScope": [
+        {
+          /* 在此Assembly中加载类 */
+          "assemblyFile": "Sers.ApiTrace.dll",
+          /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.ApiScope.IApiScope */
+          "className": "Sers.ApiTrace.ApiScope"
+        }
+      ],
+
+      /* 调用api前的事件,可不指定。事件顺序为  OnCreateScope -> BeforeCallApi -> OnDispose */
+      "//BeforeCallApi": [
+        {
+          /* 在此Assembly中加载类 */
+          //"assemblyFile": "Sers.Core.dll",
+          /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
+          "className": "Bearer",
+          //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
+
+          /* 验证at接口的地址 */
+          "api_verifyAt": "/AuthCenter/account/verifyAt",
+          /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
+          "api_httpMethod": "POST"
+        },
+
+        {
+          //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
+          "className": "AccountInCookie",
+          "account": [
+            {
+              "userToken": "admin_123456",
+              //"CallerSource": "Internal",
+              "userInfo": {
+                "name": "超级管理员",
+                "入口": "Gover网关"
+              }
+            }
+          ]
+        }
+      ]
+    },
+
+    /* ServiceStation配置,可不指定 */
+    "ServiceStation": {
+
+      /* 自动上报cpu Usage。不指定则不上报 */
+      "//UsageReporter": {
+        /* 上报时间间隔(单位:秒) */
+        "intervalSecond": 2
+      },
+
+
+      /* 服务中心注册配置。在向服务中心注册站点前 是否打印(Logger.Info)请求参数。默认:false */
+      "StationRegist_PrintRegistArg": false,
+
+
+      /* serviceStation站点信息,可不指定 */
+      "serviceStationInfo": {
+        /* 服务站点名称 */
+        "serviceStationName": "demo",
+
+        /* 服务站点版本信息,若不指定则为入口链接库的版本号 */
+        //"stationVersion": "1.1.9.0",
+
+        /* [json]服务站点额外信息,可不指定 */
+        "info": null
+      }
+
+    }
+  },
+
+  "Demo": {
+
+    /* 映射静态文件 */
+    "staticFiles": {
+
+      /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则默认为入口程序所在目录。demo:"wwwroot/demo" */
+      "rootPath": "wwwroot/demo",
+
+      /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
+      "contentTypeMapFile": "contentTypeMap.json",
+
+      /* 回应静态文件时额外添加的http回应头。可不指定。 */
+      "responseHeaders": {
+
+        //设置浏览器静态文件缓存3600秒
+        "Cache-Control": "public,max-age=3600"
+      }
+    }
+
+
+  },
+
+
+  /* Vit工具配置,可不指定 */
+  "Vit": {
+
+    /* 日志配置,可不指定 */
+    "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
+      /* print the log to console. default:false  */
+      "PrintToConsole": true
+    },
+
+    /* 队列模式,可不指定。可为 BlockingCollection(默认)、 ConsumerCache_BlockingCollection(高性能) */
+    "ConsumerMode": "BlockingCollection",
+
+
+    /* 序列化配置,可不指定 */
+    "Serialization": {
+      /* 序列化字符编码。可不指定,默认 UTF8。只可为 UTF7,UTF8,UTF32,ASCII,Unicode。 */
+      "Encoding": "UTF8",
+
+      /* 时间序列化格式。可不指定,默认 "yyyy-MM-dd HH:mm:ss" */
+      "DateTimeFormat": "yyyy-MM-dd HH:mm:ss"
+    }
+
+
+
+  }
+
+
+
+
+
+}

+ 0 - 0
dotnet/Doc/PublishFile/Sers单体压测/ServiceCenter/Data/App.Robot.json → dotnet/Doc/PublishFile/Sers压测/分布式压测/Robot/Data/App.Robot.json


+ 206 - 0
dotnet/Doc/PublishFile/Sers压测/分布式压测/Robot/appsettings.json

@@ -0,0 +1,206 @@
+{
+  "Sers": {
+    /* 通讯层配置 */
+    "CL": {
+      /* 共用配置,子项共用,覆写子项未指定的配置 */
+      "Config": {
+
+        /* 请求超时时间(单位ms,默认300000) */
+        "requestTimeoutMs": 300000,
+
+        /* 后台处理消息的线程个数(单位个,默认2) */
+        "workThreadCount": 2,
+
+        /* 数据传输 加密协议,可多个,可不指定 */
+        "//security": [
+          {
+            // SampleSecurity
+            /* 在此Assembly中查找security */
+            "assemblyFile": "Sers.Core.dll",
+            /* the class of security in assemblyFile. 必须继承接口 Sers.Core.Util.StreamSecurity.ISecurity  */
+            "className": "Sers.Core.Util.StreamSecurity.Security.SampleSecurity",
+
+            /* (x.2) config */
+            /* 加密密钥 */
+            "secret": "security"
+          },
+          {
+            // SampleSecurity
+            /* 若不指定assemblyFile和className 则默认为Sers.Core.Util.StreamSecurity.Security.SampleSecurity */
+            "secret": "Two layer encryption"
+          }
+        ],
+
+        /* 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 */
+        "secretKey": "SersCL"
+      },
+      /* one conn is one channel.can be multiable */
+      "Client": [
+        {
+          // Ipc.NamedPipe
+          /* (x.1) type */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.Ipc.NamedPipe.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Ipc.NamedPipe.OrganizeClientBuilder",
+
+
+          /* (x.2) config */
+          // 命名管道只支持本机或局域网。
+          /* 服务端机器名或者ip地址(如 103.23.23.23 、win10f),默认 "." */
+          "serverName": ".",
+          /* 命名管道名称。例如: "Sers.CL.Ipc" */
+          "pipeName": "Sers.CL.Ipc.4501"
+        },
+        {
+          // Socket.Iocp
+          /* (x.1) type - Iocp */
+          /* 在此Assembly中查找builder */
+          //"assemblyFile": "Sers.CL.Socket.Iocp.dll",
+          /* the class of builder in assemblyFile  */
+          "className": "Sers.CL.Socket.Iocp.OrganizeClientBuilder",
+
+          /* 通信模式(默认值:Simple)。可为 Simple、Timer、SpinWait  */
+          //"mode": "Timer",
+
+
+          /* (x.2) config */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
+          "host": "127.0.0.1",
+          /* 服务端 监听端口号。例如: 4501 */
+          "port": 4501
+        },
+
+        {
+          // Socket.ThreadWait
+          /* (x.1) type - ThreadWait */
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Socket.ThreadWait.OrganizeClientBuilder",
+
+          /* (x.2) config */
+          /* 服务端 host地址。例如: "127.0.0.1"、"sers.cloud" */
+          "host": "127.0.0.1",
+          /* 服务端 监听端口号。例如: 4501 */
+          "port": 4501
+        },
+
+        {
+          // Zmq.ThreadWait
+          /* (x.1) type */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.ClrZmq.ThreadWait.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.ClrZmq.ThreadWait.OrganizeClientBuilder",
+
+
+          /* (x.2) config */
+          /* 地址。例如: "tcp://127.0.0.1:4502" 、 "ipc://4502"  */
+          "endpoint": "tcp://127.0.0.1:4502"
+        },
+
+        {
+          // WebSocket
+          /* (x.1) type - WebSocket */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.WebSocket.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.WebSocket.OrganizeClientBuilder",
+
+
+          /* (x.2) config */
+          /* 服务端地址(默认为 "ws://127.0.0.1:4503") */
+          "host": "ws://127.0.0.1:4503"
+
+        },
+
+        {
+          // Zmq.FullDuplex
+          /* (x.1) type */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.Zmq.FullDuplex.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Zmq.FullDuplex.OrganizeClientBuilder",
+
+
+          /* (x.2) config */
+          /* 地址。例如: "tcp://127.0.0.1:4504" 、 "ipc://4504"  */
+          "endpoint": "tcp://127.0.0.1:4504"
+        },
+
+        {
+          // Ipc.SharedMemory
+          /* (x.1) type - Ipc.SharedMemory */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Ipc.SharedMemory.OrganizeClientBuilder",
+
+
+          /* (x.2) config */
+          /* 共享内存名称。例如: "ipcTest" */
+          "name": "ipcForRobot"
+        }
+      ]
+    },
+
+
+    /* LocalApiService 配置,可不指定 */
+    "LocalApiService": {
+
+      /* 后台服务的线程个数(单位个,默认0,代表不开启服务) */
+      "workThreadCount": 4,
+
+      /* 静态文件映射器。映射站点静态文件,可多个,可不指定 */
+      "staticFiles": [
+        {
+          /* api路由前缀,例如 "/demo/ui/*" */
+          "route": "/_robot_/*",
+          /* api描述,静态文件描述 */
+          "apiName": "robot站点静态文件",
+
+          /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则为默认路径(wwwroot)。demo:"wwwroot/demo" */
+          "rootPath": "wwwroot/_robot_",
+
+          /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
+          "contentTypeMapFile": "contentTypeMap.json",
+
+          /* 回应静态文件时额外添加的http回应头。可不指定。 */
+          "responseHeaders": {
+
+            //设置浏览器静态文件缓存3600秒
+            "Cache-Control": "public,max-age=3600"
+          }
+        }
+      ]
+ 
+
+    },
+
+
+    /* ServiceStation配置,可不指定 */
+    "ServiceStation": {
+
+      /* serviceStation站点信息 */
+      "serviceStationInfo": {
+        "serviceStationName": "Robot"
+      }
+    }
+  },
+
+
+ 
+
+  /* Vit工具配置,可不指定 */
+  "Vit": {
+
+    /* 日志配置,可不指定 */
+    "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
+      /* print the log to console. default:false  */
+      "PrintToConsole": true
+    }
+  }
+
+
+}

+ 566 - 0
dotnet/Doc/PublishFile/Sers压测/分布式压测/ServiceCenter/appsettings.json

@@ -0,0 +1,566 @@
+{
+  "Sers": {
+    /* 通讯层配置 */
+    "CL": {
+      /* 共用配置,子项共用,覆写子项未指定的配置 */
+      "Config": {
+
+        /* 请求超时时间(单位ms,默认300000) */
+        "requestTimeoutMs": 300000,
+
+        /* 后台处理消息的线程个数(单位个,默认2) */
+        "workThreadCount": 2,
+
+        //HeartBeat
+        /* 心跳检测时间间隔(单位ms,默认10000,若指定为0则不进行心跳检测) */
+        "heartBeatIntervalMs": 10000,
+        /* 心跳检测超时时间(单位ms,默认30000) */
+        "heartBeatTimeoutMs": 30000,
+        /* 心跳检测失败重试次数(单位次,默认10) */
+        "heartBeatRetryCount": 10,
+
+
+        /* 数据传输 加密协议,可多个,可不指定 */
+        "//security": [
+          {
+            // SampleSecurity
+            /* 在此Assembly中查找security */
+            "assemblyFile": "Sers.Core.dll",
+            /* the class of security in assemblyFile. 必须继承接口 Sers.Core.Util.StreamSecurity.ISecurity  */
+            "className": "Sers.Core.Util.StreamSecurity.Security.SampleSecurity",
+
+            /* (x.2) config */
+            /* 加密密钥 */
+            "secret": "security"
+          },
+          {
+            // SampleSecurity
+            /* 若不指定assemblyFile和className 则默认为Sers.Core.Util.StreamSecurity.Security.SampleSecurity */
+            "secret": "Two layer encryption"
+          }
+        ],
+
+
+        /* 连接秘钥,用以验证连接安全性。服务端和客户端必须一致 */
+        "secretKey": "SersCL"
+
+      },
+      /* one conn is one channel.can be multiable */
+      "Server": [
+        {
+          //Ipc.NamedPipe
+          /* (x.1) type */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.Ipc.NamedPipe.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Ipc.NamedPipe.OrganizeServerBuilder",
+
+
+          /* (x.2) config */
+          /* 命名管道名称。例如: "Sers.CL.Ipc" */
+          "pipeName": "Sers.CL.Ipc.4501"
+        },
+        {
+          // Socket.Iocp
+          /* (x.1) type - Iocp */
+          /* the class of builder in assemblyFile  */
+          "className": "Sers.CL.Socket.Iocp.OrganizeServerBuilder",
+
+          /* 通信模式(默认值:Simple)。可为 Simple、Timer、SpinWait  */
+          //"mode": "Timer",
+
+          /* 接收缓存区大小(单位:byte,默认:8192)  */
+          //"receiveBufferSize": 8192,
+
+          /* 发送缓冲区刷新间隔(单位:毫秒,默认:1)(仅当mode为Timer和SpinWait时有效)  */
+          //"sendFlushInterval": 1,
+          /* 发送缓冲区数据块的最小大小(单位:byte,默认 1000000)(仅当mode为Timer和SpinWait时有效)  */
+          //"sendBufferSize": 1000000,
+          /* 发送缓冲区个数(默认1024)(仅当mode为Timer和SpinWait时有效)    */
+          //"sendBufferCount": 1024,
+
+
+          /* (x.2) config */
+          /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。*/
+          //"host": "127.0.0.1",
+          /* 服务端 监听端口号。例如: 4501 */
+          "port": 4501
+        },
+        {
+          // Socket.ThreadWait
+          /* (x.1) type - Socket */
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Socket.ThreadWait.OrganizeServerBuilder",
+
+
+          /* (x.2) config */
+          /* 服务端 监听地址。若不指定则监听所有网卡。例如: "127.0.0.1"、"sers.cloud"。*/
+          //"host": "127.0.0.1",
+          /* 服务端 监听端口号。例如: 4501 */
+          "port": 4501
+        },
+
+        {
+          // Zmq.ThreadWait
+          /* (x.1) type */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.ClrZmq.ThreadWait.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.ClrZmq.ThreadWait.OrganizeServerBuilder",
+
+
+          /* (x.2) config */
+          /* 地址。例如: "tcp://*:4502" 、 "ipc://4502" */
+          "endpoint": "tcp://*:4502"
+        },
+
+        {
+          // WebSocket
+          /* (x.1) type - Iocp */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.WebSocket.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.WebSocket.OrganizeServerBuilder",
+
+          /* (x.2) config */
+          /* 服务端地址(默认为 "ws://0.0.0.0:4503") */
+          "host": "ws://0.0.0.0:4503"
+        },
+
+        {
+          // Zmq.FullDuplex
+          /* (x.1) type */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.Zmq.FullDuplex.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Zmq.FullDuplex.OrganizeServerBuilder",
+
+          /* (x.2) config */
+          /* 地址。例如: "tcp://*:4504" 、 "ipc://4504" */
+          "endpoint": "tcp://*:4504"
+        },
+
+
+        {
+          //Ipc.SharedMemory
+          /* (x.1) type - Ipc.SharedMemory */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Ipc.SharedMemory.OrganizeServerBuilder",
+
+
+          /* (x.2) config */
+          /* 共享内存名称。例如: "ipcTest" */
+          "name": "ipcForStationDemo",
+          /* 共享内存节点个数。例如: 64 */
+          "nodeCount": 128,
+          /* 共享内存节点大小。例如: 2048 */
+          "nodeBufferSize": 102400
+        },
+        {
+          /* (x.1) type - Ipc.SharedMemory */
+          /* 在此Assembly中查找builder */
+          "assemblyFile": "Sers.CL.Ipc.SharedMemory.dll",
+          /* the class of builder in assemblyFile  */
+          //"className": "Sers.CL.Ipc.SharedMemory.OrganizeServerBuilder",
+
+          /* (x.2) config */
+          /* 共享内存名称。例如: "ipcTest" */
+          "name": "ipcForRobot",
+          /* 共享内存节点个数。例如: 64 */
+          "nodeCount": 128,
+          /* 共享内存节点大小。例如: 2048 */
+          "nodeBufferSize": 102400
+        }
+      ]
+    },
+
+    // RpcData序列化模式。可不指定。默认为Text。
+    // 可为 Newtonsoft、Text、BytePointor。
+    // 效率依次递增。BytePointor 序列化为二进制数据而不是json字符串。
+    "RpcDataSerializeMode": "Text",
+
+
+
+    /* LocalApiService 配置,可不指定 */
+    "LocalApiService": {
+
+      /* 后台服务的线程个数(单位个,默认0,代表不开启服务)*/
+      "workThreadCount": 4,
+
+      /* 超时时间,若不指定则后台任务永不超时。(主动关闭超过此时间的任务,实际任务强制关闭的时间会在1倍超时时间到2倍超时时间内)。单位:ms。*/
+      //"timeout_ms": 300000,
+
+
+      /* 是否 输出本地Api的调用信息到(ApiTrace)Log文件。默认:false */
+      "PrintTrace": false,
+
+
+      /* 静态文件映射器。映射站点静态文件,可多个,可不指定 */
+      "//staticFiles": [
+        {
+          /* api路由前缀,例如 "/demo/ui/*" */
+          "route": "/demo/ui/*",
+          /* api描述,静态文件描述 */
+          "apiName": "demo站点静态文件",
+
+
+          /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则默认为入口程序所在目录。demo:"wwwroot/demo" */
+          "rootPath": "wwwroot/demo",
+
+          /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
+          "contentTypeMapFile": "contentTypeMap.json",
+
+          /* 回应静态文件时额外添加的http回应头。可不指定。 */
+          "responseHeaders": {
+
+            //设置浏览器静态文件缓存3600秒
+            "Cache-Control": "public,max-age=3600"
+          }
+        }
+      ],
+
+
+      /* 默认站点名称,可多个,可不指定 */
+      //"apiStationNames": [ "demo" ],
+
+      /* Api加载器配置 */
+      "//ApiLoaders": [
+        {
+          /* 在此Assembly中查找api加载器(如 Sers.Core.dll 、Sers.NetcoreLoader.dll 、 Sers.Serslot.dll ) */
+          //"loader_assemblyFile": "Sers.Core.dll",
+          /* 加载器的类名,可为 Sers.SersLoader.ApiLoader 、 Sers.NetcoreLoader.ApiLoader、 Sers.Serslot.ApiLoader 等。若不指定则默认为"Sers.SersLoader.ApiLoader" */
+          //"loader_className": "Sers.SersLoader.ApiLoader",
+
+
+          //(通过反射从此包中获取要加载的api)
+          /* 在此Assembly中查找服务(如 Did.SersLoader.Demo.dll)(assembly、assemblyFile、assemblyName 指定任一即可) */
+          "assemblyFile": "Did.SersLoader.Demo.dll",
+
+          /* 在此Assembly中查找服务(如 Did.SersLoader.Demo)(assembly、assemblyFile、assemblyName 指定任一即可) */
+          //"assemblyName": "Did.SersLoader.Demo",
+
+
+          /* 强制指定ApiStation名称。可不指定。(优先级从高到低:  apiStationName_Force 、 在代码上的SsStationNameAttribute特性指定 、 apiStationName 、 appsettings.json指定) */
+          //"apiStationName_Force": "",
+
+          /* ApiStation名称。可不指定。(优先级从高到低:  apiStationName_Force 、 在代码上的SsStationNameAttribute特性指定 、 apiStationName 、 appsettings.json指定) */
+          "apiStationName": "demo"
+
+
+          /* 强制路由前缀,例如:"demo/v1"。可不指定。(优先级从高到低:  routePrefix_Force、在代码上的SsRoutePrefixAttribute特性指定 、 routePrefix) */
+          //"routePrefix_Force": "",
+
+          /* 路由前缀,例如:"demo/v1"。可不指定。(优先级从高到低:  routePrefix_Force、在代码上的SsRoutePrefixAttribute特性指定 、 routePrefix ) */
+          //"routePrefix": ""
+        }
+      ],
+
+
+      /* 调用Api时的自定义Scope对象。可不指定。事件顺序为  OnCreateScope -> BeforeCallApi -> OnDispose */
+      "//OnCreateScope": [
+        {
+          /* 在此Assembly中加载类 */
+          "assemblyFile": "Sers.ApiTrace.dll",
+          /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.ApiScope.IApiScope */
+          "className": "Sers.ApiTrace.ApiScope"
+        }
+      ],
+
+      /* 调用api前的事件,可不指定。事件顺序为  OnCreateScope -> BeforeCallApi -> OnDispose */
+      "//BeforeCallApi": [
+        {
+          /* 在此Assembly中加载类 */
+          "assemblyFile": "Sers.Core.dll",
+          /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
+          "className": "Bearer",
+          //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
+
+          /* 验证at接口的地址 */
+          "api_verifyAt": "/AuthCenter/account/verifyAt",
+          /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
+          "api_httpMethod": "POST"
+        },
+
+        {
+          //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
+          "className": "AccountInCookie",
+          "account": [
+            {
+              "userToken": "admin_123456",
+              //"CallerSource": "Internal",
+              "userInfo": {
+                "name": "超级管理员",
+                "入口": "Gover网关"
+              }
+            }
+          ]
+        }
+      ]
+    },
+
+
+
+    /* ServiceStation配置,可不指定 */
+    "ServiceStation": {
+
+      /* 自动上报cpu Usage。不指定则不上报 */
+      "//UsageReporter": {
+        /* 上报时间间隔(单位:秒) */
+        "intervalSecond": 2
+      },
+
+
+      /* serviceStation站点信息 */
+      "serviceStationInfo": {
+        /* 服务站点名称 */
+        "serviceStationName": "ServiceCenter",
+
+        /* 服务站点版本信息,若不指定则为入口链接库的版本号 */
+        //"stationVersion": "2.1.1",
+
+        /* [json]服务站点额外信息,可不指定 */
+        "info": null
+      }
+
+    },
+
+
+
+    /* ServiceCenter 配置,可不指定 */
+    "ServiceCenter": {
+
+      /* 是否 输出Api注册事件到(Info)Log文件。默认:true  */
+      "ApiRegistEvent_Print": true,
+
+
+      /* api路由管理方式,可不指定。可为:"RESTful","IgnoreHttpMethod"。若不指定或未指定有效值,则默认为"RESTful" */
+      //"ApiRouteType": "IgnoreHttpMethod",
+
+
+      //调用api前的事件,可不指定
+      "//BeforeCallApi": [
+        {
+          /* 在此Assembly中加载类 */
+          "assemblyFile": "Sers.Core.dll",
+          /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
+          "className": "Bearer",
+          //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
+
+          /* 验证at接口的地址 */
+          "api_verifyAt": "/AuthCenter/account/verifyAt",
+          /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
+          "api_httpMethod": "POST"
+        },
+
+        {
+          //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
+          //"className": "AccountInCookie",
+          "account": [
+            {
+              "userToken": "admin_123456",
+              //"CallerSource": "Internal",
+              "userInfo": {
+                "name": "超级管理员",
+                "入口": "Gover网关"
+              }
+            }
+          ]
+        }
+      ]
+
+    },
+
+
+    /* 动态加载的App事件 */
+    "AppEvent": [
+      {
+        /* 在此Assembly中加载类 */
+        "assemblyFile": "Sers.Gover.Apm.Zipkin.dll",
+        /* 动态加载的类名,必须继承接口 Sers.Core.Module.App.AppEvent.IAppEvent */
+        //"className": "Sers.Gover.Apm.Zipkin.AppEvent",
+
+        //启用Zipkin链路追踪(自动提交应用调用信息)
+
+        /* 配置 */
+        "SamplingRate": "1.0",
+        "zipkinCollectorUrl": "http://sers.cloud:9411",
+
+        /* 若不指定则默认为ServiceCenter */
+        "rpcName": "ServiceCenter",
+        "tags": {
+          // 可为 requestRpc requestData responseRpc responseData
+          "traceName": "demoTrace",
+
+          "route": "{{requestRpc.route}}",
+          "{{requestRpc.route}}": "route",
+          "url": "{{requestRpc.http.url}}",
+          "method": "{{requestRpc.http.method}}",
+          "requestRpc": "{{requestRpc}}",
+          //"requestData": "{{requestData}}",
+
+
+          "responseRpc": "{{responseRpc}}",
+          "responseState": "{{responseRpc.http.headers.responseState}}",
+          "responseError_Base64": "{{responseRpc.http.headers.responseError_Base64}}"
+
+          //"responseData": "{{responseData}}",
+          //"responseData.error": "{{responseData.error}}"
+
+        }
+      }
+    ],
+
+
+    /* 网关配置。若不指定,则不开启网关服务 */
+    "Gateway": {
+
+      /* Rpc配置,可不指定 */
+      "Rpc": {
+        /* 网关转发的请求中的rpc 信息中的 CallerSource。(暗指调用来源,默认"OutSide")  */
+        //"CallerSource": "OutSide"
+      },
+
+      "WebHost": {
+
+        /* url,可多个 */
+        "urls": [ "http://*:4580" ],
+
+        /* 是否允许跨域访问,默认true */
+        "allowAnyOrigin": true,
+
+        /* 把请求的ip地址、端口号复制到请求头中的前缀。若不指定则不复制。 */
+        "prefixOfCopyIpToHeader": "Sers-Gateway-",
+
+        /* http回应中的默认Content-Type。若不指定则默认为 "application/json; charset="+Serialization.Instance.charset  */
+        "//ResponseDefaultContentType": "application/json; charset=UTF-8",
+
+
+        /* 映射静态文件。若不指定则不映射静态文件 */
+        "staticFiles": {
+
+          /* 请求路径(可不指定)。demo:"/file/static"。The relative request path that maps to static resources */
+          //"requestPath": "/file",
+
+          /* 静态文件路径。可为相对路径或绝对路径。若为空或空字符串则为默认路径(wwwroot)。demo:"wwwroot/demo" */
+          //"rootPath": "wwwroot",
+
+          /* 默认页面(可不指定)。An ordered list of file names to select by default. List length and ordering  may affect performance */
+          "defaultFileNames": [ "index.html" ],
+
+          /* 是否可浏览目录(default false)。Enables directory browsing */
+          //"useDirectoryBrowser": false,
+
+          /* 静态文件类型映射配置的文件路径。可为相对路径或绝对路径。例如"contentTypeMap.json"。若不指定(或指定的文件不存在)则不指定文件类型映射配置 */
+          "contentTypeMapFile": "contentTypeMap.json",
+
+          /* 回应静态文件时额外添加的http回应头。可不指定。 */
+          "responseHeaders": {
+
+            //设置浏览器静态文件缓存3600秒
+            "Cache-Control": "public,max-age=3600"
+          }
+        }
+
+      },
+
+
+      //调用api前的事件,可不指定
+      "BeforeCallApi": [
+        {
+          /* 在此Assembly中加载类 */
+          "assemblyFile": "Sers.Core.dll",
+          /* 动态加载的类名,必须继承接口 Sers.Core.Module.Api.ApiEvent.BeforeCallApi.IBeforeCallApi */
+          //"className": "Bearer",
+          //Bearer: 在调用接口前,会获取 rpcData.http.headers.Authorization(格式为 "Bearer xxxxxx"),并作为参数调用接口api_verifyAt,把返回数据放到 rpcData.user.userInfo
+
+          /* 验证at接口的地址 */
+          "api_verifyAt": "/AuthCenter/account/verifyAt",
+          /* 验证at接口的httpMethod。(如 GET POST 可不指定) */
+          "api_httpMethod": "POST"
+        },
+
+        {
+          //AccountInCookie 在调用接口前,会获取 rpcData.http.headers.Cookie(格式为 "user=xxx;c=7")中的user,在账号列表中比对userToken,回写 CallerSource(rpcData.caller.source) 和 userInfo(rpcData.user.userInfo)
+          "className": "AccountInCookie",
+          "account": [
+            {
+              "userToken": "admin_123456",
+              "CallerSource": "Internal",
+              "userInfo": {
+                "name": "Gover管理员",
+                "入口": "Gover网关"
+              }
+            }
+          ]
+        }
+      ],
+
+
+      /* 服务限流配置,可不指定 */
+      "rateLimit": [
+        {
+          /* 服务限流key,标识一个限流服务,必须唯一 */
+          "rateLimitKey": "rate",
+
+          /* 固定时间窗口限流。在单位时间(msInterval)内限制最大请求数量为reqLimit。超出数量的请求将被拒绝 */
+          "rateLimitType": "FixedWindow",
+          /* 单位时间内最大请求数量(个)*/
+          "reqLimit": 100000,
+          /* 单位时间长度(单位:ms)*/
+          "msInterval": 1000
+        }
+      ]
+
+    }
+
+
+
+  },
+
+
+
+
+
+  /* Vit工具配置,可不指定 */
+  "Vit": {
+
+    /* 日志配置,可不指定 */
+    "Logger": {
+      /* print the log to Log/*.txt default:true  */
+      "PrintToTxt": true,
+      /* print the log to console. default:false  */
+      "PrintToConsole": true
+    },
+
+    /* 队列模式,可不指定。可为 BlockingCollection(默认)、 ConsumerCache_BlockingCollection(高性能) */
+    "ConsumerMode": "BlockingCollection",
+
+    /* 序列化配置,可不指定 */
+    "Serialization": {
+      /* 序列化字符编码。可不指定,默认 UTF8。只可为 UTF7,UTF8,UTF32,ASCII,Unicode。 */
+      "Encoding": "UTF8",
+
+      /* 时间序列化格式。可不指定,默认 "yyyy-MM-dd HH:mm:ss" */
+      "DateTimeFormat": "yyyy-MM-dd HH:mm:ss"
+    },
+
+
+    "//Kestrel": {
+      /* (int64) the maximum allowed size of any request body in bytes.  When set to null, the maximum request body size is unlimited. */
+      "MaxRequestBodySize": 2000000000,
+
+      /* (int32) A limit on the length of individual form values. Forms containing values that exceed this limit will throw an System.IO.InvalidDataException when parsed. */
+      "ValueLengthLimit": 2000000000,
+
+      /* (int64) A limit for the length of each multipart body. Forms sections that exceed this limit will throw an System.IO.InvalidDataException when parsed. */
+      "MultipartBodyLengthLimit": 2000000000
+    }
+
+  }
+
+
+
+
+}

+ 8 - 0
dotnet/Doc/PublishFile/Sers压测/单体压测/01 ServiceCenter.bat

@@ -0,0 +1,8 @@
+
+:begin
+dotnet ServiceCenter/App.ServiceCenter.dll
+
+ TIMEOUT /T 1
+@echo restart
+goto begin
+ 

+ 6 - 0
dotnet/Doc/PublishFile/Sers压测/单体压测/01 start 4580.bat

@@ -0,0 +1,6 @@
+start http://localhost:4580/_gover_/index.html?user=admin_123456
+
+ 
+
+ 
+ 

+ 44 - 0
dotnet/Doc/PublishFile/Sers压测/单体压测/ServiceCenter/Data/App.Robot.json

@@ -0,0 +1,44 @@
+{
+  "tasks": {
+    "1": {
+      "id": 1,
+      "sumCount": 0,
+      "sumFailCount": 0,
+      "curCount": 0,
+      "failCount": 0,
+      "targetCount": 1000000000,
+      "config": {
+        "type": "ApiClient",
+        "name": "saveToCache",
+        "apiRoute": "/_robot_/taskMng/saveToCache",
+        "threadCount": 1,
+        "loopCountPerThread": 1000000000,
+        "interval": 5000,
+        "autoStart": true,
+        "logError": true
+      },
+      "RunningThreadCount": 1,
+      "IsRunning": true
+    },
+    "2": {
+      "id": 2,
+      "sumCount": 0,
+      "sumFailCount": 0,
+      "curCount": 0,
+      "failCount": 0,
+      "targetCount": 8000000000,
+      "config": {
+        "type": "ApiClientAsync",
+        "name": "Async",
+        "apiRoute": "/a",
+        "threadCount": 20,
+        "loopCountPerThread": 1000000000,
+        "interval": 0,
+        "autoStart": true,
+        "logError": false
+      },
+      "RunningThreadCount": 0,
+      "IsRunning": false
+    }
+  }
+}

+ 0 - 0
dotnet/Doc/PublishFile/Sers单体压测/ServiceCenter/appsettings.json → dotnet/Doc/PublishFile/Sers压测/单体压测/ServiceCenter/appsettings.json


+ 1 - 1
删除发布文件.bat

@@ -1,7 +1,7 @@
 rd /s/q dotnet\Doc\Publish\nuget
 rd /s/q dotnet\Doc\Publish\SersPublish
 rd /s/q dotnet\Doc\Publish\CLѹ²â
-rd /s/q dotnet\Doc\Publish\Sersµ¥Ìåѹ²â
+rd /s/q dotnet\Doc\Publish\Sersѹ²â
 rd /s/q dotnet\Doc\Publish\SersDocker