Skip to content

Commit

Permalink
only 16
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Nov 8, 2024
1 parent 3f143ff commit 2fc3035
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ jobs:
- run: |
set -x
sum=$(
max=16
printf "\`\`\`text\n"
awk -F ',' '{ a[$1]+=$2; s+=$2; } END { for (k in a) printf("%s.xsl\t%d\t%0.2f%%\n", k, a[k], 100 * a[k]/s)}' eo-runtime/measures.csv | sort -g -k 2 | tac | column -t
awk -F ',' '{ a[$1]+=$2; s+=$2; } END { for (k in a) printf("%s.xsl\t%d\t%0.2f%%\n", k, a[k], 100 * a[k]/s)}' eo-runtime/measures.csv | sort -g -k 2 | tac | column -t | head "-${max}"
printf "\`\`\`\n\n"
echo "The results were calculated in [this GHA job][benchmark-gha]"
echo "on $(date +'%Y-%m-%d') at $(date +'%H:%M'),"
echo "on $(uname) with $(nproc --all) CPUs."
echo "The total is $(awk -F ',' '{s+=$2} END {print s}' eo-runtime/measures.csv) milliseconds."
echo "The total is $(awk -F ',' '{s+=$2} END {print s}' eo-runtime/measures.csv) milliseconds."
echo "We show only the first ${max} most expensive XSL stylesheets."
)
export sum
perl -i -0777 -pe 's/(?<=<!-- benchmark_begin -->).*(?=<!-- benchmark_end -->)/\n\n$ENV{sum}\n\n/gs;' README.md
Expand Down

0 comments on commit 2fc3035

Please sign in to comment.