From e7ce43a4dc692cf703df2389513106a0bd62134e Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 3 Nov 2026 13:33:07 +0000 Subject: [PATCH] Log how long deleting each CodeQL version from the toolcache takes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- lib/entry-points.js | 5 ++++- src/tools-download.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/entry-points.js b/lib/entry-points.js index 952c61541..0d97fe424 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -184864,13 +184864,16 @@ async function deleteToolcacheBundles({ } const versionDirectory = path12.join(toolDirectory, entry.name); try { + const deletionStart = import_perf_hooks3.performance.now(); await fs15.promises.rm(versionDirectory, { force: true, recursive: true }); deletedVersions.push(entry.name); logger2.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; diff --git a/src/tools-download.ts b/src/tools-download.ts index a92dad0ac..a5b5a5a0d 100644 --- a/src/tools-download.ts +++ b/src/tools-download.ts @@ -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;