Don't measure size of downloaded cache

This commit is contained in:
Michael B. Gale committed 2025-09-25 21:02:43 +01:00
1 parent 2ff902e1f1
commit ed57767898
2 files changed
+1 -10

No files matched your search

+1 -5
View File
@@ -88208,16 +88208,12 @@ async function downloadDependencyCaches(languages, logger, minimizeJavaJars) {
restoreKeys
);
const download_duration_ms = Math.round(performance.now() - start);
const download_size_bytes = Math.round(
await getTotalCacheSize(cacheConfig.paths, logger)
);
if (hitKey !== void 0) {
logger.info(`Cache hit on key ${hitKey} for ${language}.`);
const hit_kind = hitKey === primaryKey ? "exact" /* Exact */ : "partial" /* Partial */;
status[language] = {
hit_kind,
download_duration_ms,
download_size_bytes
download_duration_ms
};
} else {
status[language] = { hit_kind: "miss" /* Miss */ };
-5
View File
@@ -100,7 +100,6 @@ export enum CacheHitKind {
/** Represents results of trying to restore a dependency cache for a language. */
export interface DependencyCacheRestoreStatus {
hit_kind: CacheHitKind;
download_size_bytes?: number;
download_duration_ms?: number;
}
@@ -164,9 +163,6 @@ export async function downloadDependencyCaches(
restoreKeys,
);
const download_duration_ms = Math.round(performance.now() - start);
const download_size_bytes = Math.round(
await getTotalCacheSize(cacheConfig.paths, logger),
);
if (hitKey !== undefined) {
logger.info(`Cache hit on key ${hitKey} for ${language}.`);
@@ -175,7 +171,6 @@ export async function downloadDependencyCaches(
status[language] = {
hit_kind,
download_duration_ms,
download_size_bytes,
};
} else {
status[language] = { hit_kind: CacheHitKind.Miss };