Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support Cargo optional MB/s output #255

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ function extractCargoResult(output: string): BenchmarkResult[] {
const ret = [];
// Example:
// test bench_fib_20 ... bench: 37,174.25 ns/iter (+/- 7,527.43)
const reExtract = /^test (.+)\s+\.\.\. bench:\s+([0-9,.]+) ns\/iter \(\+\/- ([0-9,.]+)\)$/;
// test hello_world_16 ... bench: 44,545.33 ns/iter (+/- 8,989.85) = 44 MB/s
const reExtract = /^test (.+)\s+\.\.\. bench:\s+([0-9,.]+) ns\/iter \(\+\/- ([0-9,.]+)\)(?: = [0-9,.]+ MB\/s)?$/;
const reComma = /,/g;

for (const line of lines) {
Expand Down