mirror of
https://github.com/github/codeql-action.git
synced 2026-12-02 03:42:01 +08:00
Don't measure size of downloaded cache
This commit is contained in:
2 files changed
+1
-10
No files matched your search
Generated
+1
-5
@@ -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 */ };
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in new issue
Block a user