Skip to content

Commit e7ce43a

Browse files
henrymercerCopilot
andcommitted
Log how long deleting each CodeQL version from the toolcache takes
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 064910b commit e7ce43a

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/tools-download.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,13 +342,16 @@ export async function deleteToolcacheBundles({
342342
const versionDirectory = path.join(toolDirectory, entry.name);
343343

344344
try {
345+
const deletionStart = performance.now();
345346
await fs.promises.rm(versionDirectory, {
346347
force: true,
347348
recursive: true,
348349
});
349350
deletedVersions.push(entry.name);
350351
logger.info(
351-
`Deleted the CodeQL tools at '${versionDirectory}' from the toolcache to free up disk space.`,
352+
`Deleted the CodeQL tools at '${versionDirectory}' from the toolcache to free up disk space (${formatDuration(
353+
durationMsSince(deletionStart),
354+
)}).`,
352355
);
353356
} catch (e) {
354357
failed = true;

0 commit comments

Comments
 (0)