Display unaccounted time in "DevStack Component Timing"
In the "DevStack Component Timing" section, display the unaccounted time. Also add the units (seconds) to the output to make it clear to viewers. Change-Id: Iaca82cc54a355f7077e20e548b771e53387f6628
This commit is contained in:
parent
0ad8fc5be9
commit
5ad4e58868
|
@ -2270,11 +2270,13 @@ function cleanup_oscwrap {
|
|||
function time_totals {
|
||||
local elapsed_time
|
||||
local end_time
|
||||
local len=15
|
||||
local len=20
|
||||
local xtrace
|
||||
local unaccounted_time
|
||||
|
||||
end_time=$(date +%s)
|
||||
elapsed_time=$(($end_time - $_TIME_BEGIN))
|
||||
unaccounted_time=$elapsed_time
|
||||
|
||||
# pad 1st column this far
|
||||
for t in ${!_TIME_TOTAL[*]}; do
|
||||
|
@ -2291,16 +2293,19 @@ function time_totals {
|
|||
echo
|
||||
echo "========================="
|
||||
echo "DevStack Component Timing"
|
||||
echo " (times are in seconds) "
|
||||
echo "========================="
|
||||
printf "%-${len}s %3d\n" "Total runtime" "$elapsed_time"
|
||||
echo
|
||||
for t in ${!_TIME_TOTAL[*]}; do
|
||||
local v=${_TIME_TOTAL[$t]}
|
||||
# because we're recording in milliseconds
|
||||
v=$(($v / 1000))
|
||||
printf "%-${len}s %3d\n" "$t" "$v"
|
||||
unaccounted_time=$(($unaccounted_time - $v))
|
||||
done
|
||||
echo "-------------------------"
|
||||
printf "%-${len}s %3d\n" "Unaccounted time" "$unaccounted_time"
|
||||
echo "========================="
|
||||
printf "%-${len}s %3d\n" "Total runtime" "$elapsed_time"
|
||||
|
||||
$xtrace
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue