Skip to content

Commit bf97e28

Browse files
osa1Commit Queue
authored andcommitted
[dart2wasm] Fix reporting measurements in WasmJSInterop benchmarks
benchmark_harness's `measureFor` returns in microseconds, but we currently show the numbers with the unit "ns". Convert the microseconds reported by benchmark_harness to nanoseconds when reporting. We could also report in microseconds, but the numbers would be very small, with a few zeros before fractional digits. So keep reporting in nanoseconds. Change-Id: I189190b2139c8e2d39b8bef84159585ab0967980 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436904 Commit-Queue: Ömer Ağacan <[email protected]> Reviewed-by: Martin Kustermann <[email protected]>
1 parent 2273611 commit bf97e28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benchmarks/WasmJSInterop/dart/WasmJSInterop.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,6 @@ void main() {
341341
}
342342

343343
/// Reports in Golem-specific format.
344-
void report(String name, double nsPerCall) {
345-
print('$name(RunTimeRaw): $nsPerCall ns.');
344+
void report(String name, double usPerCall) {
345+
print('$name(RunTimeRaw): ${usPerCall * 1000} ns.');
346346
}

0 commit comments

Comments
 (0)