Record telemetry for cache operation duration
This commit is contained in:
parent
93f3303766
commit
7bcf845de9
5 changed files with 17 additions and 6 deletions
|
|
@ -550,7 +550,7 @@ export const downloadCodeQL = async function (
|
|||
? toolcacheInfo.path
|
||||
: getTempExtractionDir(tempDir);
|
||||
|
||||
const statusReport = await downloadAndExtract(
|
||||
let statusReport = await downloadAndExtract(
|
||||
codeqlURL,
|
||||
extractedBundlePath,
|
||||
authorization,
|
||||
|
|
@ -585,11 +585,16 @@ export const downloadCodeQL = async function (
|
|||
toolcacheInfo.version,
|
||||
);
|
||||
|
||||
const cacheDurationMs = performance.now() - toolcacheStart;
|
||||
logger.info(
|
||||
`Added CodeQL bundle to the tool cache (${formatDuration(
|
||||
performance.now() - toolcacheStart,
|
||||
cacheDurationMs,
|
||||
)}).`,
|
||||
);
|
||||
statusReport = {
|
||||
...statusReport,
|
||||
cacheDurationMs,
|
||||
};
|
||||
|
||||
// Defensive check: we expect `cacheDir` to copy the bundle to a new location.
|
||||
if (codeqlFolder !== extractedBundlePath) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue