diff --git a/.cspell.json b/.cspell.json index 807cb9b4ce8..72162b8152a 100644 --- a/.cspell.json +++ b/.cspell.json @@ -4,21 +4,21 @@ "minWordLength": 4, "allowCompoundWords": true, "words": [ - "outsh", "adminpw", "Albertirsa", "ALLFORTX", - "Anoncreds", "anoncreds", + "Anoncreds", "ANYFORTX", - "APIV", "Apim", + "APIV", "approveformyorg", - "Askar", "askar", + "Askar", "Authz", "authzn", "AWSSM", + "benchmarkjs", "Besu", "Bools", "brioux", @@ -47,8 +47,8 @@ "data", "dclm", "DHTAPI", - "Dids", "dids", + "Dids", "DockerOde", "ealen", "ecparams", @@ -80,8 +80,8 @@ "ipaddress", "ipfs", "IPFSHTTP", - "IPLD", "ipld", + "IPLD", "Iroha", "Irohad", "isready", @@ -127,6 +127,7 @@ "organisation", "Orgs", "ossp", + "outsh", "parameterizable", "Postgres", "proto", diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c29d13796e6..5efae83d5c9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -386,6 +386,38 @@ jobs: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh + + - name: Ensure .tmp Directory Exists + run: mkdir -p .tmp/benchmark-results/cmd-api-server/ + + # Download previous benchmark result from cache (if exists) + - name: Download previous benchmark data + uses: actions/cache@v3.3.1 + with: + path: .tmp/benchmark-results/cmd-api-server/ + key: ${{ runner.os }}-benchmark + + - name: Run Benchmarks + working-directory: ./packages/cactus-cmd-api-server/ + run: yarn run benchmark + + - name: Store benchmark result + uses: benchmark-action/github-action-benchmark@v1.19.2 + with: + tool: 'benchmarkjs' + output-file-path: .tmp/benchmark-results/cmd-api-server/run-cmd-api-server-benchmark.ts.log + github-token: ${{ secrets.GITHUB_TOKEN }} + + # Only push the benchmark results to gh-pages website if we are running on the main branch + # We do not want to clutter the benchmark results with intermediate results from PRs that could be drafts + auto-push: ${{ github.ref == 'refs/heads/main' }} + + # Show alert with commit comment on detecting possible performance regression + alert-threshold: '5%' + comment-on-alert: true + fail-on-alert: true + alert-comment-cc-users: '@petermetz' + cactus-cmd-socketio-server: continue-on-error: false env: diff --git a/package.json b/package.json index 646b62b9067..2d065b09074 100644 --- a/package.json +++ b/package.json @@ -112,6 +112,7 @@ "@lerna-lite/version": "3.1.0", "@openapitools/openapi-generator-cli": "2.7.0", "@types/adm-zip": "0.5.0", + "@types/benchmark": "2.1.5", "@types/fs-extra": "9.0.13", "@types/jest": "29.5.3", "@types/node": "16.18.41", @@ -123,6 +124,7 @@ "@typescript-eslint/eslint-plugin": "6.4.0", "@typescript-eslint/parser": "6.4.0", "adm-zip": "0.5.10", + "benchmark": "2.1.4", "buffer": "6.0.3", "cpy-cli": "4.2.0", "cross-env": "7.0.3", diff --git a/packages/cactus-cmd-api-server/package.json b/packages/cactus-cmd-api-server/package.json index 1e925cb7239..019b218120a 100644 --- a/packages/cactus-cmd-api-server/package.json +++ b/packages/cactus-cmd-api-server/package.json @@ -43,6 +43,7 @@ "dist/*" ], "scripts": { + "benchmark": "tsx ./src/test/typescript/benchmark/run-cmd-api-server-benchmark.ts .tmp/benchmark-results/cmd-api-server/run-cmd-api-server-benchmark.ts.log", "codegen": "run-p 'codegen:*'", "codegen:openapi": "npm run generate-sdk", "codegen:proto": "run-s proto:openapi proto:protoc-gen-ts", @@ -97,6 +98,7 @@ "@hyperledger/cactus-plugin-keychain-vault": "2.0.0-alpha.2", "@hyperledger/cactus-test-tooling": "2.0.0-alpha.2", "@openapitools/openapi-generator-cli": "2.7.0", + "@types/benchmark": "2.1.5", "@types/compression": "1.7.4", "@types/convict": "6.1.1", "@types/cors": "2.8.12", @@ -114,11 +116,13 @@ "@types/semver": "7.3.8", "@types/uuid": "8.3.4", "@types/xml2js": "0.4.9", + "benchmark": "2.1.4", "google-protobuf": "3.18.0-rc.2", "grpc-tools": "1.12.4", "grpc_tools_node_protoc_ts": "5.3.3", "http-status-codes": "2.1.4", - "protobufjs": "7.2.5" + "protobufjs": "7.2.5", + "tsx": "4.7.0" }, "engines": { "node": ">=18", diff --git a/packages/cactus-cmd-api-server/src/test/typescript/benchmark/run-cmd-api-server-benchmark.ts b/packages/cactus-cmd-api-server/src/test/typescript/benchmark/run-cmd-api-server-benchmark.ts new file mode 100644 index 00000000000..f44b2a64359 --- /dev/null +++ b/packages/cactus-cmd-api-server/src/test/typescript/benchmark/run-cmd-api-server-benchmark.ts @@ -0,0 +1,251 @@ +import path from "path"; +import { EOL } from "os"; + +import * as Benchmark from "benchmark"; +import { v4 as uuidv4 } from "uuid"; +import type { AuthorizeOptions as SocketIoJwtOptions } from "@thream/socketio-jwt"; +import type { Params as ExpressJwtOptions } from "express-jwt"; +import { SignJWT, exportSPKI, generateKeyPair } from "jose"; +import { RuntimeError } from "run-time-error-cjs"; +import * as grpc from "@grpc/grpc-js"; +import fse from "fs-extra"; + +import { LogLevelDesc } from "@hyperledger/cactus-common"; + +import { IJoseFittingJwtParams } from "@hyperledger/cactus-common"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { Constants } from "@hyperledger/cactus-core-api"; + +import { + ApiServer, + ApiServerApiClient, + ApiServerApiClientConfiguration, + AuthorizationProtocol, + ConfigService, + IAuthorizationConfig, +} from "../../../main/typescript/public-api"; + +import { default_service, empty } from "../../../main/typescript/public-api"; + +const LOG_TAG = + "[packages/cactus-cmd-api-server/src/test/typescript/benchmark/run-cmd-api-server-benchmark.ts]"; + +const createTestInfrastructure = async (opts: { + readonly logLevel: LogLevelDesc; +}): Promise<{ + readonly httpApi: ApiServerApiClient; + readonly grpcCredentials: grpc.ChannelCredentials; + readonly grpcHost: string; + readonly apiServer: ApiServer; +}> => { + const logLevel = opts.logLevel || "DEBUG"; + + const jwtKeyPair = await generateKeyPair("RS256", { modulusLength: 4096 }); + const jwtPublicKey = await exportSPKI(jwtKeyPair.publicKey); + const expressJwtOptions: ExpressJwtOptions & IJoseFittingJwtParams = { + algorithms: ["RS256"], + secret: jwtPublicKey, + audience: uuidv4(), + issuer: uuidv4(), + }; + const socketIoJwtOptions: SocketIoJwtOptions = { + secret: jwtPublicKey, + algorithms: ["RS256"], + }; + + const authorizationConfig: IAuthorizationConfig = { + unprotectedEndpointExemptions: [], + expressJwtOptions, + socketIoJwtOptions, + socketIoPath: Constants.SocketIoConnectionPathV1, + }; + + const pluginsPath = path.join( + __dirname, + "../../../../../../", // walk back up to the project root + "packages/cactus-cmd-api-server/src/test/typescript/benchmark/run-cmd-api-server-benchmark/", // the dir path from the root + uuidv4(), // then a random directory to ensure proper isolation + ); + const pluginManagerOptionsJson = JSON.stringify({ pluginsPath }); + + const pluginRegistry = new PluginRegistry({ logLevel }); + + const configService = new ConfigService(); + + const apiSrvOpts = await configService.newExampleConfig(); + apiSrvOpts.logLevel = logLevel; + apiSrvOpts.pluginManagerOptionsJson = pluginManagerOptionsJson; + apiSrvOpts.authorizationProtocol = AuthorizationProtocol.JSON_WEB_TOKEN; + apiSrvOpts.authorizationConfigJson = authorizationConfig; + apiSrvOpts.configFile = ""; + apiSrvOpts.apiCorsDomainCsv = "*"; + apiSrvOpts.apiPort = 0; + apiSrvOpts.cockpitPort = 0; + apiSrvOpts.grpcPort = 0; + apiSrvOpts.apiTlsEnabled = false; + apiSrvOpts.grpcMtlsEnabled = false; + apiSrvOpts.plugins = []; + + const config = await configService.newExampleConfigConvict(apiSrvOpts); + + const apiServer = new ApiServer({ + config: config.getProperties(), + pluginRegistry, + }); + + apiServer.initPluginRegistry({ pluginRegistry }); + const startResponsePromise = apiServer.start(); + + const { addressInfoApi, addressInfoGrpc } = await startResponsePromise; + const protocol = apiSrvOpts.apiTlsEnabled ? "https" : "http"; + const { address, port } = addressInfoApi; + const apiHost = `${protocol}://${address}:${port}`; + + const grpcHost = `${addressInfoGrpc.address}:${addressInfoGrpc.port}`; + + const jwtPayload = { name: "Peter", location: "Albertirsa" }; + const validJwt = await new SignJWT(jwtPayload) + .setProtectedHeader({ alg: "RS256" }) + .setIssuer(expressJwtOptions.issuer) + .setAudience(expressJwtOptions.audience) + .sign(jwtKeyPair.privateKey); + + const validBearerToken = `Bearer ${validJwt}`; + + const apiClient = new ApiServerApiClient( + new ApiServerApiClientConfiguration({ + basePath: apiHost, + baseOptions: { headers: { Authorization: validBearerToken } }, + logLevel, + }), + ); + + const grpcCredentials = grpc.credentials.createInsecure(); + + return { + grpcCredentials, + httpApi: apiClient, + grpcHost, + apiServer, + }; +}; + +const main = async (opts: { readonly argv: Readonly> }) => { + const logLevel: LogLevelDesc = "WARN"; + + const gitRootPath = path.join( + __dirname, + "../../../../../../", // walk back up to the project root + ); + + console.log("%s gitRootPath=%s", LOG_TAG, gitRootPath); + + const DEFAULT_OUTPUT_FILE_RELATIVE_PATH = + ".tmp/benchmark-results/cmd-api-server/run-cmd-api-server-benchmark.ts.log"; + + const relativeOutputFilePath = + opts.argv[2] === undefined + ? DEFAULT_OUTPUT_FILE_RELATIVE_PATH + : opts.argv[2]; + + console.log( + "%s DEFAULT_OUTPUT_FILE_RELATIVE_PATH=%s", + LOG_TAG, + DEFAULT_OUTPUT_FILE_RELATIVE_PATH, + ); + + console.log("%s opts.argv[2]=%s", LOG_TAG, opts.argv[2]); + + console.log("%s relativeOutputFilePath=%s", LOG_TAG, relativeOutputFilePath); + + const absoluteOutputFilePath = path.join(gitRootPath, relativeOutputFilePath); + + console.log("%s absoluteOutputFilePath=%s", LOG_TAG, absoluteOutputFilePath); + + const absoluteOutputDirPath = path.dirname(absoluteOutputFilePath); + console.log("%s absoluteOutputDirPath=%s", LOG_TAG, absoluteOutputDirPath); + + await fse.mkdirp(absoluteOutputDirPath); + console.log("%s mkdir -p OK: %s", LOG_TAG, absoluteOutputDirPath); + + const { apiServer, httpApi, grpcHost, grpcCredentials } = + await createTestInfrastructure({ logLevel }); + + const minSamples = 100; + const suite = new Benchmark.Suite({}); + + const cycles: string[] = []; + + await new Promise((resolve, reject) => { + suite + .add("cmd-api-server_HTTP_GET_getOpenApiSpecV1", { + defer: true, + minSamples, + fn: async function (deferred: Benchmark.Deferred) { + await httpApi.getOpenApiSpecV1(); + deferred.resolve(); + }, + }) + .add("cmd-api-server_gRPC_GetOpenApiSpecV1", { + defer: true, + minSamples, + fn: async function (deferred: Benchmark.Deferred) { + const grpcClient = + new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( + grpcHost, + grpcCredentials, + ); + + await new Promise( + (resolve, reject) => { + const req = new empty.google.protobuf.Empty(); + grpcClient.GetOpenApiSpecV1(req, (err3, value) => { + if (err3) { + reject(err3); + } else if (value) { + resolve(value); + } else { + reject( + new RuntimeError("Response object received is falsy."), + ); + } + }); + }, + ); + + grpcClient.close(); + deferred.resolve(); + }, + }) + .on("cycle", (event: { target: unknown }) => { + // Output benchmark result by converting benchmark result to string + // Example line on stdout: + // cmd-api-server_HTTP_GET_getOpenApiSpecV1 x 1,020 ops/sec ±2.25% (177 runs sampled) + const cycle = String(event.target); + console.log("%s Benchmark.js CYCLE: %s", LOG_TAG, cycle); + cycles.push(cycle); + }) + .on("complete", function () { + console.log("%s Benchmark.js COMPLETE.", LOG_TAG); + resolve(suite); + }) + .on("error", (ex: unknown) => { + console.log("%s Benchmark.js ERROR: %o", LOG_TAG, ex); + reject(ex); + }) + .run(); + }); + + const data = cycles.join(EOL); + console.log("%s Writing results...", LOG_TAG); + await fse.writeFile(absoluteOutputFilePath, data, { encoding: "utf-8" }); + console.log("%s Wrote results to %s", LOG_TAG, absoluteOutputFilePath); + + await apiServer.shutdown(); + console.log("%s Shut down API server OK", LOG_TAG); +}; + +main({ argv: process.argv }).catch((ex: unknown) => { + console.error("%s process crashed with:", LOG_TAG, ex); + process.exit(1); +}); diff --git a/yarn.lock b/yarn.lock index a6c103eded0..175790c8fe2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5175,6 +5175,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/aix-ppc64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/aix-ppc64@npm:0.19.12" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/android-arm64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/android-arm64@npm:0.18.17" @@ -5189,6 +5196,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/android-arm64@npm:0.19.12" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/android-arm@npm:0.15.18": version: 0.15.18 resolution: "@esbuild/android-arm@npm:0.15.18" @@ -5210,6 +5224,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/android-arm@npm:0.19.12" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + "@esbuild/android-x64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/android-x64@npm:0.18.17" @@ -5224,6 +5245,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/android-x64@npm:0.19.12" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + "@esbuild/darwin-arm64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/darwin-arm64@npm:0.18.17" @@ -5238,6 +5266,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-arm64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/darwin-arm64@npm:0.19.12" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/darwin-x64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/darwin-x64@npm:0.18.17" @@ -5252,6 +5287,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/darwin-x64@npm:0.19.12" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@esbuild/freebsd-arm64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/freebsd-arm64@npm:0.18.17" @@ -5266,6 +5308,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-arm64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/freebsd-arm64@npm:0.19.12" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/freebsd-x64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/freebsd-x64@npm:0.18.17" @@ -5280,6 +5329,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/freebsd-x64@npm:0.19.12" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/linux-arm64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/linux-arm64@npm:0.18.17" @@ -5294,6 +5350,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-arm64@npm:0.19.12" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/linux-arm@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/linux-arm@npm:0.18.17" @@ -5308,6 +5371,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-arm@npm:0.19.12" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + "@esbuild/linux-ia32@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/linux-ia32@npm:0.18.17" @@ -5322,6 +5392,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ia32@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-ia32@npm:0.19.12" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/linux-loong64@npm:0.15.18": version: 0.15.18 resolution: "@esbuild/linux-loong64@npm:0.15.18" @@ -5343,6 +5420,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-loong64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-loong64@npm:0.19.12" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + "@esbuild/linux-mips64el@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/linux-mips64el@npm:0.18.17" @@ -5357,6 +5441,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-mips64el@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-mips64el@npm:0.19.12" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + "@esbuild/linux-ppc64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/linux-ppc64@npm:0.18.17" @@ -5371,6 +5462,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ppc64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-ppc64@npm:0.19.12" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/linux-riscv64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/linux-riscv64@npm:0.18.17" @@ -5385,6 +5483,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-riscv64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-riscv64@npm:0.19.12" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + "@esbuild/linux-s390x@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/linux-s390x@npm:0.18.17" @@ -5399,6 +5504,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-s390x@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-s390x@npm:0.19.12" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + "@esbuild/linux-x64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/linux-x64@npm:0.18.17" @@ -5413,6 +5525,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/linux-x64@npm:0.19.12" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + "@esbuild/netbsd-x64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/netbsd-x64@npm:0.18.17" @@ -5427,6 +5546,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/netbsd-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/netbsd-x64@npm:0.19.12" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/openbsd-x64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/openbsd-x64@npm:0.18.17" @@ -5441,6 +5567,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/openbsd-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/openbsd-x64@npm:0.19.12" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/sunos-x64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/sunos-x64@npm:0.18.17" @@ -5455,6 +5588,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/sunos-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/sunos-x64@npm:0.19.12" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + "@esbuild/win32-arm64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/win32-arm64@npm:0.18.17" @@ -5469,6 +5609,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-arm64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/win32-arm64@npm:0.19.12" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/win32-ia32@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/win32-ia32@npm:0.18.17" @@ -5483,6 +5630,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-ia32@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/win32-ia32@npm:0.19.12" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/win32-x64@npm:0.18.17": version: 0.18.17 resolution: "@esbuild/win32-x64@npm:0.18.17" @@ -5497,6 +5651,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-x64@npm:0.19.12": + version: 0.19.12 + resolution: "@esbuild/win32-x64@npm:0.19.12" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" @@ -7050,6 +7211,7 @@ __metadata: "@hyperledger/cactus-test-tooling": 2.0.0-alpha.2 "@openapitools/openapi-generator-cli": 2.7.0 "@thream/socketio-jwt": 2.1.1 + "@types/benchmark": 2.1.5 "@types/compression": 1.7.4 "@types/convict": 6.1.1 "@types/cors": 2.8.12 @@ -7069,6 +7231,7 @@ __metadata: "@types/xml2js": 0.4.9 async-exit-hook: 2.0.1 axios: 1.6.0 + benchmark: 2.1.4 bluebird: 3.7.2 body-parser: 1.20.2 compression: 1.7.4 @@ -7097,6 +7260,7 @@ __metadata: semver: 7.5.2 socket.io: 4.5.4 socket.io-client-fixed-types: 4.5.4 + tsx: 4.7.0 typescript-optional: 2.0.1 uuid: 8.3.2 languageName: unknown @@ -8785,6 +8949,7 @@ __metadata: "@lerna-lite/version": 3.1.0 "@openapitools/openapi-generator-cli": 2.7.0 "@types/adm-zip": 0.5.0 + "@types/benchmark": 2.1.5 "@types/fs-extra": 9.0.13 "@types/jest": 29.5.3 "@types/node": 16.18.41 @@ -8796,6 +8961,7 @@ __metadata: "@typescript-eslint/eslint-plugin": 6.4.0 "@typescript-eslint/parser": 6.4.0 adm-zip: 0.5.10 + benchmark: 2.1.4 buffer: 6.0.3 cpy-cli: 4.2.0 cross-env: 7.0.3 @@ -13007,6 +13173,13 @@ __metadata: languageName: node linkType: hard +"@types/benchmark@npm:2.1.5": + version: 2.1.5 + resolution: "@types/benchmark@npm:2.1.5" + checksum: 2d052d96b2982997cad13b2c267bdc00e180a607484f05e957bea06a44d632eabf72ff8dc239ee3c2bea0dff877c805b6e01b208520590c197f1b5f3b3867cb4 + languageName: node + linkType: hard + "@types/bn.js@npm:*, @types/bn.js@npm:5.1.0, @types/bn.js@npm:^5.1.0": version: 5.1.0 resolution: "@types/bn.js@npm:5.1.0" @@ -17776,6 +17949,16 @@ __metadata: languageName: node linkType: hard +"benchmark@npm:2.1.4": + version: 2.1.4 + resolution: "benchmark@npm:2.1.4" + dependencies: + lodash: ^4.17.4 + platform: ^1.3.3 + checksum: aa466561d4f2b0a2419a3069b8f90fd35ffacf26849697eea9de525ecfbd10b44da11070cc51c88d772076db8cb2415641b493de7d6c024fdf8551019c6fcf1c + languageName: node + linkType: hard + "bfj@npm:^7.0.2": version: 7.0.2 resolution: "bfj@npm:7.0.2" @@ -24067,6 +24250,86 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.19.10": + version: 0.19.12 + resolution: "esbuild@npm:0.19.12" + dependencies: + "@esbuild/aix-ppc64": 0.19.12 + "@esbuild/android-arm": 0.19.12 + "@esbuild/android-arm64": 0.19.12 + "@esbuild/android-x64": 0.19.12 + "@esbuild/darwin-arm64": 0.19.12 + "@esbuild/darwin-x64": 0.19.12 + "@esbuild/freebsd-arm64": 0.19.12 + "@esbuild/freebsd-x64": 0.19.12 + "@esbuild/linux-arm": 0.19.12 + "@esbuild/linux-arm64": 0.19.12 + "@esbuild/linux-ia32": 0.19.12 + "@esbuild/linux-loong64": 0.19.12 + "@esbuild/linux-mips64el": 0.19.12 + "@esbuild/linux-ppc64": 0.19.12 + "@esbuild/linux-riscv64": 0.19.12 + "@esbuild/linux-s390x": 0.19.12 + "@esbuild/linux-x64": 0.19.12 + "@esbuild/netbsd-x64": 0.19.12 + "@esbuild/openbsd-x64": 0.19.12 + "@esbuild/sunos-x64": 0.19.12 + "@esbuild/win32-arm64": 0.19.12 + "@esbuild/win32-ia32": 0.19.12 + "@esbuild/win32-x64": 0.19.12 + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 2936e29107b43e65a775b78b7bc66ddd7d76febd73840ac7e825fb22b65029422ff51038a08d19b05154f543584bd3afe7d1ef1c63900429475b17fbe61cb61f + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -27192,6 +27455,16 @@ __metadata: languageName: node linkType: hard +"fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: latest + checksum: 11e6ea6fea15e42461fc55b4b0e4a0a3c654faa567f1877dbd353f39156f69def97a69936d1746619d656c4b93de2238bf731f6085a03a50cabf287c9d024317 + conditions: os=darwin + languageName: node + linkType: hard + "fsevents@patch:fsevents@^2.3.2#~builtin, fsevents@patch:fsevents@~2.3.2#~builtin": version: 2.3.2 resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1" @@ -27201,6 +27474,15 @@ __metadata: languageName: node linkType: hard +"fsevents@patch:fsevents@~2.3.3#~builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: latest + conditions: os=darwin + languageName: node + linkType: hard + "function-bind@npm:^1.1.1": version: 1.1.1 resolution: "function-bind@npm:1.1.1" @@ -27612,6 +27894,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.7.2": + version: 4.7.2 + resolution: "get-tsconfig@npm:4.7.2" + dependencies: + resolve-pkg-maps: ^1.0.0 + checksum: 172358903250eff0103943f816e8a4e51d29b8e5449058bdf7266714a908a48239f6884308bd3a6ff28b09f692b9533dbebfd183ab63e4e14f073cda91f1bca9 + languageName: node + linkType: hard + "get-uv-event-loop-napi-h@npm:^1.0.5": version: 1.0.6 resolution: "get-uv-event-loop-napi-h@npm:1.0.6" @@ -39529,6 +39820,13 @@ __metadata: languageName: node linkType: hard +"platform@npm:^1.3.3": + version: 1.3.6 + resolution: "platform@npm:1.3.6" + checksum: 6f472a09c61d418c7e26c1c16d0bdc029549d512dbec6526216a1e59ec68100d07007d0097dcba69dddad883d6f2a83361b4bdfe0094a3d9a2af24158643d85e + languageName: node + linkType: hard + "please-upgrade-node@npm:^3.2.0": version: 3.2.0 resolution: "please-upgrade-node@npm:3.2.0" @@ -42734,6 +43032,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: 1012afc566b3fdb190a6309cc37ef3b2dcc35dff5fa6683a9d00cd25c3247edfbc4691b91078c97adc82a29b77a2660c30d791d65dab4fc78bfc473f60289977 + languageName: node + linkType: hard + "resolve-url-loader@npm:5.0.0": version: 5.0.0 resolution: "resolve-url-loader@npm:5.0.0" @@ -47537,6 +47842,22 @@ __metadata: languageName: node linkType: hard +"tsx@npm:4.7.0": + version: 4.7.0 + resolution: "tsx@npm:4.7.0" + dependencies: + esbuild: ~0.19.10 + fsevents: ~2.3.3 + get-tsconfig: ^4.7.2 + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: a3a17fa8a40dbe0aff26fb2bc71a069e568152e0685b0bd9a31ea1091806274ba14882551433ed01efa7eae16f1aa965e2e47f3075ec1e914c42cf5dfce1f924 + languageName: node + linkType: hard + "tsyringe@npm:^4.8.0": version: 4.8.0 resolution: "tsyringe@npm:4.8.0"