Improve duration formatting

This commit is contained in:
Henry Mercer 2024-10-10 19:09:47 +01:00
parent edd7713837
commit 222ac621e3
9 changed files with 49 additions and 14 deletions

View file

@ -15,7 +15,7 @@ import {
Feature,
FeatureEnablement,
} from "./feature-flags";
import { Logger } from "./logging";
import { formatDuration, Logger } from "./logging";
import * as tar from "./tar";
import {
downloadAndExtract,
@ -557,9 +557,9 @@ export const downloadCodeQL = async function (
);
logger.info(
`Added CodeQL bundle to the tool cache (${Math.round(
`Added CodeQL bundle to the tool cache (${formatDuration(
performance.now() - toolcacheStart,
)} ms).`,
)}).`,
);
// Defensive check: we expect `cacheDir` to copy the bundle to a new location.