diff options
author | 2022-10-13 15:22:51 -0400 | |
---|---|---|
committer | 2022-10-13 15:22:51 -0400 | |
commit | 9e041f464c97ee96eb8b0c31782f9447a831b141 (patch) | |
tree | f23545b5592746a89ce25897cb4ea94f5b1f8505 | |
parent | d361a3ec3581d8007f8b111c32d09c4936df6d31 (diff) | |
download | astro-9e041f464c97ee96eb8b0c31782f9447a831b141.tar.gz astro-9e041f464c97ee96eb8b0c31782f9447a831b141.tar.zst astro-9e041f464c97ee96eb8b0c31782f9447a831b141.zip |
Improved benchmark output (#5077)
* Improved benchmark output
* Show benchmarking table
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/benchmark.yml | 20 | ||||
-rw-r--r-- | package.json | 2 |
2 files changed, 13 insertions, 9 deletions
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 3e40038c9..3a52398e3 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -48,8 +48,8 @@ jobs: - name: Run benchmark id: benchmark-pr run: | - pnpm run --silent benchmark > ./bench-result.md - result=$(awk '/requests in/' ./bench-result.md) + pnpm run --silent benchmark &> ./bench-result.md + result=$(awk -v RS="" '/┌/' ./bench-result.md) echo "::set-output name=BENCH_RESULT${{matrix.node-version}}::$result" # main benchmark @@ -68,8 +68,8 @@ jobs: - name: Run benchmark id: benchmark-main run: | - pnpm run --silent benchmark > ./bench-result.md - result=$(awk '/requests in/' ./bench-result.md) + pnpm run --silent benchmark &> ./bench-result.md + result=$(awk -v RS="" '/┌/' ./bench-result.md) echo "::set-output name=BENCH_RESULT${{matrix.node-version}}::$result" output-benchmark: @@ -86,11 +86,15 @@ jobs: pr_number: ${{ github.event.issue.number }} message: | **Node**: 14 - **PR**: ${{ needs.benchmark.outputs.PR-BENCH-14 }} - **MAIN**: ${{ needs.benchmark.outputs.MAIN-BENCH-14 }} + **PR**: + ${{ needs.benchmark.outputs.PR-BENCH-14 }} + **MAIN**: + ${{ needs.benchmark.outputs.MAIN-BENCH-14 }} --- **Node**: 16 - **PR**: ${{ needs.benchmark.outputs.PR-BENCH-16 }} - **MAIN**: ${{ needs.benchmark.outputs.MAIN-BENCH-16 }} + **PR**: + ${{ needs.benchmark.outputs.PR-BENCH-16 }} + **MAIN**: + ${{ needs.benchmark.outputs.MAIN-BENCH-16 }} diff --git a/package.json b/package.json index cd298e1ff..57007bd93 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "test:vite-ci": "turbo run test --filter=astro --output-logs=new-only --no-deps --concurrency=1", "test:e2e": "cd packages/astro && pnpm playwright install && pnpm run test:e2e", "test:e2e:match": "cd packages/astro && pnpm playwright install && pnpm run test:e2e:match", - "benchmark": "pnpm --filter @benchmark/simple run build && pnpm dlx concurrently -k -s first \"node packages/astro/test/benchmark/simple/server.mjs\" \"pnpm dlx autocannon -c 100 -d 30 -p 10 localhost:3002/\"", + "benchmark": "pnpm --filter @benchmark/simple run build && pnpm dlx concurrently -k -s first --raw \"node packages/astro/test/benchmark/simple/server.mjs\" \"pnpm dlx autocannon -c 100 -d 30 -p 10 localhost:3002/\"", "lint": "eslint .", "version": "changeset version && pnpm install --no-frozen-lockfile && pnpm run format" }, |