@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.
- package/dist/commonTypes.js.map +1 -1
- package/dist/index.js +1 -7
- package/dist/index.js.map +1 -1
- package/dist/serverprocessbase.js +2 -2
- package/dist/serverprocessbase.js.map +1 -1
- package/dist/stscontrollerbase.js.map +1 -1
- package/dist/{server.js → stsexpressserver.js} +1 -1
- package/dist/stsexpressserver.js.map +1 -0
- package/dist/stslatencycontroller.js.map +1 -1
- package/dist/stslatencyroute.js.map +1 -1
- package/dist/stsrouterbase.js.map +1 -1
- package/dist/vitesttesting/appSingleWSS.js +2 -1
- package/dist/vitesttesting/appSingleWSS.js.map +1 -1
- package/dist/workerprocessbase.js.map +1 -1
- package/package.json +5 -6
- package/src/commonTypes.ts +2 -0
- package/src/index.ts +1 -7
- package/src/serverprocessbase.ts +1 -1
- package/src/{socketIoServerHelper.ts → socketIoServerHelper.ts_bak} +1 -2
- package/src/stscontrollerbase.ts +1 -2
- package/src/{server.ts → stsexpressserver.ts} +1 -2
- package/src/stslatencycontroller.ts +1 -2
- package/src/stslatencyroute.ts +1 -2
- package/src/stsrouterbase.ts +1 -2
- package/src/vitesttesting/appSingleWSS.ts +2 -1
- package/src/workerprocessbase.ts +1 -2
- package/types/commonTypes.d.ts +0 -15
- package/types/commonTypes.d.ts.map +1 -1
- package/types/index.d.ts +0 -7
- package/types/index.d.ts.map +1 -1
- package/types/serverprocessbase.d.ts +1 -1
- package/types/serverprocessbase.d.ts.map +1 -1
- package/types/stscontrollerbase.d.ts.map +1 -1
- package/types/{server.d.ts → stsexpressserver.d.ts} +1 -1
- package/types/stsexpressserver.d.ts.map +1 -0
- package/types/stslatencycontroller.d.ts.map +1 -1
- package/types/stslatencyroute.d.ts.map +1 -1
- package/types/stsrouterbase.d.ts.map +1 -1
- package/types/vitesttesting/appSingleWSS.d.ts.map +1 -1
- package/types/workerprocessbase.d.ts.map +1 -1
- package/dist/authDefs.js +0 -33
- package/dist/authDefs.js.map +0 -1
- package/dist/gRPC/ststest/protos/auth_sample.js +0 -3
- package/dist/gRPC/ststest/protos/auth_sample.js.map +0 -1
- package/dist/gRPC/ststest/protos/echo.js +0 -3
- package/dist/gRPC/ststest/protos/echo.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/examples/echo/Echo.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/examples/echo/Echo.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/testing/Request.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/testing/Request.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/testing/Response.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/testing/Response.js.map +0 -1
- package/dist/gRPC/ststest/protos/grpc/testing/TestService.js +0 -4
- package/dist/gRPC/ststest/protos/grpc/testing/TestService.js.map +0 -1
- package/dist/gRPC/ststest/protos/hellostreamingworld/HelloReply.js +0 -4
- package/dist/gRPC/ststest/protos/hellostreamingworld/HelloReply.js.map +0 -1
- package/dist/gRPC/ststest/protos/hellostreamingworld/HelloRequest.js +0 -4
- package/dist/gRPC/ststest/protos/hellostreamingworld/HelloRequest.js.map +0 -1
- package/dist/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.js +0 -4
- package/dist/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.js.map +0 -1
- package/dist/gRPC/ststest/protos/hellostreamingworld.js +0 -3
- package/dist/gRPC/ststest/protos/hellostreamingworld.js.map +0 -1
- package/dist/gRPC/ststest/protos/helloworld/Greeter.js +0 -4
- package/dist/gRPC/ststest/protos/helloworld/Greeter.js.map +0 -1
- package/dist/gRPC/ststest/protos/helloworld/HelloReply.js +0 -4
- package/dist/gRPC/ststest/protos/helloworld/HelloReply.js.map +0 -1
- package/dist/gRPC/ststest/protos/helloworld/HelloRequest.js +0 -4
- package/dist/gRPC/ststest/protos/helloworld/HelloRequest.js.map +0 -1
- package/dist/gRPC/ststest/protos/helloworld.js +0 -3
- package/dist/gRPC/ststest/protos/helloworld.js.map +0 -1
- package/dist/gRPC/ststest/protos/keyvaluestore/KeyValueStore.js +0 -4
- package/dist/gRPC/ststest/protos/keyvaluestore/KeyValueStore.js.map +0 -1
- package/dist/gRPC/ststest/protos/keyvaluestore/Request.js +0 -4
- package/dist/gRPC/ststest/protos/keyvaluestore/Request.js.map +0 -1
- package/dist/gRPC/ststest/protos/keyvaluestore/Response.js +0 -4
- package/dist/gRPC/ststest/protos/keyvaluestore/Response.js.map +0 -1
- package/dist/gRPC/ststest/protos/keyvaluestore.js +0 -3
- package/dist/gRPC/ststest/protos/keyvaluestore.js.map +0 -1
- package/dist/gRPC/ststest/protos/route_guide.js +0 -3
- package/dist/gRPC/ststest/protos/route_guide.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/Feature.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/Feature.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/Point.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/Point.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/Rectangle.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/Rectangle.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/RouteGuide.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/RouteGuide.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/RouteNote.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/RouteNote.js.map +0 -1
- package/dist/gRPC/ststest/protos/routeguide/RouteSummary.js +0 -4
- package/dist/gRPC/ststest/protos/routeguide/RouteSummary.js.map +0 -1
- package/dist/gRPC/ststest/src/commonTypes.js +0 -3
- package/dist/gRPC/ststest/src/commonTypes.js.map +0 -1
- package/dist/gRPC/ststest/src/greeter_client.js +0 -67
- package/dist/gRPC/ststest/src/greeter_client.js.map +0 -1
- package/dist/gRPC/ststest/src/greeter_server.js +0 -78
- package/dist/gRPC/ststest/src/greeter_server.js.map +0 -1
- package/dist/gRPC/ststest/src/route_guide_client.js +0 -258
- package/dist/gRPC/ststest/src/route_guide_client.js.map +0 -1
- package/dist/gRPC/ststest/src/route_guide_server.js +0 -237
- package/dist/gRPC/ststest/src/route_guide_server.js.map +0 -1
- package/dist/gRPC/ststest/src/route_guide_server2.js +0 -205
- package/dist/gRPC/ststest/src/route_guide_server2.js.map +0 -1
- package/dist/influxdb/influxDBManager.js +0 -304
- package/dist/influxdb/influxDBManager.js.map +0 -1
- package/dist/influxdb/influxDBManagerAgent.js +0 -14
- package/dist/influxdb/influxDBManagerAgent.js.map +0 -1
- package/dist/influxdb/influxDBManagerBase.js +0 -100
- package/dist/influxdb/influxDBManagerBase.js.map +0 -1
- package/dist/influxdb/influxDBManagerLambda.js +0 -17
- package/dist/influxdb/influxDBManagerLambda.js.map +0 -1
- package/dist/influxdb/influxDBManagerService.js +0 -14
- package/dist/influxdb/influxDBManagerService.js.map +0 -1
- package/dist/publishInstrumentsWebWorker.js +0 -159
- package/dist/publishInstrumentsWebWorker.js.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/socketIoServerHelper.js +0 -125
- package/dist/socketIoServerHelper.js.map +0 -1
- package/dist/tcpclient/app.js +0 -23
- package/dist/tcpclient/app.js.map +0 -1
- package/dist/tcpclient/app2.js +0 -57
- package/dist/tcpclient/app2.js.map +0 -1
- package/dist/tcpserver/app.js +0 -16
- package/dist/tcpserver/app.js.map +0 -1
- package/dist/tcpserver/appConfig.js +0 -83
- package/dist/tcpserver/appConfig.js.map +0 -1
- package/dist/tcpserver/appmaster.js +0 -446
- package/dist/tcpserver/appmaster.js.map +0 -1
- package/dist/testertesting/app.js +0 -284
- package/dist/testertesting/app.js.map +0 -1
- package/dist/testertesting/commonTypes.js +0 -47
- package/dist/testertesting/commonTypes.js.map +0 -1
- package/dist/testertesting/telemetryProcessor.js +0 -111
- package/dist/testertesting/telemetryProcessor.js.map +0 -1
- package/dist/testertesting/testCase01.js +0 -169
- package/dist/testertesting/testCase01.js.map +0 -1
- package/dist/testertesting/workerInstance.js +0 -263
- package/dist/testertesting/workerInstance.js.map +0 -1
- package/dist/testertesting/workerManager.js +0 -450
- package/dist/testertesting/workerManager.js.map +0 -1
- package/dist/testertesting/workerWorkerTestRunner01.js +0 -35
- package/dist/testertesting/workerWorkerTestRunner01.js.map +0 -1
- package/dist/testing/app.js +0 -18
- package/dist/testing/app.js.map +0 -1
- package/dist/testing/appConfig.js +0 -93
- package/dist/testing/appConfig.js.map +0 -1
- package/dist/testing/appTinyEmitter.js +0 -37
- package/dist/testing/appTinyEmitter.js.map +0 -1
- package/dist/testing/appWorkerWSS.js +0 -151
- package/dist/testing/appWorkerWSS.js.map +0 -1
- package/dist/testing/appredistest.js +0 -239
- package/dist/testing/appredistest.js.map +0 -1
- package/dist/testing/appsolo.js +0 -67
- package/dist/testing/appsolo.js.map +0 -1
- package/dist/testing/promiseTesting.js +0 -77
- package/dist/testing/promiseTesting.js.map +0 -1
- package/dist/testing/server.js +0 -15
- package/dist/testing/server.js.map +0 -1
- package/dist/testing/wsevents.js +0 -3
- package/dist/testing/wsevents.js.map +0 -1
- package/dist/webworkertesting/app.js +0 -44
- package/dist/webworkertesting/app.js.map +0 -1
- package/dist/webworkertesting/worker.js +0 -21
- package/dist/webworkertesting/worker.js.map +0 -1
- package/src/authDefs.ts +0 -37
- package/src/gRPC/ststest/protos/BUILD +0 -82
- package/src/gRPC/ststest/protos/README.md +0 -8
- package/src/gRPC/ststest/protos/auth_sample.proto +0 -42
- package/src/gRPC/ststest/protos/auth_sample.ts +0 -20
- package/src/gRPC/ststest/protos/echo.proto +0 -45
- package/src/gRPC/ststest/protos/echo.ts +0 -22
- package/src/gRPC/ststest/protos/grpc/examples/echo/Echo.ts +0 -55
- package/src/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.ts +0 -10
- package/src/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.ts +0 -10
- package/src/gRPC/ststest/protos/grpc/testing/Request.ts +0 -12
- package/src/gRPC/ststest/protos/grpc/testing/Response.ts +0 -12
- package/src/gRPC/ststest/protos/grpc/testing/TestService.ts +0 -27
- package/src/gRPC/ststest/protos/hellostreamingworld/HelloReply.ts +0 -10
- package/src/gRPC/ststest/protos/hellostreamingworld/HelloRequest.ts +0 -12
- package/src/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.ts +0 -23
- package/src/gRPC/ststest/protos/hellostreamingworld.proto +0 -39
- package/src/gRPC/ststest/protos/hellostreamingworld.ts +0 -18
- package/src/gRPC/ststest/protos/helloworld/Greeter.ts +0 -35
- package/src/gRPC/ststest/protos/helloworld/HelloReply.ts +0 -10
- package/src/gRPC/ststest/protos/helloworld/HelloRequest.ts +0 -10
- package/src/gRPC/ststest/protos/helloworld.proto +0 -40
- package/src/gRPC/ststest/protos/helloworld.ts +0 -18
- package/src/gRPC/ststest/protos/keyvaluestore/KeyValueStore.ts +0 -23
- package/src/gRPC/ststest/protos/keyvaluestore/Request.ts +0 -10
- package/src/gRPC/ststest/protos/keyvaluestore/Response.ts +0 -10
- package/src/gRPC/ststest/protos/keyvaluestore.proto +0 -33
- package/src/gRPC/ststest/protos/keyvaluestore.ts +0 -18
- package/src/gRPC/ststest/protos/route_guide.proto +0 -111
- package/src/gRPC/ststest/protos/route_guide.ts +0 -21
- package/src/gRPC/ststest/protos/routeguide/Feature.ts +0 -13
- package/src/gRPC/ststest/protos/routeguide/Point.ts +0 -12
- package/src/gRPC/ststest/protos/routeguide/Rectangle.ts +0 -13
- package/src/gRPC/ststest/protos/routeguide/RouteGuide.ts +0 -58
- package/src/gRPC/ststest/protos/routeguide/RouteNote.ts +0 -13
- package/src/gRPC/ststest/protos/routeguide/RouteSummary.ts +0 -16
- package/src/gRPC/ststest/src/commonTypes.ts +0 -27
- package/src/gRPC/ststest/src/greeter_client.ts +0 -52
- package/src/gRPC/ststest/src/greeter_server.ts +0 -62
- package/src/gRPC/ststest/src/route_guide_client.ts +0 -266
- package/src/gRPC/ststest/src/route_guide_server.ts +0 -234
- package/src/gRPC/ststest/src/route_guide_server2.ts +0 -211
- package/src/influxdb/influxDBManager.ts +0 -334
- package/src/influxdb/influxDBManagerAgent.ts +0 -14
- package/src/influxdb/influxDBManagerBase.ts +0 -108
- package/src/influxdb/influxDBManagerLambda.ts +0 -17
- package/src/influxdb/influxDBManagerService.ts +0 -14
- package/src/publishInstrumentsWebWorker.ts +0 -157
- package/src/tcpclient/app.ts +0 -21
- package/src/tcpclient/app2.ts +0 -58
- package/src/tcpserver/app.ts +0 -11
- package/src/tcpserver/appConfig.ts +0 -99
- package/src/tcpserver/appmaster.ts +0 -503
- package/src/testertesting/app.ts +0 -349
- package/src/testertesting/commonTypes.ts +0 -236
- package/src/testertesting/telemetryProcessor.ts +0 -125
- package/src/testertesting/testCase01.ts +0 -207
- package/src/testertesting/workerInstance.ts +0 -297
- package/src/testertesting/workerManager.ts +0 -511
- package/src/testertesting/workerWorkerTestRunner01.ts +0 -34
- package/src/testing/app.ts +0 -14
- package/src/testing/appConfig.ts +0 -110
- package/src/testing/appTinyEmitter.ts +0 -57
- package/src/testing/appWorkerWSS.ts +0 -174
- package/src/testing/appredistest.ts +0 -304
- package/src/testing/appsolo.ts +0 -96
- package/src/testing/docker-compose.yml +0 -20
- package/src/testing/promiseTesting.ts +0 -86
- package/src/testing/server.ts +0 -17
- package/src/testing/wsevents.ts +0 -33
- package/src/webworkertesting/app.ts +0 -56
- package/src/webworkertesting/worker.ts +0 -24
- package/types/authDefs.d.ts +0 -29
- package/types/authDefs.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/auth_sample.d.ts +0 -19
- package/types/gRPC/ststest/protos/auth_sample.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/echo.d.ts +0 -21
- package/types/gRPC/ststest/protos/echo.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/examples/echo/Echo.d.ts +0 -43
- package/types/gRPC/ststest/protos/grpc/examples/echo/Echo.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.d.ts +0 -7
- package/types/gRPC/ststest/protos/grpc/examples/echo/EchoRequest.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.d.ts +0 -7
- package/types/gRPC/ststest/protos/grpc/examples/echo/EchoResponse.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/testing/Request.d.ts +0 -9
- package/types/gRPC/ststest/protos/grpc/testing/Request.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/testing/Response.d.ts +0 -9
- package/types/gRPC/ststest/protos/grpc/testing/Response.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/grpc/testing/TestService.d.ts +0 -21
- package/types/gRPC/ststest/protos/grpc/testing/TestService.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/hellostreamingworld/HelloReply.d.ts +0 -7
- package/types/gRPC/ststest/protos/hellostreamingworld/HelloReply.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/hellostreamingworld/HelloRequest.d.ts +0 -9
- package/types/gRPC/ststest/protos/hellostreamingworld/HelloRequest.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.d.ts +0 -17
- package/types/gRPC/ststest/protos/hellostreamingworld/MultiGreeter.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/hellostreamingworld.d.ts +0 -17
- package/types/gRPC/ststest/protos/hellostreamingworld.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/helloworld/Greeter.d.ts +0 -27
- package/types/gRPC/ststest/protos/helloworld/Greeter.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/helloworld/HelloReply.d.ts +0 -7
- package/types/gRPC/ststest/protos/helloworld/HelloReply.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/helloworld/HelloRequest.d.ts +0 -7
- package/types/gRPC/ststest/protos/helloworld/HelloRequest.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/helloworld.d.ts +0 -17
- package/types/gRPC/ststest/protos/helloworld.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/keyvaluestore/KeyValueStore.d.ts +0 -17
- package/types/gRPC/ststest/protos/keyvaluestore/KeyValueStore.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/keyvaluestore/Request.d.ts +0 -7
- package/types/gRPC/ststest/protos/keyvaluestore/Request.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/keyvaluestore/Response.d.ts +0 -7
- package/types/gRPC/ststest/protos/keyvaluestore/Response.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/keyvaluestore.d.ts +0 -17
- package/types/gRPC/ststest/protos/keyvaluestore.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/route_guide.d.ts +0 -20
- package/types/gRPC/ststest/protos/route_guide.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/Feature.d.ts +0 -10
- package/types/gRPC/ststest/protos/routeguide/Feature.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/Point.d.ts +0 -9
- package/types/gRPC/ststest/protos/routeguide/Point.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/Rectangle.d.ts +0 -10
- package/types/gRPC/ststest/protos/routeguide/Rectangle.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/RouteGuide.d.ts +0 -46
- package/types/gRPC/ststest/protos/routeguide/RouteGuide.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/RouteNote.d.ts +0 -10
- package/types/gRPC/ststest/protos/routeguide/RouteNote.d.ts.map +0 -1
- package/types/gRPC/ststest/protos/routeguide/RouteSummary.d.ts +0 -13
- package/types/gRPC/ststest/protos/routeguide/RouteSummary.d.ts.map +0 -1
- package/types/gRPC/ststest/src/commonTypes.d.ts +0 -23
- package/types/gRPC/ststest/src/commonTypes.d.ts.map +0 -1
- package/types/gRPC/ststest/src/greeter_client.d.ts +0 -3
- package/types/gRPC/ststest/src/greeter_client.d.ts.map +0 -1
- package/types/gRPC/ststest/src/greeter_server.d.ts +0 -3
- package/types/gRPC/ststest/src/greeter_server.d.ts.map +0 -1
- package/types/gRPC/ststest/src/route_guide_client.d.ts +0 -3
- package/types/gRPC/ststest/src/route_guide_client.d.ts.map +0 -1
- package/types/gRPC/ststest/src/route_guide_server.d.ts +0 -3
- package/types/gRPC/ststest/src/route_guide_server.d.ts.map +0 -1
- package/types/gRPC/ststest/src/route_guide_server2.d.ts +0 -3
- package/types/gRPC/ststest/src/route_guide_server2.d.ts.map +0 -1
- package/types/influxdb/influxDBManager.d.ts +0 -21
- package/types/influxdb/influxDBManager.d.ts.map +0 -1
- package/types/influxdb/influxDBManagerAgent.d.ts +0 -8
- package/types/influxdb/influxDBManagerAgent.d.ts.map +0 -1
- package/types/influxdb/influxDBManagerBase.d.ts +0 -14
- package/types/influxdb/influxDBManagerBase.d.ts.map +0 -1
- package/types/influxdb/influxDBManagerLambda.d.ts +0 -11
- package/types/influxdb/influxDBManagerLambda.d.ts.map +0 -1
- package/types/influxdb/influxDBManagerService.d.ts +0 -8
- package/types/influxdb/influxDBManagerService.d.ts.map +0 -1
- package/types/publishInstrumentsWebWorker.d.ts +0 -1
- package/types/publishInstrumentsWebWorker.d.ts.map +0 -1
- package/types/server.d.ts.map +0 -1
- package/types/socketIoServerHelper.d.ts +0 -20
- package/types/socketIoServerHelper.d.ts.map +0 -1
- package/types/tcpclient/app.d.ts +0 -2
- package/types/tcpclient/app.d.ts.map +0 -1
- package/types/tcpclient/app2.d.ts +0 -2
- package/types/tcpclient/app2.d.ts.map +0 -1
- package/types/tcpserver/app.d.ts +0 -2
- package/types/tcpserver/app.d.ts.map +0 -1
- package/types/tcpserver/appConfig.d.ts +0 -3
- package/types/tcpserver/appConfig.d.ts.map +0 -1
- package/types/tcpserver/appmaster.d.ts +0 -24
- package/types/tcpserver/appmaster.d.ts.map +0 -1
- package/types/testertesting/app.d.ts +0 -2
- package/types/testertesting/app.d.ts.map +0 -1
- package/types/testertesting/commonTypes.d.ts +0 -215
- package/types/testertesting/commonTypes.d.ts.map +0 -1
- package/types/testertesting/telemetryProcessor.d.ts +0 -6
- package/types/testertesting/telemetryProcessor.d.ts.map +0 -1
- package/types/testertesting/testCase01.d.ts +0 -20
- package/types/testertesting/testCase01.d.ts.map +0 -1
- package/types/testertesting/workerInstance.d.ts +0 -23
- package/types/testertesting/workerInstance.d.ts.map +0 -1
- package/types/testertesting/workerManager.d.ts +0 -16
- package/types/testertesting/workerManager.d.ts.map +0 -1
- package/types/testertesting/workerWorkerTestRunner01.d.ts +0 -7
- package/types/testertesting/workerWorkerTestRunner01.d.ts.map +0 -1
- package/types/testing/app.d.ts +0 -2
- package/types/testing/app.d.ts.map +0 -1
- package/types/testing/appConfig.d.ts +0 -3
- package/types/testing/appConfig.d.ts.map +0 -1
- package/types/testing/appTinyEmitter.d.ts +0 -2
- package/types/testing/appTinyEmitter.d.ts.map +0 -1
- package/types/testing/appWorkerWSS.d.ts +0 -26
- package/types/testing/appWorkerWSS.d.ts.map +0 -1
- package/types/testing/appredistest.d.ts +0 -4
- package/types/testing/appredistest.d.ts.map +0 -1
- package/types/testing/appsolo.d.ts +0 -3
- package/types/testing/appsolo.d.ts.map +0 -1
- package/types/testing/promiseTesting.d.ts +0 -4
- package/types/testing/promiseTesting.d.ts.map +0 -1
- package/types/testing/server.d.ts +0 -6
- package/types/testing/server.d.ts.map +0 -1
- package/types/testing/wsevents.d.ts +0 -18
- package/types/testing/wsevents.d.ts.map +0 -1
- package/types/webworkertesting/app.d.ts +0 -2
- package/types/webworkertesting/app.d.ts.map +0 -1
- package/types/webworkertesting/worker.d.ts +0 -2
- package/types/webworkertesting/worker.d.ts.map +0 -1
package/src/testertesting/app.ts
DELETED
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
/* eslint @typescript-eslint/no-explicit-any: 0, @typescript-eslint/no-unused-vars: 0 */ // --> OFF
|
|
2
|
-
import cluster from 'cluster';
|
|
3
|
-
import { Worker } from 'worker_threads';
|
|
4
|
-
|
|
5
|
-
import { IWorkerFactory, IWorkerOptions } from './commonTypes'
|
|
6
|
-
|
|
7
|
-
import { STSWorkerManager } from './workerManager';
|
|
8
|
-
|
|
9
|
-
import chalk from 'chalk';
|
|
10
|
-
// Force chalk level
|
|
11
|
-
chalk.level = 3;
|
|
12
|
-
|
|
13
|
-
import { IContextBase, IPublishInstrumentControllerOptions, Gauge, TransportType, IPublishTransportRESTServerOptions,
|
|
14
|
-
PublishInstrumentController, GetInstruments, InstrumentGaugeTelemetry } from '@nsshunt/stsobservability'
|
|
15
|
-
|
|
16
|
-
import { ModelDelimeter, defaultLogger } from '@nsshunt/stsutils'
|
|
17
|
-
|
|
18
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
19
|
-
|
|
20
|
-
import { goptions } from '@nsshunt/stsconfig'
|
|
21
|
-
|
|
22
|
-
import { IRunnerOptionsEx } from './testCase01'
|
|
23
|
-
|
|
24
|
-
import { CreateServiceProcessContext } from './../commonTypes'
|
|
25
|
-
|
|
26
|
-
declare interface IAsyncRunnerContext extends IContextBase {
|
|
27
|
-
id: string;
|
|
28
|
-
hostName: string;
|
|
29
|
-
agentName: string;
|
|
30
|
-
threadId: string;
|
|
31
|
-
asyncRunnerId: number;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const LogInfoMessage = (message: any) => console.log(chalk.grey(message))
|
|
35
|
-
const LogErrorMessage = (message: any) => console.error(chalk.red(message))
|
|
36
|
-
|
|
37
|
-
if (cluster.isPrimary) {
|
|
38
|
-
|
|
39
|
-
//new MasterProcessBase(ServiceConfigOptions(true, cluster.isPrimary)).SetupServer();
|
|
40
|
-
|
|
41
|
-
LogInfoMessage(`Primary ${process.pid} is running`);
|
|
42
|
-
|
|
43
|
-
// Fork workers.
|
|
44
|
-
cluster.fork();
|
|
45
|
-
|
|
46
|
-
cluster.on('exit', (worker, code, signal) => {
|
|
47
|
-
LogInfoMessage(`worker ${worker.process.pid} died`);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
/*
|
|
51
|
-
const fileName ='./dist/webworkertesting/worker.js';
|
|
52
|
-
|
|
53
|
-
const publishCollectorWebWorker = new Worker(fileName);
|
|
54
|
-
publishCollectorWebWorker.unref();
|
|
55
|
-
|
|
56
|
-
publishCollectorWebWorker.postMessage({cmd: 'text', message: 'Hello World'});
|
|
57
|
-
|
|
58
|
-
publishCollectorWebWorker.on('message', (data) => {
|
|
59
|
-
LogInfoMessage(`cluster.primary (${process.pid}): message from worker = [${JSON.stringify(data)}]`);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
const { port1, port2 } = new MessageChannel();
|
|
63
|
-
|
|
64
|
-
publishCollectorWebWorker.postMessage({cmd: 'portmessage', port: port2}, [ port2 ]);
|
|
65
|
-
port1.postMessage('sending to port1');
|
|
66
|
-
port1.on('message', (data) => {
|
|
67
|
-
LogInfoMessage(`cluster.primary (${process.pid}): message from message port = [${data}]`);
|
|
68
|
-
});
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
LogInfoMessage(`cluster primary completed ...`);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
} else {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
LogInfoMessage(`Worker ${process.pid} started`);
|
|
78
|
-
|
|
79
|
-
//const worker = new WorkerProcessBase(ServiceConfigOptions(true, cluster.isPrimary));
|
|
80
|
-
//worker.SetupServer();
|
|
81
|
-
|
|
82
|
-
const hostName = 'host01';
|
|
83
|
-
const agentId = 'agent01';
|
|
84
|
-
const userAgent = 'userAgent01'
|
|
85
|
-
|
|
86
|
-
// Root level / master async runner context
|
|
87
|
-
const asyncRunnerContext: IAsyncRunnerContext = {
|
|
88
|
-
nid: `\
|
|
89
|
-
${hostName}${ModelDelimeter.COMPONENT_SEPERATOR}${agentId}-${userAgent}\
|
|
90
|
-
${ModelDelimeter.NID_SEPERATOR}\
|
|
91
|
-
MainProcess\
|
|
92
|
-
${ModelDelimeter.SEPERATOR}\
|
|
93
|
-
0`,
|
|
94
|
-
id: uuidv4(),
|
|
95
|
-
// id: `${applicationStore.applicationConfig.HOST}${ModelDelimeter.COMPONENT_SEPERATOR}${applicationStore.applicationConfig.AGENT_ID}-${applicationStore.applicationConfig.USER_AGENT}`,
|
|
96
|
-
hostName: (hostName ? hostName : 'host01'),
|
|
97
|
-
agentName: `${agentId}-${userAgent}`,
|
|
98
|
-
threadId: 'MainProcess',
|
|
99
|
-
asyncRunnerId: 0
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const url = `https://stscore.stsmda.org:3001/stsinstrumentmanager/v1/publishmessage`;
|
|
103
|
-
|
|
104
|
-
const publishTransportOptions: IPublishTransportRESTServerOptions = {
|
|
105
|
-
transportType: TransportType.RESTAPI,
|
|
106
|
-
//url: `${goptions.imendpoint}:${goptions.import}${goptions.imapiroot}/publishmessage`,
|
|
107
|
-
url,
|
|
108
|
-
logger: defaultLogger,
|
|
109
|
-
agentOptions: {
|
|
110
|
-
keepAlive: goptions.keepAlive,
|
|
111
|
-
maxSockets: goptions.maxSockets,
|
|
112
|
-
maxTotalSockets: goptions.maxTotalSockets,
|
|
113
|
-
maxFreeSockets: goptions.maxFreeSockets,
|
|
114
|
-
timeout: 30000, //@@ config
|
|
115
|
-
rejectUnauthorized: goptions.isProduction // Allows self signed certs in non production mode(s)
|
|
116
|
-
},
|
|
117
|
-
showPublishPayload: false
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
LogInfoMessage(`publishTransportOptions: [${publishTransportOptions.url}]`);
|
|
121
|
-
|
|
122
|
-
//const fileName1 = './dist/publishInstrumentsWebWorker.js';
|
|
123
|
-
//const worker1 = new Worker(fileName1);
|
|
124
|
-
|
|
125
|
-
const instrumentControllerOptions: IPublishInstrumentControllerOptions = {
|
|
126
|
-
processContext: asyncRunnerContext,
|
|
127
|
-
instrumentationObservationInterval: 1000, //@@
|
|
128
|
-
instrumentationTimeWindow: 600, //@@
|
|
129
|
-
logger: defaultLogger,
|
|
130
|
-
publishInterval: 1000, //@@
|
|
131
|
-
publishPostFailInterval: 5000, //@@
|
|
132
|
-
instrumentDefinitions: GetInstruments('agent'),
|
|
133
|
-
publishTransportBaseOptions: publishTransportOptions,
|
|
134
|
-
autoStart: false
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const agentInstrumentController = new PublishInstrumentController(instrumentControllerOptions);
|
|
138
|
-
agentInstrumentController.StartPublish();
|
|
139
|
-
|
|
140
|
-
const serviceContext = CreateServiceProcessContext('testingservice', 'v1', uuidv4(),
|
|
141
|
-
'oshostname', 1, 1)
|
|
142
|
-
|
|
143
|
-
//const fileName2 = './dist/publishInstrumentsWebWorker.js';
|
|
144
|
-
//const worker2 = new Worker(fileName2);
|
|
145
|
-
|
|
146
|
-
const serviceInstrumentControllerOptions: IPublishInstrumentControllerOptions = {
|
|
147
|
-
processContext: serviceContext,
|
|
148
|
-
//payloadType: InstrumentPayloadType.service,
|
|
149
|
-
consoleLogging: false,
|
|
150
|
-
instrumentLogging: true,
|
|
151
|
-
httpServer: false,
|
|
152
|
-
instrumentationObservationInterval: 1000,
|
|
153
|
-
instrumentationTimeWindow: 600,
|
|
154
|
-
logger: defaultLogger,
|
|
155
|
-
publishInterval: 1000,
|
|
156
|
-
publishPostFailInterval: 5000,
|
|
157
|
-
instrumentDefinitions: GetInstruments('service'),
|
|
158
|
-
publishTransportBaseOptions: publishTransportOptions,
|
|
159
|
-
autoStart: false
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
const serviceInstrumentController = new PublishInstrumentController(serviceInstrumentControllerOptions);
|
|
163
|
-
serviceInstrumentController.StartPublish();
|
|
164
|
-
|
|
165
|
-
const serviceContext2 = CreateServiceProcessContext('testingservice', 'v1', uuidv4(),
|
|
166
|
-
'oshostname', 2, 1);
|
|
167
|
-
const newPublishInstrumentController2 = serviceInstrumentController.AddPublishInstrumentController(serviceContext2)
|
|
168
|
-
newPublishInstrumentController2.StartPublish();
|
|
169
|
-
|
|
170
|
-
const serviceContext3 = CreateServiceProcessContext('testingservice', 'v1', uuidv4(),
|
|
171
|
-
'oshostname', 3, 1);
|
|
172
|
-
const newPublishInstrumentController3 = serviceInstrumentController.AddPublishInstrumentController(serviceContext3)
|
|
173
|
-
newPublishInstrumentController3.StartPublish();
|
|
174
|
-
|
|
175
|
-
// Service types MUST have a CPU in order for the UITerm tool to see the telemetry
|
|
176
|
-
setInterval(() => {
|
|
177
|
-
newPublishInstrumentController2.UpdateInstrument(Gauge.CPU_LOAD_GAUGE, {
|
|
178
|
-
val: 20
|
|
179
|
-
} as InstrumentGaugeTelemetry);
|
|
180
|
-
|
|
181
|
-
newPublishInstrumentController3.UpdateInstrument(Gauge.CPU_LOAD_GAUGE, {
|
|
182
|
-
val: 30
|
|
183
|
-
} as InstrumentGaugeTelemetry);
|
|
184
|
-
}, 1000);
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
const workerFactory: IWorkerFactory = {
|
|
188
|
-
createWorkerThreadWorker: (): Worker => {
|
|
189
|
-
LogInfoMessage(`createWorkerThreadWorker`);
|
|
190
|
-
const fileName ='./dist/testertesting/workerWorkerTestRunner01.js';
|
|
191
|
-
const publishCollectorWebWorker = new Worker(fileName);
|
|
192
|
-
publishCollectorWebWorker.unref();
|
|
193
|
-
return publishCollectorWebWorker;
|
|
194
|
-
},
|
|
195
|
-
get workerThreadWorkerOptions(): IWorkerOptions {
|
|
196
|
-
return {
|
|
197
|
-
id: uuidv4(),
|
|
198
|
-
agentId,
|
|
199
|
-
hostName,
|
|
200
|
-
userAgent,
|
|
201
|
-
workdata: 'worker - hello world'
|
|
202
|
-
} as IWorkerOptions;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const PerformTesting = async () => {
|
|
207
|
-
const wm = new STSWorkerManager({
|
|
208
|
-
workerFactory,
|
|
209
|
-
publishInstrumentController: agentInstrumentController
|
|
210
|
-
});
|
|
211
|
-
const worker = await wm.AddWorker();
|
|
212
|
-
|
|
213
|
-
const runnerOptions: IRunnerOptionsEx = {
|
|
214
|
-
testType: 'TestCase01',
|
|
215
|
-
executionProfile: {
|
|
216
|
-
iterations: 50,
|
|
217
|
-
delayBetweenIterations: 250
|
|
218
|
-
},
|
|
219
|
-
sleepDuration: 0,
|
|
220
|
-
logMessageMod: 1
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
const runner1 = worker.AddRunner(runnerOptions);
|
|
224
|
-
runner1.on('Completed', () => {
|
|
225
|
-
console.log(chalk.rgb(10, 100, 250)(`Completed event handler for runner 1`));
|
|
226
|
-
});
|
|
227
|
-
worker.StartRunner(runner1);
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
const runner2 = wm.AddRunnerToWorker(worker, runnerOptions);
|
|
231
|
-
runner2.Start();
|
|
232
|
-
runner2.on('Completed', () => {
|
|
233
|
-
console.log(chalk.rgb(100, 10, 250)(`Completed event handler for runner 2`));
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
wm.AddRunnerToWorker(worker, runnerOptions).on('Completed', () => {
|
|
237
|
-
console.log(chalk.rgb(250, 100, 25)(`Completed event handler for runner 3`));
|
|
238
|
-
}).Start();
|
|
239
|
-
|
|
240
|
-
const runner4 = wm.AddRunnerToWorker(worker, runnerOptions);
|
|
241
|
-
runner4.Start();
|
|
242
|
-
runner4.on('Completed', () => {
|
|
243
|
-
console.log(chalk.rgb(50, 230, 20)(`Completed event handler for runner 4`));
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
setTimeout(async () => {
|
|
247
|
-
await runner4.Pause();
|
|
248
|
-
const newOptions = { ...runnerOptions };
|
|
249
|
-
newOptions.sleepDuration = 500;
|
|
250
|
-
await runner4.UpdateOptions(newOptions);
|
|
251
|
-
await runner4.Resume();
|
|
252
|
-
setTimeout(async () => {
|
|
253
|
-
newOptions.sleepDuration = 0;
|
|
254
|
-
await runner4.UpdateOptions(newOptions);
|
|
255
|
-
}, 3000);
|
|
256
|
-
}, 2000);
|
|
257
|
-
|
|
258
|
-
setTimeout(() => {
|
|
259
|
-
runner2.Pause();
|
|
260
|
-
setTimeout(() => {
|
|
261
|
-
runner2.Resume();
|
|
262
|
-
setTimeout(() => {
|
|
263
|
-
runner2.Reset();
|
|
264
|
-
setTimeout(() => {
|
|
265
|
-
runner2.Start();
|
|
266
|
-
setTimeout(() => {
|
|
267
|
-
runner2.Stop();
|
|
268
|
-
setTimeout(() => {
|
|
269
|
-
runner2.Terminate();
|
|
270
|
-
}, 2000);
|
|
271
|
-
}, 2000);
|
|
272
|
-
}, 100);
|
|
273
|
-
}, 2000);
|
|
274
|
-
}, 2000);
|
|
275
|
-
}, 2000);
|
|
276
|
-
|
|
277
|
-
for (let j=0; j < 2; j++) {
|
|
278
|
-
const worker = await wm.AddWorker();
|
|
279
|
-
|
|
280
|
-
const runnerOptions: IRunnerOptionsEx = {
|
|
281
|
-
testType: 'TestCase01',
|
|
282
|
-
executionProfile: {
|
|
283
|
-
iterations: 50,
|
|
284
|
-
delayBetweenIterations: 250
|
|
285
|
-
},
|
|
286
|
-
sleepDuration: 0,
|
|
287
|
-
logMessageMod: 1
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
for (let i=0; i < 5; i++) {
|
|
291
|
-
const runner = worker.AddRunner(runnerOptions);
|
|
292
|
-
runner.on('Completed', () => {
|
|
293
|
-
console.log(chalk.rgb(10, 100, 250)(`Completed event handler for worker ${j} runner ${i}`));
|
|
294
|
-
});
|
|
295
|
-
worker.StartRunner(runner);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
setTimeout(() => {
|
|
299
|
-
worker.Pause();
|
|
300
|
-
setTimeout(() => {
|
|
301
|
-
worker.Resume();
|
|
302
|
-
setTimeout(() => {
|
|
303
|
-
worker.Stop();
|
|
304
|
-
setTimeout(async () => {
|
|
305
|
-
await worker.Reset();
|
|
306
|
-
const newOptions = { ...runnerOptions };
|
|
307
|
-
newOptions.sleepDuration = 50; // Simulated time for a work event to occur (actual work like a REST call)
|
|
308
|
-
newOptions.logMessageMod = 25; // Send a log message every 25 iterations
|
|
309
|
-
newOptions.executionProfile.delayBetweenIterations = 0;
|
|
310
|
-
newOptions.executionProfile.iterations = 10000;
|
|
311
|
-
await worker.UpdateOptions(newOptions);
|
|
312
|
-
await worker.Start();
|
|
313
|
-
setTimeout(async () => {
|
|
314
|
-
await worker.Pause();
|
|
315
|
-
await worker.Execute();
|
|
316
|
-
await worker.Execute();
|
|
317
|
-
await worker.Execute();
|
|
318
|
-
await worker.Execute();
|
|
319
|
-
await worker.Execute();
|
|
320
|
-
setTimeout(async () => {
|
|
321
|
-
await worker.Resume();
|
|
322
|
-
}, 5000);
|
|
323
|
-
}, 5000);
|
|
324
|
-
}, 5000);
|
|
325
|
-
}, 5000);
|
|
326
|
-
}, 5000);
|
|
327
|
-
}, 5000);
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
};
|
|
331
|
-
PerformTesting();
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
/*
|
|
335
|
-
const fileName ='./dist/webworkertesting/worker.js';
|
|
336
|
-
|
|
337
|
-
const clusterWorker = new Worker(fileName);
|
|
338
|
-
clusterWorker.unref();
|
|
339
|
-
|
|
340
|
-
clusterWorker.postMessage({cmd: 'text', message: 'Hello World'});
|
|
341
|
-
|
|
342
|
-
clusterWorker.on('message', (data: any) => {
|
|
343
|
-
LogInfoMessage(`cluster.worker (${process.pid}): message from worker = [${JSON.stringify(data)}]`);
|
|
344
|
-
});
|
|
345
|
-
*/
|
|
346
|
-
|
|
347
|
-
LogInfoMessage(`cluster work completed ...`);
|
|
348
|
-
|
|
349
|
-
}
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { Worker, MessagePort } from 'worker_threads';
|
|
2
|
-
|
|
3
|
-
import { PublishInstrumentController } from '@nsshunt/stsobservability'
|
|
4
|
-
|
|
5
|
-
import { IContextBase } from '@nsshunt/stsobservability'
|
|
6
|
-
|
|
7
|
-
export const URI_BASE_VUEUTILS: string = '/';
|
|
8
|
-
|
|
9
|
-
export interface IAsyncRunnerContext extends IContextBase {
|
|
10
|
-
id: string
|
|
11
|
-
hostName: string
|
|
12
|
-
agentName: string
|
|
13
|
-
threadId: string
|
|
14
|
-
asyncRunnerId: number
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Inter-Worker (IW) Payload context base.
|
|
19
|
-
*/
|
|
20
|
-
export interface IIWMessagePayloadContentBase {
|
|
21
|
-
messageId?: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Inter-Worker (IW) message commands.
|
|
26
|
-
*/
|
|
27
|
-
export enum eIWMessageCommands {
|
|
28
|
-
InstrumentTelemetry ='__STS__InstrumentTelemetry', // Used to send instrument telemetry
|
|
29
|
-
MessagePort = '__STS__MessagePort',
|
|
30
|
-
MessagePortResponse = '__STS__MessagePortResponse',
|
|
31
|
-
AddRunner = '__STS__AddRunner',
|
|
32
|
-
StopAllRunners = '__STS__StopAllRunners',
|
|
33
|
-
StartRunner = '__STS__StartRunner',
|
|
34
|
-
StopRunner = '__STS__StopRunner',
|
|
35
|
-
PauseRunner = '__STS__PauseRunner',
|
|
36
|
-
ResumeRunner = '__STS__ResumeRunner',
|
|
37
|
-
ResetRunner = '__STS__ResetRunner',
|
|
38
|
-
ExecuteRunner = '__STS__ExecuteRunner',
|
|
39
|
-
Completed = '__STS__Completed',
|
|
40
|
-
UpdateOptions = '__STS__UpdateOptions',
|
|
41
|
-
TerminateRunner = '__STS__TerminateRunner'
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Inter-Worker (IW) message command.
|
|
46
|
-
*/
|
|
47
|
-
export type IIWMessageCommand = eIWMessageCommands
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Inter-Worker (IW) message payload.
|
|
51
|
-
*/
|
|
52
|
-
export interface IIWMessagePayload {
|
|
53
|
-
command: IIWMessageCommand
|
|
54
|
-
payload: IIWMessagePayloadContentBase
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface IObservabilitySubscriberManagerOptions {
|
|
58
|
-
modelId: string
|
|
59
|
-
consumeInstrumentationMode: string
|
|
60
|
-
instrumentManagerEndpoint: string
|
|
61
|
-
instrumentManagerPort: string
|
|
62
|
-
instrumentManagerAPIRoot: string
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface ISTSAgentWorkerMessagePort extends IIWMessagePayloadContentBase {
|
|
66
|
-
port: MessagePort
|
|
67
|
-
options: IWorkerOptions
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export enum IRunnerState {
|
|
71
|
-
created = 'created',
|
|
72
|
-
running = 'running',
|
|
73
|
-
stopped = 'stopped',
|
|
74
|
-
paused = 'paused',
|
|
75
|
-
error = 'error',
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface IRunnerTelemetry {
|
|
79
|
-
requestCount: number // requestCount
|
|
80
|
-
errorCount: number
|
|
81
|
-
retryCount: number
|
|
82
|
-
authenticationCount: number
|
|
83
|
-
authenticationErrorCount: number
|
|
84
|
-
authenticationRetryCount: number
|
|
85
|
-
velocity: number
|
|
86
|
-
coreCount: number
|
|
87
|
-
timer: number
|
|
88
|
-
duration: number
|
|
89
|
-
latency: number
|
|
90
|
-
activeRequestCount: number
|
|
91
|
-
message: string[]
|
|
92
|
-
childCount: number
|
|
93
|
-
rx: number
|
|
94
|
-
tx: number
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface IRunner {
|
|
98
|
-
get id(): number
|
|
99
|
-
get asyncRunnerContext(): IAsyncRunnerContext
|
|
100
|
-
get options(): IRunnerOptions
|
|
101
|
-
set options(options: IRunnerOptions)
|
|
102
|
-
get instrumentData(): IRunnerTelemetry
|
|
103
|
-
set instrumentData(newRunnerTelemetry: IRunnerTelemetry)
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export interface IRunnerEx extends IRunner {
|
|
107
|
-
publishInstrumentController: PublishInstrumentController
|
|
108
|
-
Start: () => Promise<boolean> // Start runner iterations
|
|
109
|
-
Stop: () => Promise<boolean> // Stop iteration processing and keep the current iteration number. Currently, this is the same as Pause.
|
|
110
|
-
Pause: () => Promise<boolean> // Pause iteration processing and keep the current iteration number.
|
|
111
|
-
Resume: () => Promise<boolean> // Resume iteration processing from the previously paused iteration number.
|
|
112
|
-
Terminate: () => Promise<boolean> // Stop the runner iterations and terminate the instance, stop any instrument publishers.
|
|
113
|
-
Reset: () => Promise<boolean> // Stop the current iterations and reset the iteration count back to 0.
|
|
114
|
-
Execute: (iteration: number) => Promise<boolean> // Execute a single iteration for this test.
|
|
115
|
-
UpdateOptions: (options: IRunnerOptions) => Promise<boolean>
|
|
116
|
-
on: (eventName: string, cb: () => void) => IRunnerEx // Register event handler.
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export interface IRunnerInstance {
|
|
120
|
-
StartRunner: () => Promise<boolean>
|
|
121
|
-
StopRunner: () => Promise<boolean>
|
|
122
|
-
PauseRunner: () => Promise<boolean>
|
|
123
|
-
ResumeRunner: () => Promise<boolean>
|
|
124
|
-
TerminateRunner: () => Promise<boolean>
|
|
125
|
-
ResetRunner: () => Promise<boolean>
|
|
126
|
-
Execute: (iteration: number) => Promise<boolean> // Execute a single iteration for this test
|
|
127
|
-
UpdateOptions: () => Promise<boolean>
|
|
128
|
-
Completed: () => Promise<boolean>
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export enum IWorkerState {
|
|
132
|
-
starting = 'starting',
|
|
133
|
-
started = 'started',
|
|
134
|
-
stopped = 'stopped'
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export interface IWorkerOptions {
|
|
138
|
-
id: string
|
|
139
|
-
hostName: string
|
|
140
|
-
agentId: string
|
|
141
|
-
userAgent: string
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export type Runners = Record<string, IRunner>
|
|
145
|
-
|
|
146
|
-
export interface IWorker {
|
|
147
|
-
id: number
|
|
148
|
-
state: IWorkerState
|
|
149
|
-
workerThreadWorkerOptions: IWorkerOptions
|
|
150
|
-
runners?: Runners // Will be created by utility helper
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export type Workers = Record<string, IWorker>
|
|
154
|
-
|
|
155
|
-
export interface IExecutionProfile {
|
|
156
|
-
iterations: number
|
|
157
|
-
delayBetweenIterations: number
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export interface IRunnerOptions {
|
|
161
|
-
testType: string
|
|
162
|
-
executionProfile: IExecutionProfile
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export interface IRunnerEvent {
|
|
166
|
-
eventName: string
|
|
167
|
-
cb: () => void
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export interface IWorkerEx extends IWorker {
|
|
171
|
-
worker: Worker
|
|
172
|
-
runnersEx: Record<string, IRunnerEx>
|
|
173
|
-
runnersEvents: Record<string, IRunnerEvent[]>
|
|
174
|
-
GetRunner(id: string): IRunnerEx | null
|
|
175
|
-
AddRunner: (runnerOptions: IRunnerOptions) => IRunnerEx
|
|
176
|
-
|
|
177
|
-
StartRunner: (runner: IRunnerEx) => Promise<boolean>
|
|
178
|
-
StopRunner: (runner: IRunnerEx) => Promise<boolean>
|
|
179
|
-
PauseRunner: (runner: IRunnerEx) => Promise<boolean>
|
|
180
|
-
ResumeRunner: (runner: IRunnerEx) => Promise<boolean>
|
|
181
|
-
TerminateRunner: (runner: IRunnerEx) => Promise<boolean>
|
|
182
|
-
ResetRunner: (runner: IRunnerEx) => Promise<boolean>
|
|
183
|
-
ExecuteRunner: (runner: IRunnerEx) => Promise<boolean>
|
|
184
|
-
UpdateOptionsRunner: (runner: IRunnerEx, options: IRunnerOptions) => Promise<boolean>
|
|
185
|
-
|
|
186
|
-
Start: () => Promise<boolean>
|
|
187
|
-
Stop: () => Promise<boolean>
|
|
188
|
-
Pause: () => Promise<boolean>
|
|
189
|
-
Resume: () => Promise<boolean>
|
|
190
|
-
Terminate: () => Promise<boolean>
|
|
191
|
-
Reset: () => Promise<boolean>
|
|
192
|
-
Execute: () => Promise<boolean> // Execute a single iteration
|
|
193
|
-
UpdateOptions: (options: IRunnerOptions) => Promise<boolean>
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export interface ISTSTestWorkerOptions {
|
|
197
|
-
iterations: number
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export interface ITelemetryStore {
|
|
201
|
-
workers: Workers
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export interface ITestRunnerTelemetryPayload extends IIWMessagePayloadContentBase {
|
|
205
|
-
runner: IRunner
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export interface IWorkerFactory {
|
|
209
|
-
createWorkerThreadWorker: () => Worker // | wt.Worker
|
|
210
|
-
get workerThreadWorkerOptions(): IWorkerOptions // These options will be passed as a message to the thread worker once setup
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export interface IWorkerManagerOptions {
|
|
214
|
-
workerFactory: IWorkerFactory
|
|
215
|
-
publishInstrumentController: PublishInstrumentController
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export const PublishMessageCommandsTestRunner = {
|
|
219
|
-
...eIWMessageCommands,
|
|
220
|
-
GetAccessToken: '__GetAccessToken',
|
|
221
|
-
GetAccessTokenResponse: '__GetAccessTokenResponse',
|
|
222
|
-
GetDataFromPrimary: '__GetDataFromPrimary',
|
|
223
|
-
ExecuteRefreshToken: '__ExecuteRefreshToken',
|
|
224
|
-
ExecuteRefreshTokenResponse: '__ExecuteRefreshTokenResponse'
|
|
225
|
-
} as const
|
|
226
|
-
|
|
227
|
-
export type PublishMessageCommandsTestRunner = typeof PublishMessageCommandsTestRunner[keyof typeof PublishMessageCommandsTestRunner];
|
|
228
|
-
|
|
229
|
-
export interface IIWMessagePayloadContentBase {
|
|
230
|
-
messageId?: string;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export interface IIWMessagePayload {
|
|
234
|
-
command: IIWMessageCommand;
|
|
235
|
-
payload: IIWMessagePayloadContentBase;
|
|
236
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { PublishInstrumentController, InstrumentGaugeTelemetry, Gauge } from "@nsshunt/stsobservability";
|
|
2
|
-
import { IRunnerTelemetry } from "./commonTypes";
|
|
3
|
-
|
|
4
|
-
export class TelemetryProcessor {
|
|
5
|
-
ProcessTelemetry = (publishInstrumentController: PublishInstrumentController, telemetry: IRunnerTelemetry): boolean => {
|
|
6
|
-
let update = false;
|
|
7
|
-
|
|
8
|
-
if (telemetry.message) {
|
|
9
|
-
telemetry.message.forEach((message) => {
|
|
10
|
-
publishInstrumentController.LogEx(message);
|
|
11
|
-
});
|
|
12
|
-
update = true;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (telemetry.requestCount) {
|
|
16
|
-
publishInstrumentController.UpdateInstrument(Gauge.REQUEST_COUNT_GAUGE, {
|
|
17
|
-
val: telemetry.requestCount
|
|
18
|
-
} as InstrumentGaugeTelemetry);
|
|
19
|
-
update = true;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (telemetry.errorCount) {
|
|
23
|
-
publishInstrumentController.UpdateInstrument(Gauge.ERROR_COUNT_GAUGE, {
|
|
24
|
-
val: telemetry.errorCount
|
|
25
|
-
} as InstrumentGaugeTelemetry);
|
|
26
|
-
update = true;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (telemetry.retryCount) {
|
|
30
|
-
publishInstrumentController.UpdateInstrument(Gauge.RETRY_COUNT_GAUGE, {
|
|
31
|
-
val: telemetry.retryCount
|
|
32
|
-
} as InstrumentGaugeTelemetry);
|
|
33
|
-
update = true;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (telemetry.authenticationCount) {
|
|
37
|
-
publishInstrumentController.UpdateInstrument(Gauge.AUTHENTICATION_COUNT_GAUGE, {
|
|
38
|
-
val: telemetry.authenticationCount
|
|
39
|
-
} as InstrumentGaugeTelemetry);
|
|
40
|
-
update = true;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (telemetry.authenticationErrorCount) {
|
|
44
|
-
publishInstrumentController.UpdateInstrument(Gauge.AUTHENTICATION_ERROR_COUNT_GAUGE, {
|
|
45
|
-
val: telemetry.authenticationErrorCount
|
|
46
|
-
} as InstrumentGaugeTelemetry);
|
|
47
|
-
update = true;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (telemetry.authenticationRetryCount) {
|
|
51
|
-
publishInstrumentController.UpdateInstrument(Gauge.AUTHENTICATION_RETRY_COUNT_GAUGE, {
|
|
52
|
-
val: telemetry.authenticationRetryCount
|
|
53
|
-
} as InstrumentGaugeTelemetry);
|
|
54
|
-
update = true;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (telemetry.coreCount) {
|
|
58
|
-
publishInstrumentController.UpdateInstrument(Gauge.CORE_COUNT_GAUGE, {
|
|
59
|
-
val: telemetry.coreCount
|
|
60
|
-
} as InstrumentGaugeTelemetry);
|
|
61
|
-
update = true;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (telemetry.timer) {
|
|
65
|
-
publishInstrumentController.UpdateInstrument(Gauge.TIMER_GAUGE, {
|
|
66
|
-
val: telemetry.timer
|
|
67
|
-
} as InstrumentGaugeTelemetry);
|
|
68
|
-
update = true;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
publishInstrumentController.UpdateInstrument(Gauge.ACTIVE_REQUEST_GAUGE, {
|
|
72
|
-
val: telemetry.activeRequestCount
|
|
73
|
-
} as InstrumentGaugeTelemetry);
|
|
74
|
-
|
|
75
|
-
if (telemetry.velocity) {
|
|
76
|
-
publishInstrumentController.UpdateInstrument(Gauge.VELOCITY_GAUGE, {
|
|
77
|
-
Inc: telemetry.velocity
|
|
78
|
-
} as InstrumentGaugeTelemetry);
|
|
79
|
-
update = true;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (telemetry.duration) {
|
|
83
|
-
publishInstrumentController.UpdateInstrument(Gauge.DURATION_GAUGE, {
|
|
84
|
-
val: telemetry.duration
|
|
85
|
-
} as InstrumentGaugeTelemetry);
|
|
86
|
-
publishInstrumentController.UpdateInstrument(Gauge.DURATION_HISTOGRAM_GAUGE, {
|
|
87
|
-
val: telemetry.duration
|
|
88
|
-
} as InstrumentGaugeTelemetry);
|
|
89
|
-
update = true;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (telemetry.latency) {
|
|
93
|
-
publishInstrumentController.UpdateInstrument(Gauge.LATENCY_GAUGE, {
|
|
94
|
-
val: telemetry.latency
|
|
95
|
-
} as InstrumentGaugeTelemetry);
|
|
96
|
-
publishInstrumentController.UpdateInstrument(Gauge.LATENCY_HISTOGRAM_GAUGE, {
|
|
97
|
-
val: telemetry.latency
|
|
98
|
-
} as InstrumentGaugeTelemetry);
|
|
99
|
-
update = true;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (telemetry.childCount) {
|
|
103
|
-
publishInstrumentController.UpdateInstrument(Gauge.CHILD_COUNT, {
|
|
104
|
-
val: telemetry.childCount
|
|
105
|
-
} as InstrumentGaugeTelemetry);
|
|
106
|
-
update = true;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (telemetry.rx) {
|
|
110
|
-
publishInstrumentController.UpdateInstrument(Gauge.NETWORK_RX_GAUGE, {
|
|
111
|
-
Inc: telemetry.rx
|
|
112
|
-
} as InstrumentGaugeTelemetry);
|
|
113
|
-
update = true;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (telemetry.tx) {
|
|
117
|
-
publishInstrumentController.UpdateInstrument(Gauge.NETWORK_TX_GAUGE, {
|
|
118
|
-
Inc: telemetry.tx
|
|
119
|
-
} as InstrumentGaugeTelemetry);
|
|
120
|
-
update = true;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return update;
|
|
124
|
-
}
|
|
125
|
-
}
|