Always round test duration to milliseconds

Bug: 408145209
Change-Id: I7246d08a8ff033c081a141b49ded7070f977ddd6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6429854
Commit-Queue: Eric Leese <leese@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
This commit is contained in:
Eric Leese
2025-04-03 09:31:49 -07:00
committed by Devtools-frontend LUCI CQ
parent c71b0b48ef
commit 9876f54da0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ export const ResultsDBReporter = function(
const status = skipped ? 'SKIP' : success ? 'PASS' : 'FAIL';
let duration = '.001s';
if (startTime < endTime) {
duration = ((endTime - startTime) * .001).toString() + 's';
duration = ((endTime - startTime) * .001).toFixed(3) + 's';
}
const consoleLog = capturedLog.map(({type, log}) => `${type.toUpperCase()}: ${log}`);
+1 -1
View File
@@ -134,7 +134,7 @@ class ResultsDbReporter extends Mocha.reporters.Spec {
const testRetry = ((test as unknown) as TestRetry);
const result = {
testId: ResultsDb.sanitizedTestId(testId),
duration: `${(test.duration || 0) * .001}s`,
duration: `${((test.duration || 1) * .001).toFixed(3)}s`,
tags: [{key: 'run', value: String(testRetry.currentRetry() + 1)}],
};
const hookName = this.maybeHook(test);