From 65964eede2d4420a75ed4259630bd39332999688 Mon Sep 17 00:00:00 2001 From: Chris Trzesniewski Date: Sun, 19 May 2024 11:51:29 +0200 Subject: [PATCH] v1.20.2 --- dist/src/extract.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,