Skip to content

Commit 774b178

Browse files
committed
Format caching leverage metrics as durations
1 parent 7bead51 commit 774b178

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/scripts/lib/info.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ print_build_caching_leverage_metrics() {
175175
if [[ "${avoided_from_cache_num_tasks[1]}" ]]; then
176176
local taskCount
177177
taskCount="$(printf "%${task_count_padding}s" "${avoided_from_cache_num_tasks[1]}" )"
178-
value="${taskCount} ${BUILD_TOOL_TASK}s, ${avoided_from_cache_avoidance_savings[1]} total saved execution time"
178+
value="${taskCount} ${BUILD_TOOL_TASK}s, $(format_duration avoided_from_cache_avoidance_savings[1]) total saved execution time"
179179
fi
180180
summary_row "Avoided cacheable ${BUILD_TOOL_TASK}s:" "${value}"
181181

@@ -188,14 +188,14 @@ print_build_caching_leverage_metrics() {
188188
fi
189189

190190
taskCount="$(printf "%${task_count_padding}s" "${executed_cacheable_num_tasks[1]}" )"
191-
value="${summary_color}${taskCount} ${BUILD_TOOL_TASK}s, ${executed_cacheable_duration[1]} total execution time${RESTORE}"
191+
value="${summary_color}${taskCount} ${BUILD_TOOL_TASK}s, $(format_duration executed_cacheable_duration[1]) total execution time${RESTORE}"
192192
fi
193193
summary_row "Executed cacheable ${BUILD_TOOL_TASK}s:" "${value}"
194194

195195
value=""
196196
if [[ "${executed_not_cacheable_num_tasks[1]}" ]]; then
197197
taskCount="$(printf "%${task_count_padding}s" "${executed_not_cacheable_num_tasks[1]}" )"
198-
value="${taskCount} ${BUILD_TOOL_TASK}s, ${executed_not_cacheable_duration[1]} total execution time"
198+
value="${taskCount} ${BUILD_TOOL_TASK}s, $(format_duration executed_not_cacheable_duration[1]) total execution time"
199199
fi
200200
summary_row "Executed non-cacheable ${BUILD_TOOL_TASK}s:" "${value}"
201201
}

0 commit comments

Comments
 (0)