Improve duration formatting
This commit is contained in:
parent
edd7713837
commit
222ac621e3
9 changed files with 49 additions and 14 deletions
3
lib/setup-codeql.js
generated
3
lib/setup-codeql.js
generated
|
|
@ -43,6 +43,7 @@ const actions_util_1 = require("./actions-util");
|
|||
const api = __importStar(require("./api-client"));
|
||||
const defaults = __importStar(require("./defaults.json"));
|
||||
const feature_flags_1 = require("./feature-flags");
|
||||
const logging_1 = require("./logging");
|
||||
const tar = __importStar(require("./tar"));
|
||||
const tools_download_1 = require("./tools-download");
|
||||
const util = __importStar(require("./util"));
|
||||
|
|
@ -405,7 +406,7 @@ const downloadCodeQL = async function (codeqlURL, maybeBundleVersion, maybeCliVe
|
|||
const toolcacheVersion = getCanonicalToolcacheVersion(maybeCliVersion, bundleVersion, logger);
|
||||
const toolcacheStart = performance.now();
|
||||
const toolcachedBundlePath = await toolcache.cacheDir(extractedBundlePath, "CodeQL", toolcacheVersion);
|
||||
logger.info(`Added CodeQL bundle to the tool cache (${Math.round(performance.now() - toolcacheStart)} ms).`);
|
||||
logger.info(`Added CodeQL bundle to the tool cache (${(0, logging_1.formatDuration)(performance.now() - toolcacheStart)}).`);
|
||||
// Defensive check: we expect `cacheDir` to copy the bundle to a new location.
|
||||
if (toolcachedBundlePath !== extractedBundlePath) {
|
||||
await (0, util_1.cleanUpGlob)(extractedBundlePath, "CodeQL bundle from temporary directory", logger);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue