Skip to content

Commit

Permalink
Add docs comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Mar 1, 2023
1 parent 636925f commit 9a943d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions benchmark/bench/server-stress.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export async function run(projectDir, outputFile) {
console.log('='.repeat(10));
console.log(`#### Server stress\n\n`);
let text = autocannon.printResult(result);
// Truncate the logs in CI so that the generated comment from the `!bench` command
// is shortened. Also we only need this information when comparing runs.
// Full log example: https://github.com/mcollina/autocannon#command-line
if (process.env.CI) {
text = text.match(/^.*?requests in.*?read$/m)?.[0];
}
Expand Down
3 changes: 3 additions & 0 deletions benchmark/ci-helper.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This script helps extract the benchmark logs that are between the `==========` lines.
// They are a convention defined in the `./bench/_template.js` file, which are used to log
// out with the `!bench` command. See `/.github/workflows/benchmark.yml` to see how it's used.
const benchLogs = process.argv[2];
const resultRegex = /==========(.*?)==========/gs;

Expand Down

0 comments on commit 9a943d3

Please sign in to comment.