Use common getTotalCacheSize for TRAP caching

This commit is contained in:
Michael B. Gale 2024-10-29 11:52:15 +00:00
parent 0cb71294e5
commit 21e6a62b15
No known key found for this signature in database
GPG key ID: FF5E2765BD00628F
9 changed files with 9 additions and 28 deletions

3
lib/init-action.js generated
View file

@ -43,7 +43,6 @@ const repository_1 = require("./repository");
const setup_codeql_1 = require("./setup-codeql");
const status_report_1 = require("./status-report");
const tools_features_1 = require("./tools-features");
const trap_caching_1 = require("./trap-caching");
const util_1 = require("./util");
const workflow_1 = require("./workflow");
async function sendCompletedStatusReport(startedAt, config, configFile, toolsDownloadStatusReport, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger, error) {
@ -113,7 +112,7 @@ async function sendCompletedStatusReport(startedAt, config, configFile, toolsDow
queries: queries.join(","),
packs: JSON.stringify(packs),
trap_cache_languages: Object.keys(config.trapCaches).join(","),
trap_cache_download_size_bytes: Math.round(await (0, trap_caching_1.getTotalCacheSize)(config.trapCaches, logger)),
trap_cache_download_size_bytes: Math.round(await (0, caching_utils_1.getTotalCacheSize)(Object.values(config.trapCaches), logger)),
trap_cache_download_duration_ms: Math.round(config.trapCacheDownloadTime),
query_filters: JSON.stringify(config.originalUserInput["query-filters"] ?? []),
registries: JSON.stringify(configUtils.parseRegistriesWithoutCredentials((0, actions_util_1.getOptionalInput)("registries")) ?? []),