Log how long deleting each CodeQL version from the toolcache takes

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Henry Mercer
2026-11-03 13:33:07 +00:00
parent 064910ba27
commit e7ce43a4dc
2 changed files with 8 additions and 2 deletions

View File

@@ -342,13 +342,16 @@ export async function deleteToolcacheBundles({
const versionDirectory = path.join(toolDirectory, entry.name);
try {
const deletionStart = performance.now();
await fs.promises.rm(versionDirectory, {
force: true,
recursive: true,
});
deletedVersions.push(entry.name);
logger.info(
`Deleted the CodeQL tools at '${versionDirectory}' from the toolcache to free up disk space.`,
`Deleted the CodeQL tools at '${versionDirectory}' from the toolcache to free up disk space (${formatDuration(
durationMsSince(deletionStart),
)}).`,
);
} catch (e) {
failed = true;