[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 <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This commit is contained in:
Ömer Ağacan
2025-06-25 06:49:29 -07:00
committed by Commit Queue
parent 2273611355
commit bf97e28b6d
@@ -341,6 +341,6 @@ void main() {
}
/// Reports in Golem-specific format.
void report(String name, double nsPerCall) {
print('$name(RunTimeRaw): $nsPerCall ns.');
void report(String name, double usPerCall) {
print('$name(RunTimeRaw): ${usPerCall * 1000} ns.');
}