@nsshunt/stsappframework 3.1.214 → 3.1.215

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. package/dist/commonTypes.js.map +1 -1
  2. package/dist/index.js +1 -7
  3. package/dist/index.js.map +1 -1
  4. package/dist/serverprocessbase.js +2 -2
  5. package/dist/serverprocessbase.js.map +1 -1
  6. package/dist/stscontrollerbase.js.map +1 -1
  7. package/dist/{server.js → stsexpressserver.js} +1 -1
  8. package/dist/stsexpressserver.js.map +1 -0
  9. package/dist/stslatencycontroller.js.map +1 -1
  10. package/dist/stslatencyroute.js.map +1 -1
  11. package/dist/stsrouterbase.js.map +1 -1
  12. package/dist/vitesttesting/appSingleWSS.js +2 -1
  13. package/dist/vitesttesting/appSingleWSS.js.map +1 -1
  14. package/dist/workerprocessbase.js.map +1 -1
  15. package/package.json +5 -6
  16. package/src/commonTypes.ts +2 -0
  17. package/src/index.ts +1 -7
  18. package/src/serverprocessbase.ts +1 -1
  19. package/src/{socketIoServerHelper.ts → socketIoServerHelper.ts_bak} +1 -2
  20. package/src/stscontrollerbase.ts +1 -2
  21. package/src/{server.ts → stsexpressserver.ts} +1 -2
  22. package/src/stslatencycontroller.ts +1 -2
  23. package/src/stslatencyroute.ts +1 -2
  24. package/src/stsrouterbase.ts +1 -2
  25. package/src/vitesttesting/appSingleWSS.ts +2 -1
  26. package/src/workerprocessbase.ts +1 -2
  27. package/types/commonTypes.d.ts +0 -15
  28. package/types/commonTypes.d.ts.map +1 -1
  29. package/types/index.d.ts +0 -7
  30. package/types/index.d.ts.map +1 -1
  31. package/types/serverprocessbase.d.ts +1 -1
  32. package/types/serverprocessbase.d.ts.map +1 -1
  33. package/types/stscontrollerbase.d.ts.map +1 -1
  34. package/types/{server.d.ts → stsexpressserver.d.ts} +1 -1
  35. package/types/stsexpressserver.d.ts.map +1 -0
  36. package/types/stslatencycontroller.d.ts.map +1 -1
  37. package/types/stslatencyroute.d.ts.map +1 -1
  38. package/types/stsrouterbase.d.ts.map +1 -1
  39. package/types/vitesttesting/appSingleWSS.d.ts.map +1 -1
  40. package/types/workerprocessbase.d.ts.map +1 -1
  41. package/dist/authDefs.js +0 -33
  42. package/dist/authDefs.js.map +0 -1
  43. package/dist/gRPC/ststest/protos/auth_sample.js +0 -3
  44. package/dist/gRPC/ststest/protos/auth_sample.js.map +0 -1
  45. package/dist/gRPC/ststest/protos/echo.js +0 -3
  46. package/dist/gRPC/ststest/protos/echo.js.map +0 -1
  47. package/dist/gRPC/ststest/protos/grpc/examples/echo/Echo.js +0 -4
  48. package/dist/gRPC/ststest/protos/grpc/examples/echo/Echo.js.map +0 -1
  49. package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.js +0 -4
  50. package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.js.map +0 -1
  51. package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.js +0 -4
  52. package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.js.map +0 -1
  53. package/dist/gRPC/ststest/protos/grpc/testing/Request.js +0 -4
  54. package/dist/gRPC/ststest/protos/grpc/testing/Request.js.map +0 -1
  55. package/dist/gRPC/ststest/protos/grpc/testing/Response.js +0 -4
  56. package/dist/gRPC/ststest/protos/grpc/testing/Response.js.map +0 -1
  57. package/dist/gRPC/ststest/protos/grpc/testing/TestService.js +0 -4
  58. package/dist/gRPC/ststest/protos/grpc/testing/TestService.js.map +0 -1
  59. package/dist/gRPC/ststest/protos/hellostreamingworld/HelloReply.js +0 -4
  60. package/dist/gRPC/ststest/protos/hellostreamingworld/HelloReply.js.map +0 -1
  61. package/dist/gRPC/ststest/protos/hellostreamingworld/HelloRequest.js +0 -4
  62. package/dist/gRPC/ststest/protos/hellostreamingworld/HelloRequest.js.map +0 -1
  63. package/dist/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.js +0 -4
  64. package/dist/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.js.map +0 -1
  65. package/dist/gRPC/ststest/protos/hellostreamingworld.js +0 -3
  66. package/dist/gRPC/ststest/protos/hellostreamingworld.js.map +0 -1
  67. package/dist/gRPC/ststest/protos/helloworld/Greeter.js +0 -4
  68. package/dist/gRPC/ststest/protos/helloworld/Greeter.js.map +0 -1
  69. package/dist/gRPC/ststest/protos/helloworld/HelloReply.js +0 -4
  70. package/dist/gRPC/ststest/protos/helloworld/HelloReply.js.map +0 -1
  71. package/dist/gRPC/ststest/protos/helloworld/HelloRequest.js +0 -4
  72. package/dist/gRPC/ststest/protos/helloworld/HelloRequest.js.map +0 -1
  73. package/dist/gRPC/ststest/protos/helloworld.js +0 -3
  74. package/dist/gRPC/ststest/protos/helloworld.js.map +0 -1
  75. package/dist/gRPC/ststest/protos/keyvaluestore/KeyValueStore.js +0 -4
  76. package/dist/gRPC/ststest/protos/keyvaluestore/KeyValueStore.js.map +0 -1
  77. package/dist/gRPC/ststest/protos/keyvaluestore/Request.js +0 -4
  78. package/dist/gRPC/ststest/protos/keyvaluestore/Request.js.map +0 -1
  79. package/dist/gRPC/ststest/protos/keyvaluestore/Response.js +0 -4
  80. package/dist/gRPC/ststest/protos/keyvaluestore/Response.js.map +0 -1
  81. package/dist/gRPC/ststest/protos/keyvaluestore.js +0 -3
  82. package/dist/gRPC/ststest/protos/keyvaluestore.js.map +0 -1
  83. package/dist/gRPC/ststest/protos/route_guide.js +0 -3
  84. package/dist/gRPC/ststest/protos/route_guide.js.map +0 -1
  85. package/dist/gRPC/ststest/protos/routeguide/Feature.js +0 -4
  86. package/dist/gRPC/ststest/protos/routeguide/Feature.js.map +0 -1
  87. package/dist/gRPC/ststest/protos/routeguide/Point.js +0 -4
  88. package/dist/gRPC/ststest/protos/routeguide/Point.js.map +0 -1
  89. package/dist/gRPC/ststest/protos/routeguide/Rectangle.js +0 -4
  90. package/dist/gRPC/ststest/protos/routeguide/Rectangle.js.map +0 -1
  91. package/dist/gRPC/ststest/protos/routeguide/RouteGuide.js +0 -4
  92. package/dist/gRPC/ststest/protos/routeguide/RouteGuide.js.map +0 -1
  93. package/dist/gRPC/ststest/protos/routeguide/RouteNote.js +0 -4
  94. package/dist/gRPC/ststest/protos/routeguide/RouteNote.js.map +0 -1
  95. package/dist/gRPC/ststest/protos/routeguide/RouteSummary.js +0 -4
  96. package/dist/gRPC/ststest/protos/routeguide/RouteSummary.js.map +0 -1
  97. package/dist/gRPC/ststest/src/commonTypes.js +0 -3
  98. package/dist/gRPC/ststest/src/commonTypes.js.map +0 -1
  99. package/dist/gRPC/ststest/src/greeter_client.js +0 -67
  100. package/dist/gRPC/ststest/src/greeter_client.js.map +0 -1
  101. package/dist/gRPC/ststest/src/greeter_server.js +0 -78
  102. package/dist/gRPC/ststest/src/greeter_server.js.map +0 -1
  103. package/dist/gRPC/ststest/src/route_guide_client.js +0 -258
  104. package/dist/gRPC/ststest/src/route_guide_client.js.map +0 -1
  105. package/dist/gRPC/ststest/src/route_guide_server.js +0 -237
  106. package/dist/gRPC/ststest/src/route_guide_server.js.map +0 -1
  107. package/dist/gRPC/ststest/src/route_guide_server2.js +0 -205
  108. package/dist/gRPC/ststest/src/route_guide_server2.js.map +0 -1
  109. package/dist/influxdb/influxDBManager.js +0 -304
  110. package/dist/influxdb/influxDBManager.js.map +0 -1
  111. package/dist/influxdb/influxDBManagerAgent.js +0 -14
  112. package/dist/influxdb/influxDBManagerAgent.js.map +0 -1
  113. package/dist/influxdb/influxDBManagerBase.js +0 -100
  114. package/dist/influxdb/influxDBManagerBase.js.map +0 -1
  115. package/dist/influxdb/influxDBManagerLambda.js +0 -17
  116. package/dist/influxdb/influxDBManagerLambda.js.map +0 -1
  117. package/dist/influxdb/influxDBManagerService.js +0 -14
  118. package/dist/influxdb/influxDBManagerService.js.map +0 -1
  119. package/dist/publishInstrumentsWebWorker.js +0 -159
  120. package/dist/publishInstrumentsWebWorker.js.map +0 -1
  121. package/dist/server.js.map +0 -1
  122. package/dist/socketIoServerHelper.js +0 -125
  123. package/dist/socketIoServerHelper.js.map +0 -1
  124. package/dist/tcpclient/app.js +0 -23
  125. package/dist/tcpclient/app.js.map +0 -1
  126. package/dist/tcpclient/app2.js +0 -57
  127. package/dist/tcpclient/app2.js.map +0 -1
  128. package/dist/tcpserver/app.js +0 -16
  129. package/dist/tcpserver/app.js.map +0 -1
  130. package/dist/tcpserver/appConfig.js +0 -83
  131. package/dist/tcpserver/appConfig.js.map +0 -1
  132. package/dist/tcpserver/appmaster.js +0 -446
  133. package/dist/tcpserver/appmaster.js.map +0 -1
  134. package/dist/testertesting/app.js +0 -284
  135. package/dist/testertesting/app.js.map +0 -1
  136. package/dist/testertesting/commonTypes.js +0 -47
  137. package/dist/testertesting/commonTypes.js.map +0 -1
  138. package/dist/testertesting/telemetryProcessor.js +0 -111
  139. package/dist/testertesting/telemetryProcessor.js.map +0 -1
  140. package/dist/testertesting/testCase01.js +0 -169
  141. package/dist/testertesting/testCase01.js.map +0 -1
  142. package/dist/testertesting/workerInstance.js +0 -263
  143. package/dist/testertesting/workerInstance.js.map +0 -1
  144. package/dist/testertesting/workerManager.js +0 -450
  145. package/dist/testertesting/workerManager.js.map +0 -1
  146. package/dist/testertesting/workerWorkerTestRunner01.js +0 -35
  147. package/dist/testertesting/workerWorkerTestRunner01.js.map +0 -1
  148. package/dist/testing/app.js +0 -18
  149. package/dist/testing/app.js.map +0 -1
  150. package/dist/testing/appConfig.js +0 -93
  151. package/dist/testing/appConfig.js.map +0 -1
  152. package/dist/testing/appTinyEmitter.js +0 -37
  153. package/dist/testing/appTinyEmitter.js.map +0 -1
  154. package/dist/testing/appWorkerWSS.js +0 -151
  155. package/dist/testing/appWorkerWSS.js.map +0 -1
  156. package/dist/testing/appredistest.js +0 -239
  157. package/dist/testing/appredistest.js.map +0 -1
  158. package/dist/testing/appsolo.js +0 -67
  159. package/dist/testing/appsolo.js.map +0 -1
  160. package/dist/testing/promiseTesting.js +0 -77
  161. package/dist/testing/promiseTesting.js.map +0 -1
  162. package/dist/testing/server.js +0 -15
  163. package/dist/testing/server.js.map +0 -1
  164. package/dist/testing/wsevents.js +0 -3
  165. package/dist/testing/wsevents.js.map +0 -1
  166. package/dist/webworkertesting/app.js +0 -44
  167. package/dist/webworkertesting/app.js.map +0 -1
  168. package/dist/webworkertesting/worker.js +0 -21
  169. package/dist/webworkertesting/worker.js.map +0 -1
  170. package/src/authDefs.ts +0 -37
  171. package/src/gRPC/ststest/protos/BUILD +0 -82
  172. package/src/gRPC/ststest/protos/README.md +0 -8
  173. package/src/gRPC/ststest/protos/auth_sample.proto +0 -42
  174. package/src/gRPC/ststest/protos/auth_sample.ts +0 -20
  175. package/src/gRPC/ststest/protos/echo.proto +0 -45
  176. package/src/gRPC/ststest/protos/echo.ts +0 -22
  177. package/src/gRPC/ststest/protos/grpc/examples/echo/Echo.ts +0 -55
  178. package/src/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.ts +0 -10
  179. package/src/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.ts +0 -10
  180. package/src/gRPC/ststest/protos/grpc/testing/Request.ts +0 -12
  181. package/src/gRPC/ststest/protos/grpc/testing/Response.ts +0 -12
  182. package/src/gRPC/ststest/protos/grpc/testing/TestService.ts +0 -27
  183. package/src/gRPC/ststest/protos/hellostreamingworld/HelloReply.ts +0 -10
  184. package/src/gRPC/ststest/protos/hellostreamingworld/HelloRequest.ts +0 -12
  185. package/src/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.ts +0 -23
  186. package/src/gRPC/ststest/protos/hellostreamingworld.proto +0 -39
  187. package/src/gRPC/ststest/protos/hellostreamingworld.ts +0 -18
  188. package/src/gRPC/ststest/protos/helloworld/Greeter.ts +0 -35
  189. package/src/gRPC/ststest/protos/helloworld/HelloReply.ts +0 -10
  190. package/src/gRPC/ststest/protos/helloworld/HelloRequest.ts +0 -10
  191. package/src/gRPC/ststest/protos/helloworld.proto +0 -40
  192. package/src/gRPC/ststest/protos/helloworld.ts +0 -18
  193. package/src/gRPC/ststest/protos/keyvaluestore/KeyValueStore.ts +0 -23
  194. package/src/gRPC/ststest/protos/keyvaluestore/Request.ts +0 -10
  195. package/src/gRPC/ststest/protos/keyvaluestore/Response.ts +0 -10
  196. package/src/gRPC/ststest/protos/keyvaluestore.proto +0 -33
  197. package/src/gRPC/ststest/protos/keyvaluestore.ts +0 -18
  198. package/src/gRPC/ststest/protos/route_guide.proto +0 -111
  199. package/src/gRPC/ststest/protos/route_guide.ts +0 -21
  200. package/src/gRPC/ststest/protos/routeguide/Feature.ts +0 -13
  201. package/src/gRPC/ststest/protos/routeguide/Point.ts +0 -12
  202. package/src/gRPC/ststest/protos/routeguide/Rectangle.ts +0 -13
  203. package/src/gRPC/ststest/protos/routeguide/RouteGuide.ts +0 -58
  204. package/src/gRPC/ststest/protos/routeguide/RouteNote.ts +0 -13
  205. package/src/gRPC/ststest/protos/routeguide/RouteSummary.ts +0 -16
  206. package/src/gRPC/ststest/src/commonTypes.ts +0 -27
  207. package/src/gRPC/ststest/src/greeter_client.ts +0 -52
  208. package/src/gRPC/ststest/src/greeter_server.ts +0 -62
  209. package/src/gRPC/ststest/src/route_guide_client.ts +0 -266
  210. package/src/gRPC/ststest/src/route_guide_server.ts +0 -234
  211. package/src/gRPC/ststest/src/route_guide_server2.ts +0 -211
  212. package/src/influxdb/influxDBManager.ts +0 -334
  213. package/src/influxdb/influxDBManagerAgent.ts +0 -14
  214. package/src/influxdb/influxDBManagerBase.ts +0 -108
  215. package/src/influxdb/influxDBManagerLambda.ts +0 -17
  216. package/src/influxdb/influxDBManagerService.ts +0 -14
  217. package/src/publishInstrumentsWebWorker.ts +0 -157
  218. package/src/tcpclient/app.ts +0 -21
  219. package/src/tcpclient/app2.ts +0 -58
  220. package/src/tcpserver/app.ts +0 -11
  221. package/src/tcpserver/appConfig.ts +0 -99
  222. package/src/tcpserver/appmaster.ts +0 -503
  223. package/src/testertesting/app.ts +0 -349
  224. package/src/testertesting/commonTypes.ts +0 -236
  225. package/src/testertesting/telemetryProcessor.ts +0 -125
  226. package/src/testertesting/testCase01.ts +0 -207
  227. package/src/testertesting/workerInstance.ts +0 -297
  228. package/src/testertesting/workerManager.ts +0 -511
  229. package/src/testertesting/workerWorkerTestRunner01.ts +0 -34
  230. package/src/testing/app.ts +0 -14
  231. package/src/testing/appConfig.ts +0 -110
  232. package/src/testing/appTinyEmitter.ts +0 -57
  233. package/src/testing/appWorkerWSS.ts +0 -174
  234. package/src/testing/appredistest.ts +0 -304
  235. package/src/testing/appsolo.ts +0 -96
  236. package/src/testing/docker-compose.yml +0 -20
  237. package/src/testing/promiseTesting.ts +0 -86
  238. package/src/testing/server.ts +0 -17
  239. package/src/testing/wsevents.ts +0 -33
  240. package/src/webworkertesting/app.ts +0 -56
  241. package/src/webworkertesting/worker.ts +0 -24
  242. package/types/authDefs.d.ts +0 -29
  243. package/types/authDefs.d.ts.map +0 -1
  244. package/types/gRPC/ststest/protos/auth_sample.d.ts +0 -19
  245. package/types/gRPC/ststest/protos/auth_sample.d.ts.map +0 -1
  246. package/types/gRPC/ststest/protos/echo.d.ts +0 -21
  247. package/types/gRPC/ststest/protos/echo.d.ts.map +0 -1
  248. package/types/gRPC/ststest/protos/grpc/examples/echo/Echo.d.ts +0 -43
  249. package/types/gRPC/ststest/protos/grpc/examples/echo/Echo.d.ts.map +0 -1
  250. package/types/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.d.ts +0 -7
  251. package/types/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.d.ts.map +0 -1
  252. package/types/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.d.ts +0 -7
  253. package/types/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.d.ts.map +0 -1
  254. package/types/gRPC/ststest/protos/grpc/testing/Request.d.ts +0 -9
  255. package/types/gRPC/ststest/protos/grpc/testing/Request.d.ts.map +0 -1
  256. package/types/gRPC/ststest/protos/grpc/testing/Response.d.ts +0 -9
  257. package/types/gRPC/ststest/protos/grpc/testing/Response.d.ts.map +0 -1
  258. package/types/gRPC/ststest/protos/grpc/testing/TestService.d.ts +0 -21
  259. package/types/gRPC/ststest/protos/grpc/testing/TestService.d.ts.map +0 -1
  260. package/types/gRPC/ststest/protos/hellostreamingworld/HelloReply.d.ts +0 -7
  261. package/types/gRPC/ststest/protos/hellostreamingworld/HelloReply.d.ts.map +0 -1
  262. package/types/gRPC/ststest/protos/hellostreamingworld/HelloRequest.d.ts +0 -9
  263. package/types/gRPC/ststest/protos/hellostreamingworld/HelloRequest.d.ts.map +0 -1
  264. package/types/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.d.ts +0 -17
  265. package/types/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.d.ts.map +0 -1
  266. package/types/gRPC/ststest/protos/hellostreamingworld.d.ts +0 -17
  267. package/types/gRPC/ststest/protos/hellostreamingworld.d.ts.map +0 -1
  268. package/types/gRPC/ststest/protos/helloworld/Greeter.d.ts +0 -27
  269. package/types/gRPC/ststest/protos/helloworld/Greeter.d.ts.map +0 -1
  270. package/types/gRPC/ststest/protos/helloworld/HelloReply.d.ts +0 -7
  271. package/types/gRPC/ststest/protos/helloworld/HelloReply.d.ts.map +0 -1
  272. package/types/gRPC/ststest/protos/helloworld/HelloRequest.d.ts +0 -7
  273. package/types/gRPC/ststest/protos/helloworld/HelloRequest.d.ts.map +0 -1
  274. package/types/gRPC/ststest/protos/helloworld.d.ts +0 -17
  275. package/types/gRPC/ststest/protos/helloworld.d.ts.map +0 -1
  276. package/types/gRPC/ststest/protos/keyvaluestore/KeyValueStore.d.ts +0 -17
  277. package/types/gRPC/ststest/protos/keyvaluestore/KeyValueStore.d.ts.map +0 -1
  278. package/types/gRPC/ststest/protos/keyvaluestore/Request.d.ts +0 -7
  279. package/types/gRPC/ststest/protos/keyvaluestore/Request.d.ts.map +0 -1
  280. package/types/gRPC/ststest/protos/keyvaluestore/Response.d.ts +0 -7
  281. package/types/gRPC/ststest/protos/keyvaluestore/Response.d.ts.map +0 -1
  282. package/types/gRPC/ststest/protos/keyvaluestore.d.ts +0 -17
  283. package/types/gRPC/ststest/protos/keyvaluestore.d.ts.map +0 -1
  284. package/types/gRPC/ststest/protos/route_guide.d.ts +0 -20
  285. package/types/gRPC/ststest/protos/route_guide.d.ts.map +0 -1
  286. package/types/gRPC/ststest/protos/routeguide/Feature.d.ts +0 -10
  287. package/types/gRPC/ststest/protos/routeguide/Feature.d.ts.map +0 -1
  288. package/types/gRPC/ststest/protos/routeguide/Point.d.ts +0 -9
  289. package/types/gRPC/ststest/protos/routeguide/Point.d.ts.map +0 -1
  290. package/types/gRPC/ststest/protos/routeguide/Rectangle.d.ts +0 -10
  291. package/types/gRPC/ststest/protos/routeguide/Rectangle.d.ts.map +0 -1
  292. package/types/gRPC/ststest/protos/routeguide/RouteGuide.d.ts +0 -46
  293. package/types/gRPC/ststest/protos/routeguide/RouteGuide.d.ts.map +0 -1
  294. package/types/gRPC/ststest/protos/routeguide/RouteNote.d.ts +0 -10
  295. package/types/gRPC/ststest/protos/routeguide/RouteNote.d.ts.map +0 -1
  296. package/types/gRPC/ststest/protos/routeguide/RouteSummary.d.ts +0 -13
  297. package/types/gRPC/ststest/protos/routeguide/RouteSummary.d.ts.map +0 -1
  298. package/types/gRPC/ststest/src/commonTypes.d.ts +0 -23
  299. package/types/gRPC/ststest/src/commonTypes.d.ts.map +0 -1
  300. package/types/gRPC/ststest/src/greeter_client.d.ts +0 -3
  301. package/types/gRPC/ststest/src/greeter_client.d.ts.map +0 -1
  302. package/types/gRPC/ststest/src/greeter_server.d.ts +0 -3
  303. package/types/gRPC/ststest/src/greeter_server.d.ts.map +0 -1
  304. package/types/gRPC/ststest/src/route_guide_client.d.ts +0 -3
  305. package/types/gRPC/ststest/src/route_guide_client.d.ts.map +0 -1
  306. package/types/gRPC/ststest/src/route_guide_server.d.ts +0 -3
  307. package/types/gRPC/ststest/src/route_guide_server.d.ts.map +0 -1
  308. package/types/gRPC/ststest/src/route_guide_server2.d.ts +0 -3
  309. package/types/gRPC/ststest/src/route_guide_server2.d.ts.map +0 -1
  310. package/types/influxdb/influxDBManager.d.ts +0 -21
  311. package/types/influxdb/influxDBManager.d.ts.map +0 -1
  312. package/types/influxdb/influxDBManagerAgent.d.ts +0 -8
  313. package/types/influxdb/influxDBManagerAgent.d.ts.map +0 -1
  314. package/types/influxdb/influxDBManagerBase.d.ts +0 -14
  315. package/types/influxdb/influxDBManagerBase.d.ts.map +0 -1
  316. package/types/influxdb/influxDBManagerLambda.d.ts +0 -11
  317. package/types/influxdb/influxDBManagerLambda.d.ts.map +0 -1
  318. package/types/influxdb/influxDBManagerService.d.ts +0 -8
  319. package/types/influxdb/influxDBManagerService.d.ts.map +0 -1
  320. package/types/publishInstrumentsWebWorker.d.ts +0 -1
  321. package/types/publishInstrumentsWebWorker.d.ts.map +0 -1
  322. package/types/server.d.ts.map +0 -1
  323. package/types/socketIoServerHelper.d.ts +0 -20
  324. package/types/socketIoServerHelper.d.ts.map +0 -1
  325. package/types/tcpclient/app.d.ts +0 -2
  326. package/types/tcpclient/app.d.ts.map +0 -1
  327. package/types/tcpclient/app2.d.ts +0 -2
  328. package/types/tcpclient/app2.d.ts.map +0 -1
  329. package/types/tcpserver/app.d.ts +0 -2
  330. package/types/tcpserver/app.d.ts.map +0 -1
  331. package/types/tcpserver/appConfig.d.ts +0 -3
  332. package/types/tcpserver/appConfig.d.ts.map +0 -1
  333. package/types/tcpserver/appmaster.d.ts +0 -24
  334. package/types/tcpserver/appmaster.d.ts.map +0 -1
  335. package/types/testertesting/app.d.ts +0 -2
  336. package/types/testertesting/app.d.ts.map +0 -1
  337. package/types/testertesting/commonTypes.d.ts +0 -215
  338. package/types/testertesting/commonTypes.d.ts.map +0 -1
  339. package/types/testertesting/telemetryProcessor.d.ts +0 -6
  340. package/types/testertesting/telemetryProcessor.d.ts.map +0 -1
  341. package/types/testertesting/testCase01.d.ts +0 -20
  342. package/types/testertesting/testCase01.d.ts.map +0 -1
  343. package/types/testertesting/workerInstance.d.ts +0 -23
  344. package/types/testertesting/workerInstance.d.ts.map +0 -1
  345. package/types/testertesting/workerManager.d.ts +0 -16
  346. package/types/testertesting/workerManager.d.ts.map +0 -1
  347. package/types/testertesting/workerWorkerTestRunner01.d.ts +0 -7
  348. package/types/testertesting/workerWorkerTestRunner01.d.ts.map +0 -1
  349. package/types/testing/app.d.ts +0 -2
  350. package/types/testing/app.d.ts.map +0 -1
  351. package/types/testing/appConfig.d.ts +0 -3
  352. package/types/testing/appConfig.d.ts.map +0 -1
  353. package/types/testing/appTinyEmitter.d.ts +0 -2
  354. package/types/testing/appTinyEmitter.d.ts.map +0 -1
  355. package/types/testing/appWorkerWSS.d.ts +0 -26
  356. package/types/testing/appWorkerWSS.d.ts.map +0 -1
  357. package/types/testing/appredistest.d.ts +0 -4
  358. package/types/testing/appredistest.d.ts.map +0 -1
  359. package/types/testing/appsolo.d.ts +0 -3
  360. package/types/testing/appsolo.d.ts.map +0 -1
  361. package/types/testing/promiseTesting.d.ts +0 -4
  362. package/types/testing/promiseTesting.d.ts.map +0 -1
  363. package/types/testing/server.d.ts +0 -6
  364. package/types/testing/server.d.ts.map +0 -1
  365. package/types/testing/wsevents.d.ts +0 -18
  366. package/types/testing/wsevents.d.ts.map +0 -1
  367. package/types/webworkertesting/app.d.ts +0 -2
  368. package/types/webworkertesting/app.d.ts.map +0 -1
  369. package/types/webworkertesting/worker.d.ts +0 -2
  370. package/types/webworkertesting/worker.d.ts.map +0 -1
