Round fields in TRAP caching telemetry to integers

This commit is contained in:
Edoardo Pirovano 2022-08-17 13:30:17 +01:00
parent 7d94bb850d
commit eb6f272155
No known key found for this signature in database
GPG key ID: 047556B5D93FFE28
6 changed files with 12 additions and 14 deletions

View file

@ -71,10 +71,9 @@ export async function sendStatusReport(
if (config && didUploadTrapCaches) {
const trapCacheUploadStatusReport: FinishWithTrapUploadStatusReport = {
...statusReport,
trap_cache_upload_duration_ms: trapCacheUploadTime || 0,
trap_cache_upload_size_bytes: await getTotalCacheSize(
config.trapCaches,
logger
trap_cache_upload_duration_ms: Math.round(trapCacheUploadTime || 0),
trap_cache_upload_size_bytes: Math.round(
await getTotalCacheSize(config.trapCaches, logger)
),
};
await actionsUtil.sendStatusReport(trapCacheUploadStatusReport);