Record how long the toolcache cleanup takes in telemetry

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Henry Mercer
2026-11-04 14:31:49 +00:00
parent e7ce43a4dc
commit e70c0414bf
3 changed files with 51 additions and 8 deletions

View File

@@ -814,6 +814,7 @@ async function tryDeleteToolcacheBundles({
return;
}
const startTime = performance.now();
const result = await deleteToolcacheBundles({ env, logger });
addNoLanguageDiagnostic(
@@ -821,7 +822,7 @@ async function tryDeleteToolcacheBundles({
makeTelemetryDiagnostic(
"codeql-action/toolcache-bundle-cleanup",
"Toolcache CodeQL bundle cleanup",
{ ...result },
{ ...result, durationMs: util.durationMsSince(startTime) },
),
);
}