ci/eval: remove left-over stats.json (#408411)

authored by Wolfgang Walther and committed by GitHub 66cc5bf2 7db93ab8

-38
-38
ci/eval/default.nix
··· 8 procps, 9 nixVersions, 10 jq, 11 - sta, 12 python3, 13 }: 14 ··· 188 rm "$chunkOutputDir"/stats/"$seq_end" 189 fi 190 191 - # Make sure the glob doesn't break when there's no files 192 - shopt -s nullglob 193 cat "$chunkOutputDir"/result/* > $out/paths 194 - cat "$chunkOutputDir"/stats/* > $out/stats.jsonstream 195 ''; 196 197 combine = ··· 202 { 203 nativeBuildInputs = [ 204 jq 205 - sta 206 ]; 207 } 208 '' ··· 224 end) | from_entries} 225 ) | from_entries 226 ' > $out/outpaths.json 227 - 228 - # Computes min, mean, error, etc. for a list of values and outputs a JSON from that 229 - statistics() { 230 - local stat=$1 231 - sta --transpose | 232 - jq --raw-input --argjson stat "$stat" -n ' 233 - [ 234 - inputs | 235 - split("\t") | 236 - { key: .[0], value: (.[1] | fromjson) } 237 - ] | 238 - from_entries | 239 - { 240 - key: ($stat | join(".")), 241 - value: . 242 - }' 243 - } 244 - 245 - # Gets all available number stats (without .sizes because those are constant and not interesting) 246 - readarray -t stats < <(jq -cs '.[0] | del(.sizes) | paths(type == "number")' ${resultsDir}/*/stats.jsonstream) 247 - 248 - # Combines the statistics from all evaluations 249 - { 250 - echo "{ \"key\": \"minAvailMemory\", \"value\": $(cat ${resultsDir}/*/min-avail-memory | sta --brief --min) }" 251 - echo "{ \"key\": \"minFreeSwap\", \"value\": $(cat ${resultsDir}/*/min-free-swap | sta --brief --min) }" 252 - cat ${resultsDir}/*/total-time | statistics '["totalTime"]' 253 - for stat in "''${stats[@]}"; do 254 - cat ${resultsDir}/*/stats.jsonstream | 255 - jq --argjson stat "$stat" 'getpath($stat)' | 256 - statistics "$stat" 257 - done 258 - } | 259 - jq -s from_entries > $out/stats.json 260 261 mkdir -p $out/stats 262
··· 8 procps, 9 nixVersions, 10 jq, 11 python3, 12 }: 13 ··· 187 rm "$chunkOutputDir"/stats/"$seq_end" 188 fi 189 190 cat "$chunkOutputDir"/result/* > $out/paths 191 ''; 192 193 combine = ··· 198 { 199 nativeBuildInputs = [ 200 jq 201 ]; 202 } 203 '' ··· 219 end) | from_entries} 220 ) | from_entries 221 ' > $out/outpaths.json 222 223 mkdir -p $out/stats 224