Skip to content

Commit 5470751

Browse files
seanmonstarspl
authored andcommitted
Fix parsing Rust benchmark lines that include MB/s
Source: benchmark-action/github-action-benchmark#50
1 parent cc528ae commit 5470751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extract.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ function extractCargoResult(output: string): BenchmarkResult[] {
250250
const ret = [];
251251
// Example:
252252
// test bench_fib_20 ... bench: 37,174 ns/iter (+/- 7,527)
253-
const reExtract = /^test ([\w/]+)\s+\.\.\. bench:\s+([0-9,]+) ns\/iter \(\+\/- ([0-9,]+)\)$/;
253+
const reExtract = /^test ([\w/]+)\s+\.\.\. bench:\s+([0-9,]+) ns\/iter \(\+\/- ([0-9,]+)\)(?: = \d+ MB\/s)?$/;
254254
const reComma = /,/g;
255255

256256
for (const line of lines) {

0 commit comments

Comments
 (0)