@@ -1,57 +0,0 @@
1
- /* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
2
- /* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF
3
- import { TinyEmitter } from "tiny-emitter";
4
-
5
- class aaa extends TinyEmitter {
6
-
7
-
8
- }
9
-
10
-
11
- const x = new TinyEmitter();
12
-
13
- const OutputString = (str: string) => {
14
- console.log(`[${str}]`);
15
- }
16
-
17
- x.on('event1', () => {
18
- console.log('event1');
19
- });
20
-
21
- x.on('event2', (str: string) => {
22
- console.log(`event2 [${str}]`);
23
- });
24
-
25
- x.on('event3', OutputString);
26
-
27
- x.emit('event1');
28
- x.emit('event2', 'Hello 2 World 2');
29
- x.emit('event3', 'Hello 3 World 3');
30
-
31
-
32
-
33
- x.off('event1', (a: string, b: number, c: number) => {
34
-
35
- });
36
- x.off('event2', (str: string) => {
37
- console.log(`event2 [${str}]`);
38
- });
39
- x.off('event3', OutputString);
40
-
41
-
42
-
43
-
44
- x.emit('event1');
45
- x.emit('event2', 'Hello 2 World 2');
46
- x.emit('event3', 'Hello 3 World 3');
47
-
48
-
49
-
50
- x.off('event1');
51
- x.off('event2');
52
- x.off('event3');
53
-
54
-
55
- x.emit('event1');
56
- x.emit('event2', 'Hello 2 World 2');
57
- x.emit('event3', 'Hello 3 World 3');
@@ -1,174 +0,0 @@
1
- /* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
2
- import cluster from 'node:cluster';
3
-
4
- import chalk from 'chalk';
5
-
6
- import { WorkerProcessBase, STSNamespace, STSRoom, SocketIoServerHelper, STSSocketIONamespace, ProcessOptions } from './../index'
7
-
8
- //import { Socket, Namespace } from "socket.io";
9
- import { Socket } from "socket.io";
10
-
11
- import { InterServerEvents } from './../commonTypes'
12
-
13
- import { ClientToServerEvents, ServerToClientEvents } from './wsevents'
14
-
15
- export enum InstrumentManagerEventName {
16
- CONNECT = 'connect', //@@ should come from socketiohelper
17
-
18
- SUBSCRIBE = 'stsInstrumentManager-Subscribe',
19
- UNSUBSCRIBE = 'stsInstrumentManager-Unsubscribe',
20
- SUBSCRIBE_KEEP_ALIVE = 'stsInstrumentManager-Subscribe-KeepAlive'
21
- }
22
-
23
- export interface IIPCSocketMessage {
24
- socketId: string
25
- workerId: number
26
-
27
- data: any
28
- }
29
-
30
- export enum InstrumentManagerSubCommand {
31
- OUTPUT_SUBSCRIPTION = 'stsInstrumentManager-OutputSubscriptions'
32
- }
33
-
34
- export enum IPCCommands {
35
- PUBLISH_INSTRUMENT_DATA = 'PUBLISH_INSTRUMENT_DATA'
36
- }
37
-
38
- export class WorkerProcess extends WorkerProcessBase
39
- {
40
- constructor(options: ProcessOptions)
41
- {
42
- super(options);
43
-
44
- //this.socketIoHelper = new SocketIoHelper(this as IProcessBase);
45
-
46
- // Use ClientToServerEvents<true> when the client will pass a request to server with a call back expected with a timeout
47
- //@@this.socketIoServerHelper = new SocketIoServerHelper<ClientToServerEvents<true>, ServerToClientEvents>({
48
- this.socketIoServerHelper = new SocketIoServerHelper<ClientToServerEvents, ServerToClientEvents>({
49
- logger: this.options.logger
50
- });
51
- }
52
-
53
- #LogErrorMessage(message: any) {
54
- this.options.logger.error(message);
55
- }
56
-
57
- #LogInfoMessage(message: any) {
58
- this.options.logger.info(message);
59
- }
60
-
61
-
62
- ReceivedMessageFromMaster = async (messageData: any) => {
63
- // Only response to these message types (note should be part of generic pub/sub pattern in framework)
64
- if (messageData.subCommand) {
65
- if (messageData.subCommand.localeCompare(InstrumentManagerSubCommand.OUTPUT_SUBSCRIPTION) === 0) {
66
- //this.#LogInfoMessage(chalk.gray(`WorkerProcess.ReceivedMessageFromMaster: messageData: [${JSON.stringify(messageData)}]`));
67
- this.#LogInfoMessage(chalk.gray(`WorkerProcess.ReceivedMessageFromMaster`));
68
- const { socketId, workerId } = messageData; //@@ type
69
-
70
- if (cluster.worker && cluster.worker.id !== workerId) {
71
- // Invalid data - this workerId must match
72
- this.#LogInfoMessage(chalk.red(`WorkerProcess.ReceivedMessageFromMaster: Invalid workerId: [${workerId}]. Should have been: [${cluster.worker.id}].`));
73
- } else {
74
- const workerProcess: WorkerProcess = this as WorkerProcess;
75
- if (workerProcess.stsMonitorNamespace !== null) {
76
- const stsMonitorNamespace = workerProcess.stsMonitorNamespace.socketionamespace;
77
- const sockets = await stsMonitorNamespace.fetchSockets();
78
- for (const socket of sockets) {
79
- if (socket.id.localeCompare(socketId) === 0) {
80
- this.#LogInfoMessage(chalk.green(`WorkerProcess.ReceivedMessageFromMaster: Sending payload to subscribed client.`));
81
-
82
- //socket.emit(STSEvent.STSSubInstrumentData as any, model);
83
- return;
84
- }
85
- }
86
- this.#LogInfoMessage(chalk.red(`WorkerProcess.ReceivedMessageFromMaster: Invalid socketId. Expecting socket to existing in socket namespace collection.`));
87
- // Invalid - could not find matching socketid to send to
88
- } else {
89
- this.#LogInfoMessage(chalk.red(`WorkerProcess.ReceivedMessageFromMaster: Invalid workerProcess.stsMonitorNamespace is null. Expecting non-null value.`));
90
- }
91
- }
92
- }
93
- }
94
- }
95
-
96
- #SendIPCMessageToMaster(socket: Socket, eventName: any, data: any): void {
97
- try {
98
- if (cluster.worker) {
99
- this.#LogInfoMessage(chalk.gray(`WorkerProcess.#SendIPCMessageToMaster: eventName: [${eventName}]`));
100
- const payload: IIPCSocketMessage = {
101
- socketId: socket.id,
102
- workerId: cluster.worker.id,
103
- data: data
104
- }
105
- //this.#LogInfoMessage(chalk.gray(`WorkerProcess.#SendIPCMessageToMaster: payload: [${JSON.stringify(payload)}]`));
106
- this.#LogInfoMessage(chalk.gray(`WorkerProcess.#SendIPCMessageToMaster`));
107
- (process as any).send( { command: eventName, payload }, null, { swallowErrors: true }, (error: any) => {
108
- if (error) {
109
- this.#LogErrorMessage(chalk.red(`Error with WorkerProcess:SendIPCMessageToMaster(1): [${error}]`));
110
- }
111
- });
112
- }
113
- } catch (error) {
114
- this.#LogErrorMessage(chalk.red(`Error with WorkerProcess:SendIPCMessageToMaster(2): [${error}]`));
115
- }
116
- }
117
-
118
- WorkerStarted(): any
119
- {
120
- //let socketIoNamespace: Namespace<ClientToServerEvents, ServerToClientEvents, InterServerEvents> | null = null;
121
- if (this.socketIoServerHelper) {
122
- //socketIoNamespace = this.socketIoServerHelper.SetupNamespace(this.io as any, STSNamespace.STSMonitor,
123
- this.socketIoServerHelper.SetupNamespace(this.io as any, STSNamespace.STSMonitor,
124
- // Auto joinn room list
125
- [
126
- STSRoom.STSInstrumentDataRoom,
127
- STSRoom.STSRunnerRoom,
128
- 'room3'
129
- ],
130
- true, // Make any connecting client automatically join the room list above
131
-
132
- // Connect call back when a client connects
133
- (socket: Socket<ClientToServerEvents, ServerToClientEvents, InterServerEvents>) => {
134
- this.#LogInfoMessage(chalk.gray(`WorkerProcess.#SendIPCMessageToMaster: Id: [${socket.id}] eventName: [${InstrumentManagerEventName.CONNECT}]`));
135
- },
136
-
137
- // Custom client to server events
138
- (socket: Socket<ClientToServerEvents, ServerToClientEvents, InterServerEvents>) => {
139
- socket.on('subscribe', (data: any) => {
140
- this.#SendIPCMessageToMaster(socket, 'subscribe', data)
141
- socket.emit('subscribeAck', data);
142
- });
143
- socket.on('unsubscribe', (data: any) => {
144
- this.#SendIPCMessageToMaster(socket, 'unsubscribe', data)
145
- socket.emit('unsubscribeAck', data);
146
- });
147
- socket.on('subscribeKeepAlive', (data: any) => {
148
- this.#SendIPCMessageToMaster(socket, 'subscribeKeepAlive', data)
149
- socket.emit('subscribeKeepAliveAck', data);
150
- });
151
- socket.on('done', () => {
152
- this.#SendIPCMessageToMaster(socket, 'done', {})
153
- socket.emit('doneAck');
154
- });
155
- socket.on('compute', (arg: number, cb) => {
156
- const res = arg * 2;
157
- cb(res.toString());
158
- });
159
- socket.on('compute2', (arg, cb) => {
160
- cb({data: arg*2});
161
- });
162
- })
163
- } else {
164
- throw new Error('WorkerProcess:WorkerStarted(): this.socketIoHelper is null')
165
- }
166
- }
167
-
168
- get stsMonitorNamespace(): STSSocketIONamespace | null {
169
- if (this.socketIoServerHelper !== null) {
170
- return this.socketIoServerHelper.GetSTSSocketIONamespace(STSNamespace.STSMonitor);
171
- }
172
- return null;
173
- }
174
- }
@@ -1,304 +0,0 @@
1
- /* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF
2
- /* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF
3
-
4
- // Start stack server w/out persistence
5
- //
6
- // docker stop redis-stack-server
7
- // docker rm redis-stack-server
8
- // docker run -d --restart unless-stopped --name redis-stack-server -p 6379:6379 -e REDIS_ARGS="--save \"\"" -e REDIS_ARGS="--appendonly no" redis/redis-stack-server:latest
9
- // docker run -d --restart unless-stopped --name redis-stack-server -p 6379:6379 -e REDIS_ARGS="--save \"\" --appendonly no" redis/redis-stack-server:latest
10
- //
11
- // docker stop redis-stack-server; docker rm redis-stack-server; docker run -d --restart unless-stopped --name redis-stack-server -v `pwd`/local-redis-stack.conf:/redis-stack.conf -p 6379:6379 redis/redis-stack-server:latest
12
-
13
- // get the config
14
-
15
- // FT.SEARCH idx3 "@eventtime:[-inf 18288]" SORTBY eventtime LIMIT 0 3
16
- // FT.AGGREGATE idx:rawDataHash "@duration:[-inf 10]" GROUPBY 1 @level2 REDUCE COUNT 0 AS 'B10'
17
- // FT.AGGREGATE idx:rawDataHash "@duration:[-inf 10]" GROUPBY 1 @level4 REDUCE COUNT 0 AS 'B10' SORTBY 1 @level4 LIMIT 0 50
18
- // For the normal counts and averages
19
- // FT.AGGREGATE idx:rawDataHash2 "*" GROUPBY 1 @level2 REDUCE SUM 1 @coreCount REDUCE SUM 1 @duration REDUCE SUM 1 @latency REDUCE SUM 1 @cpu
20
- // FT.AGGREGATE idx:rawDataHash2 '@level2:stsauth' GROUPBY 1 @level2 REDUCE SUM 1 @coreCount REDUCE SUM 1 @duration REDUCE SUM 1 @latency REDUCE SUM 1 @cpu
21
- // FT.AGGREGATE idx:lambdaIndexInstant GROUPBY 1 @level2 REDUCE SUM 1 @coreCount REDUCE SUM 1 @duration REDUCE SUM 1 @latency REDUCE SUM 1 @cpu
22
- // FT.SEARCH idx:lambdaIndexInstant LIMIT 0 3
23
-
24
- // FT.SEARCH redistestindex01 "*"
25
- // FT.AGGREGATE redistestindex01 "*" GROUPBY 0 REDUCE SUM 1 @count AS 'The_Count'
26
- // FT.AGGREGATE redistestindex01 "*" GROUPBY 2 @month @week REDUCE SUM 1 @count AS 'The_Count' SORTBY 4 @month ASC @week ASC
27
- // FT.SEARCH redistestindex01 "*"
28
- // FT.AGGREGATE redistestindex01 "*" GROUPBY 3 @field1 @field2 @field3 REDUCE COUNT 0 AS 'The_Count' SORTBY 6 @field1 ASC @field2 ASC @field3 ASC
29
-
30
- // FT.SEARCH redistestindex01 "@field1:1 @field2:1 @field3:1 @field4:1 @field5:1" LIMIT 1 1
31
- // FT.AGGREGATE redistestindex01 "@field1:1" GROUPBY 3 @field1 @field2 @field3 REDUCE COUNT 0 AS 'The_Count' SORTBY 6 @field1 ASC @field2 ASC @field3 ASC
32
- // FT.AGGREGATE redistestindex01 "@field1:1 @field2:1 @field3:1" GROUPBY 3 @field1 @field2 @field3 REDUCE COUNT 0 AS 'The_Count' SORTBY 6 @field1 ASC @field2 ASC @field3 ASC
33
-
34
- // Settings
35
- // --------
36
- // Below appears to fix slow queries
37
- // FT.CONFIG SET TIMEOUT 0
38
- //
39
- // FT.CONFIG SET MAXSEARCHRESULTS 1000000
40
- // FT.CONFIG SET MAXAGGREGATERESULTS 1000000
41
-
42
- import { } from 'redis';
43
- import { SchemaFieldTypes, createClient, RedisClientType, AggregateSteps, AggregateGroupByReducers } from 'redis';
44
- import crypto from 'crypto';
45
-
46
- import chalk from 'chalk';
47
- import { JSONObject } from '@nsshunt/stsutils';
48
-
49
- const indexName = `redistestindex01`;
50
- const maxPromArrayRecords = 500;
51
- const maxQueryLoops = 10000;
52
-
53
- let minRecords = 0;
54
- let maxRecords = 1000;
55
- let mode = 0;
56
-
57
- function getRandomNumber(max: number) {
58
- const array = new Uint32Array(1);
59
- crypto.webcrypto.getRandomValues(array);
60
- return array[0] % max; // The % operator ensures the value is between 0 and 1000
61
- }
62
-
63
- function getRandomString(min: number, max: number) {
64
- const charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
65
- let result = '';
66
- const length = min + getRandomNumber(max-min);
67
- const values = new Uint32Array(length);
68
- crypto.webcrypto.getRandomValues(values);
69
- for (let i = 0; i < length; i++) {
70
- result += charset[values[i] % charset.length];
71
- }
72
- return result;
73
- }
74
-
75
- const CreateIndex = async (redis: RedisClientType) => {
76
- try {
77
- const retVal = await redis.ft.dropIndex(indexName);
78
- console.log(retVal);
79
- } catch (error) {
80
- console.log(chalk.red(error))
81
- }
82
-
83
- try {
84
- const retVal = await redis.ft.create(indexName, { // serviceIndexInstant
85
- 'orderno': { type: SchemaFieldTypes.NUMERIC, SORTABLE: true },
86
- //'orderdate': { type: SchemaFieldTypes.NUMERIC , SORTABLE: true },
87
- //'notes': { type: SchemaFieldTypes.TEXT, NOINDEX: true },
88
- 'notes': { type: SchemaFieldTypes.TEXT },
89
- 'field1': { type: SchemaFieldTypes.TEXT }, // The fields need to be sortable to be used in group by aggregations
90
- 'field2': { type: SchemaFieldTypes.TEXT },
91
- 'field3': { type: SchemaFieldTypes.TEXT },
92
- 'field4': { type: SchemaFieldTypes.TEXT },
93
- 'field5': { type: SchemaFieldTypes.TEXT },
94
- 'aggfield': { type: SchemaFieldTypes.TEXT },
95
- 'field1num': { type: SchemaFieldTypes.NUMERIC }, // The fields need to be sortable to be used in group by aggregations
96
- 'field2num': { type: SchemaFieldTypes.NUMERIC },
97
- 'field3num': { type: SchemaFieldTypes.NUMERIC },
98
- 'field4num': { type: SchemaFieldTypes.NUMERIC },
99
- 'field5num': { type: SchemaFieldTypes.NUMERIC },
100
- 'day': { type: SchemaFieldTypes.NUMERIC, SORTABLE: true },
101
- 'week': { type: SchemaFieldTypes.NUMERIC, SORTABLE: true },
102
- 'month': { type: SchemaFieldTypes.NUMERIC, SORTABLE: true },
103
- 'count': { type: SchemaFieldTypes.NUMERIC, NOINDEX: true }
104
- }, {
105
- ON: 'HASH',
106
- PREFIX: 'orders:'
107
- });
108
- console.log(retVal);
109
- } catch (error) {
110
- console.log(chalk.red(error))
111
- }
112
- }
113
-
114
- const BuildData = async (redis: RedisClientType) => {
115
-
116
- let promArray: Promise<any>[] = [ ];
117
-
118
- for (let i=minRecords; i < maxRecords; i++) {
119
-
120
- const record = {
121
- orderno: i,
122
- orderdate: new Date().getTime(),
123
- notes: `Notes for index ${i}`,
124
- rndtextsmall: `${getRandomString(5, 20)}`,
125
- rndtextmedium: `${getRandomString(20, 40)}`,
126
- rndtextlarge: `${getRandomString(40, 80)}`,
127
- field1: `${i % 10}`,
128
- field2: `${i % 100}`,
129
- field3: `${i % 1000}`,
130
- field4: `${i % 10000}`,
131
- field5: `${i % 100000}`,
132
- aggfield: `${i % 10}_${i % 100}_${i % 1000}_${i % 10000}_${i % 100000}`,
133
- field1num: i % 10,
134
- field2num: i % 100,
135
- field3num: i % 1000,
136
- field4num: i % 10000,
137
- field5num: i % 100000,
138
- count: i,
139
- day: (i % 365),
140
- month: (i % 12),
141
- week: (i % 52)
142
- } as any;
143
-
144
- promArray.push(redis.HSET(`orders:${i}`, record));
145
-
146
- if (promArray.length === maxPromArrayRecords) {
147
- await Promise.all(promArray);
148
- promArray = [ ];
149
- console.log(i);
150
- }
151
- }
152
-
153
- if (promArray.length > 0) {
154
- await Promise.all(promArray);
155
- promArray = [ ];
156
- }
157
- }
158
-
159
- const SearchBy = async (redis: RedisClientType, iterations: number, query: (index: number) => string, sort?: () => JSONObject) => {
160
- let getrandomstart;
161
- let getrandomend;
162
- let getrandomtotal = 0;
163
-
164
- console.log(chalk.magenta(`Search By: [${query(0)}]`));
165
-
166
- const start = performance.now();
167
- for (let i=0; i < iterations; i++) {
168
-
169
- getrandomstart = performance.now();
170
- const randomIndex = minRecords + getRandomNumber(maxRecords - minRecords);
171
- getrandomend = performance.now();
172
- getrandomtotal += (getrandomend - getrandomstart);
173
-
174
- const queryOptions = {
175
- RETURN: [ 'orderno', 'orderdate', 'notes', 'field1', 'field2', 'field3', 'field4', 'field5', 'aggfield' ],
176
- LIMIT: {
177
- from: 0,
178
- size: 100
179
- }
180
- } as any;
181
-
182
- if (sort) {
183
- queryOptions.SORTBY = sort();
184
- }
185
-
186
- const retVal = await redis.ft.search(indexName, `${query(randomIndex)}`, queryOptions);
187
-
188
- if (i % 1000 === 0) {
189
- console.log(JSON.stringify(retVal));
190
- }
191
- }
192
- const end = performance.now();
193
- const diff = end - start;
194
- console.log(chalk.green(`Total time to query: [${iterations}] times with [${maxRecords}] records total = [${diff}ms]`));
195
- console.log(chalk.yellow(`Total time to generate random numbers: [${getrandomtotal}]`));
196
- }
197
-
198
- const Query = async (redis: RedisClientType) => {
199
- /*
200
- await SearchBy(redis, maxQueryLoops, index => `@notes:index ${index}`);
201
-
202
- await SearchBy(redis, maxQueryLoops, index => `@orderno:[${index} ${index + 5}]`, () => {
203
- return {
204
- BY: 'orderno',
205
- DIRECTION: 'DESC'
206
- }});
207
-
208
- await SearchBy(redis, 1, index => `@notes:index 1900000*`, () => {
209
- return {
210
- BY: 'orderno',
211
- DIRECTION: 'DESC'
212
- }});
213
-
214
- await SearchBy(redis, maxQueryLoops, index => `@field1:1 @field2:41 @field3:941 @field4:9941 @field5:19941 @orderno:[919941 919941]`);
215
- //await SearchBy(redis, maxQueryLoops, index => `@orderno:919941`);
216
-
217
- await SearchBy(redis, maxQueryLoops, index => `@aggfield:1_41_941_9941_19941 @orderno:[919941 919941]`);
218
-
219
-
220
- */
221
-
222
-
223
- /*
224
- for (let i=0; i < fieldList.length; i++) {
225
- if (fieldList[i].dataType.localeCompare('JSON') === 0) {
226
- aggregateList.push({ type: AggregateGroupByReducers.FIRST_VALUE, property: `@${fieldList[i].fieldName}`, AS: fieldList[i].fieldName });
227
- } else {
228
- aggregateList.push({ type: AggregateGroupByReducers.SUM, property: `@${fieldList[i].fieldName}`, AS: fieldList[i].fieldName });
229
- }
230
- }
231
- */
232
-
233
- const retVal = await redis.ft.aggregate(indexName, "*", {
234
- STEPS: [
235
- {
236
- type: AggregateSteps.GROUPBY,
237
- properties: [`@field1num`, `@field2num`],
238
- REDUCE: [
239
- {
240
- type: AggregateGroupByReducers.COUNT_DISTINCT,
241
- property: '@count',
242
- AS: 'My_Count'
243
- },
244
- ]
245
- },
246
- {
247
- type: AggregateSteps.SORTBY,
248
- BY: [
249
- {
250
- BY: '@field1num',
251
- DIRECTION: 'ASC'
252
- },
253
- {
254
- BY: '@field2num',
255
- DIRECTION: 'ASC'
256
- }
257
- ]
258
- },
259
- {
260
- type: AggregateSteps.LIMIT,
261
- from: 0,
262
- size: 5
263
- }
264
- ]
265
- });
266
- console.log(retVal);
267
- }
268
-
269
- const RunThis = async () => {
270
-
271
- //const redis = await createClient({url: goptions.imRedisMessageProcessorUrl })
272
- const redis: RedisClientType = await createClient()
273
- .on('error', error => console.log(chalk.red(error)))
274
- .connect() as any
275
-
276
- switch (mode) {
277
- case 0 :
278
- await CreateIndex(redis);
279
- break;
280
- case 1 :
281
- await BuildData(redis);
282
- break;
283
- case 2 :
284
- await Query(redis);
285
- break;
286
- }
287
-
288
- //redis.quit();
289
- redis.disconnect();
290
-
291
- console.log(`Done....`);
292
- }
293
-
294
- const args = process.argv.slice(2);
295
-
296
- if (args.length !== 3) {
297
- console.log('needs mode, min and max on command line. mode = 0 - create new index, 1 - build entries, 2 - query only')
298
- console.log(args);
299
- } else {
300
- mode = parseInt(args[0]);
301
- minRecords = parseInt(args[1]);
302
- maxRecords = parseInt(args[2]);
303
- RunThis();
304
- }
@@ -1,96 +0,0 @@
1
- /* eslint @typescript-eslint/no-explicit-any: 0, @typescript-eslint/no-unused-vars: 0 */ // --> OFF
2
-
3
- import fs from 'node:fs'
4
- import chalk from 'chalk';
5
-
6
- const oldResTx: number[] = []
7
- const oldResRx: number[] = []
8
-
9
- const newResRx: number[] = []
10
- const newResTx: number[] = []
11
-
12
- const LogInfoMessage = (message: any) => console.log(message)
13
- const LogErrorMessage = (message: any) => console.error(message)
14
-
15
- function getNetworkUsage(pidArray: number[]) {
16
- try {
17
-
18
- LogInfoMessage(chalk.white.bgCyan.bold('Hello World'));
19
-
20
- for (let i=0; i < pidArray.length; i++) {
21
-
22
- const pid = pidArray[i];
23
-
24
- const filePath = `/proc/${pid}/net/dev`;
25
- //const filePath = `/proc/${pid}/net/netstat`;
26
-
27
- // Read the contents of the /proc/[pid]/net/dev file
28
- const content = fs.readFileSync(filePath, 'utf8');
29
-
30
- // Process the content to extract relevant information
31
- const lines = content.trim().split('\n');
32
-
33
-
34
- //this.#LogInfoMessage(lines[3]);
35
-
36
-
37
- const headers1 = lines[0].split('|').map(header => header.trim());
38
- const headers2 = lines[1].split('|').map(header => header.trim());
39
- const data1 = lines[2].split('|').map(value => value.trim());
40
- const data2 = lines[3].split(':').map(value => value.trim());
41
-
42
- const uint8Array = Buffer.from(data2[1], 'utf-8');
43
-
44
- const mystr = data2[1];
45
-
46
- const result = mystr.replace(/\s+/g, ' ').trim().split(' ');
47
-
48
- //this.#LogInfoMessage(`${result}`);
49
-
50
- newResRx[i] = parseFloat(result[0]);
51
- newResTx[i] = parseFloat(result[8]);
52
-
53
- LogInfoMessage(`${pid} ${i}: ${newResRx[i]} ${newResTx[i]} : ${(newResRx[i] - oldResRx[i])/1000000.0} ${(newResTx[i] - oldResTx[i])/1000000.0}`);
54
-
55
- oldResTx[i] = newResTx[i];
56
- oldResRx[i] = newResRx[i];
57
-
58
- //this.#LogInfoMessage(uint8Array);
59
-
60
- //this.#LogInfoMessage(data2[1].split('\t'));
61
-
62
- // Find the index of the relevant network statistics (e.g., bytes received and transmitted)
63
- //const rxIndex = headers.indexOf('Receive');
64
- //const txIndex = headers.indexOf('Transmit');
65
-
66
-
67
- // Display network usage information
68
- /*
69
- this.#LogInfoMessage(`Network Usage for Process ${pid}:`);
70
- this.#LogInfoMessage(` Incoming: ${data[rxIndex]} bytes`);
71
- this.#LogInfoMessage(` Outgoing: ${data[txIndex]} bytes`);
72
- */
73
- }
74
- } catch (error) {
75
- LogErrorMessage(`Error reading file: [${error}]`);
76
- }
77
- }
78
-
79
- setInterval(function() {
80
- /*
81
- si.networkStats().then(data => {
82
- this.#LogInfoMessage(data);
83
- });
84
- */
85
-
86
- getNetworkUsage([ 523493, 523552, 523553, 523554]);
87
-
88
- //this.#LogInfoMessage(process.pid)
89
-
90
- //getNetworkUsage()
91
-
92
- }, 1000)
93
-
94
- export {
95
-
96
- }
@@ -1,20 +0,0 @@
1
- version: '2'
2
- services:
3
- zookeeper:
4
- image: wurstmeister/zookeeper
5
- ports:
6
- - "2181:2181"
7
- restart: unless-stopped
8
-
9
- kafka:
10
- image: wurstmeister/kafka
11
- ports:
12
- - "9092:9092"
13
- environment:
14
- DOCKER_API_VERSION: 1.22
15
- KAFKA_ADVERTISED_HOST_NAME: 192.168.14.92
16
- KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
17
- KAFKA_CREATE_TOPICS: "topic-name2:3:1"
18
- volumes:
19
- - /var/run/docker.sock:/var/run/docker.sock
20
- restart: unless-stopped