summaryrefslogtreecommitdiff
path: root/benchmark/ci-helper.js
blob: 2dbdf5acf1953946251622d04574ba850a1918cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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;

let processedLog = '';
let m;
while ((m = resultRegex.exec(benchLogs))) {
	processedLog += m[1] + '\n';
}

console.log(processedLog);