From 5c9a206eb30e6a185cf0e7ac63d8c3114847417c Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Fri, 29 Sep 2023 10:32:02 +0200 Subject: [PATCH] fix(benchmark): write benchmark results to file --- .github/workflows/benchmark.yml | 2 +- .gitignore | 3 +++ packages/opentelemetry-sdk-trace-base/package.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index ea05c89e73..04961b83df 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -50,7 +50,7 @@ jobs: - name: Benchmark tests run: | npm run test:bench - find . -name benchmarks.txt -exec cat {} + > combined_benchmarks.txt + find . -name .benchmark-results.txt -exec cat {} + > combined_benchmarks.txt - name: Store benchmark results uses: benchmark-action/github-action-benchmark@v1 diff --git a/.gitignore b/.gitignore index 90ef9bd3f2..59141394bb 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,6 @@ package.json.lerna_backup #IDEA .idea *.iml + +# non-aggregated benchmark results +.benchmark-results.txt diff --git a/packages/opentelemetry-sdk-trace-base/package.json b/packages/opentelemetry-sdk-trace-base/package.json index 97d034bfef..10aa4f830e 100644 --- a/packages/opentelemetry-sdk-trace-base/package.json +++ b/packages/opentelemetry-sdk-trace-base/package.json @@ -20,7 +20,7 @@ "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'", "test:browser": "karma start --single-run", "test:webworker": "karma start karma.worker.js --single-run", - "test:bench": "node test/performance/benchmark/index.js", + "test:bench": "node test/performance/benchmark/index.js | tee .benchmark-results.txt", "tdd": "npm run tdd:node", "tdd:node": "npm run test -- --watch-extensions ts --watch", "tdd:browser": "karma start",