#281 Trimming slowest/fastest run, not first/last in evaluate2.sh
This commit is contained in:
parent
c92c88b9fb
commit
8fac59de42
@ -170,7 +170,7 @@ for fork in "$@"; do
|
|||||||
|
|
||||||
# Trimmed mean = The slowest and the fastest runs are discarded, the
|
# Trimmed mean = The slowest and the fastest runs are discarded, the
|
||||||
# mean value of the remaining three runs is the result for that contender
|
# mean value of the remaining three runs is the result for that contender
|
||||||
trimmed_mean=$(jq -r '.results[0].times | .[1:-1] | add / length' $fork-$filetimestamp-timing.json)
|
trimmed_mean=$(jq -r '.results[0].times | sort_by(.|tonumber) | .[1:-1] | add / length' $fork-$filetimestamp-timing.json)
|
||||||
raw_times=$(jq -r '.results[0].times | join(",")' $fork-$filetimestamp-timing.json)
|
raw_times=$(jq -r '.results[0].times | join(",")' $fork-$filetimestamp-timing.json)
|
||||||
|
|
||||||
if [ "$fork" == "$1" ]; then
|
if [ "$fork" == "$1" ]; then
|
||||||
@ -198,7 +198,7 @@ for fork in "$@"; do
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trimmed_mean=$(jq -r '.results[0].times | .[1:-1] | add / length' $fork-$filetimestamp-timing.json)
|
trimmed_mean=$(jq -r '.results[0].times | sort_by(.|tonumber) | .[1:-1] | add / length' $fork-$filetimestamp-timing.json)
|
||||||
|
|
||||||
# trimmed_mean is in seconds
|
# trimmed_mean is in seconds
|
||||||
# Format trimmed_mean as MM::SS.mmm
|
# Format trimmed_mean as MM::SS.mmm
|
||||||
|
Loading…
Reference in New Issue
Block a user