diff --git a/dist/src/extract.js b/dist/src/extract.js index 35bff8b67..8947f6ceb 100644 --- a/dist/src/extract.js +++ b/dist/src/extract.js @@ -100,8 +100,8 @@ function extractCargoResult(output) { const lines = output.split(/\r?\n/g); const ret = []; // Example: - // test bench_fib_20 ... bench: 37,174 ns/iter (+/- 7,527) - const reExtract = /^test (.+)\s+\.\.\. bench:\s+([0-9,]+) ns\/iter \(\+\/- ([0-9,]+)\)$/; + // 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,.]+)\)$/; const reComma = /,/g; for (const line of lines) { const m = line.match(reExtract); @@ -109,7 +109,7 @@ function extractCargoResult(output) { continue; } const name = m[1].trim(); - const value = parseInt(m[2].replace(reComma, ''), 10); + const value = parseFloat(m[2].replace(reComma, '')); const range = m[3].replace(reComma, ''); ret.push({ name,