Merge "Display unaccounted time in "DevStack Component Timing""
This commit is contained in:
commit
5aff50b09d
@ -2290,11 +2290,13 @@ function cleanup_oscwrap {
|
|||||||
function time_totals {
|
function time_totals {
|
||||||
local elapsed_time
|
local elapsed_time
|
||||||
local end_time
|
local end_time
|
||||||
local len=15
|
local len=20
|
||||||
local xtrace
|
local xtrace
|
||||||
|
local unaccounted_time
|
||||||
|
|
||||||
end_time=$(date +%s)
|
end_time=$(date +%s)
|
||||||
elapsed_time=$(($end_time - $_TIME_BEGIN))
|
elapsed_time=$(($end_time - $_TIME_BEGIN))
|
||||||
|
unaccounted_time=$elapsed_time
|
||||||
|
|
||||||
# pad 1st column this far
|
# pad 1st column this far
|
||||||
for t in ${!_TIME_TOTAL[*]}; do
|
for t in ${!_TIME_TOTAL[*]}; do
|
||||||
@ -2311,16 +2313,19 @@ function time_totals {
|
|||||||
echo
|
echo
|
||||||
echo "========================="
|
echo "========================="
|
||||||
echo "DevStack Component Timing"
|
echo "DevStack Component Timing"
|
||||||
|
echo " (times are in seconds) "
|
||||||
echo "========================="
|
echo "========================="
|
||||||
printf "%-${len}s %3d\n" "Total runtime" "$elapsed_time"
|
|
||||||
echo
|
|
||||||
for t in ${!_TIME_TOTAL[*]}; do
|
for t in ${!_TIME_TOTAL[*]}; do
|
||||||
local v=${_TIME_TOTAL[$t]}
|
local v=${_TIME_TOTAL[$t]}
|
||||||
# because we're recording in milliseconds
|
# because we're recording in milliseconds
|
||||||
v=$(($v / 1000))
|
v=$(($v / 1000))
|
||||||
printf "%-${len}s %3d\n" "$t" "$v"
|
printf "%-${len}s %3d\n" "$t" "$v"
|
||||||
|
unaccounted_time=$(($unaccounted_time - $v))
|
||||||
done
|
done
|
||||||
|
echo "-------------------------"
|
||||||
|
printf "%-${len}s %3d\n" "Unaccounted time" "$unaccounted_time"
|
||||||
echo "========================="
|
echo "========================="
|
||||||
|
printf "%-${len}s %3d\n" "Total runtime" "$elapsed_time"
|
||||||
|
|
||||||
$xtrace
|
$xtrace
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user