Skip to content

Commit e4c5ad5

Browse files
author
Eric Leese
committed
Report test durations in seconds, not ms
Bug: 408145209 Change-Id: I25bc8902ea54c3dc994b9e00dce11351dc7221b7 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6430184 Auto-Submit: Eric Leese <leese@chromium.org> Reviewed-by: Liviu Rau <liviurau@chromium.org> Commit-Queue: Liviu Rau <liviurau@chromium.org> Commit-Queue: Eric Leese <leese@chromium.org>
1 parent 5891e97 commit e4c5ad5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/conductor/karma-resultsdb-reporter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ export const ResultsDBReporter = function(
6565
const testId = ResultsDb.sanitizedTestId([...suite, description].join('/'));
6666
const expected = success || skipped;
6767
const status = skipped ? 'SKIP' : success ? 'PASS' : 'FAIL';
68-
let duration = '1ms';
68+
let duration = '.001s';
6969
if (startTime < endTime) {
70-
duration = (endTime - startTime).toString() + 'ms';
70+
duration = ((endTime - startTime) * .001).toString() + 's';
7171
}
7272

7373
const consoleLog = capturedLog.map(({type, log}) => `${type.toUpperCase()}: ${log}`);

test/shared/mocha-resultsdb-reporter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class ResultsDbReporter extends Mocha.reporters.Spec {
134134
const testRetry = ((test as unknown) as TestRetry);
135135
const result = {
136136
testId: ResultsDb.sanitizedTestId(testId),
137-
duration: `${test.duration || 0}ms`,
137+
duration: `${(test.duration || 0) * .001}s`,
138138
tags: [{key: 'run', value: String(testRetry.currentRetry() + 1)}],
139139
};
140140
const hookName = this.maybeHook(test);

0 commit comments

Comments
 (0)