mirror of
https://github.com/lupyuen/nuttx-release.git
synced 2025-01-13 07:38:29 +08:00
Increase precision
This commit is contained in:
parent
e0d7c7697b
commit
e79c8332a8
1 changed files with 11 additions and 3 deletions
|
@ -49,12 +49,17 @@ function add_runner_hours {
|
|||
bc -l -e "$total_job_hours+($run_duration_ms/1000/60/60)"
|
||||
)
|
||||
local runner_hours=$(
|
||||
bc -e "$duration_hours_to_runner_hours*$run_duration_ms/1000/60/60"
|
||||
bc -l -e "$duration_hours_to_runner_hours*$run_duration_ms/1000/60/60"
|
||||
)
|
||||
# echo runner_hours=$runner_hours
|
||||
if [[ "$runner_hours" != "0" ]]; then
|
||||
echo $run_id,$run_duration_ms,$runner_hours
|
||||
total_runner_hours=$(( $total_runner_hours+$runner_hours ))
|
||||
total_runner_hours=$(
|
||||
bc -l -e "$total_runner_hours+$runner_hours"
|
||||
)
|
||||
local runner_hours_rounded=$(
|
||||
bc -l -e "r($runner_hours,1)"
|
||||
)
|
||||
echo $run_id,$run_duration_ms,$runner_hours_rounded
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@ -73,6 +78,9 @@ fulltime_runners=$(
|
|||
total_job_hours=$(
|
||||
bc -l -e "r($total_job_hours,1)"
|
||||
)
|
||||
total_runner_hours=$(
|
||||
bc -l -e "r($total_runner_hours,1)"
|
||||
)
|
||||
echo date=$date
|
||||
echo hours=$hours
|
||||
echo total_job_hours=$total_job_hours
|
||||
|
|
Loading…
Reference in a new issue