Skip to content

Commit

Permalink
misc:benchmark_summary have two modes
Browse files Browse the repository at this point in the history
1.benchmark-result mode for push schedule smoke test,summary benchmark.
2.benchmark-compare mode for pull request smoke test,compare benchmark.
`
Signed-off-by: Desiki-high <2448906309@qq.com>
  • Loading branch information
Desiki-high committed Apr 22, 2023
1 parent 1552136 commit 2067d1a
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions misc/benchmark/benchmark_summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,26 @@ sudo install -m 755 benchmark-nydus-no-prefetch/wordpress.csv nydus-no-prefetch.
sudo install -m 755 benchmark-nydus-all-prefetch/wordpress.csv nydus-all-prefetch.csv
sudo install -m 755 benchmark-nydus-filelist-prefetch/wordpress.csv nydus-filelist-prefetch.csv

case "$1" in
"benchmark-result")
files=(oci.csv nydus-all-prefetch.csv zran-all-prefetch.csv nydus-no-prefetch.csv zran-no-prefetch.csv nydus-filelist-prefetch.csv)
;;
"benchmark-compare")
sudo install -m 755 benchmark-zran-all-prefetch-master/wordpress.csv zran-all-prefetch-master.csv
sudo install -m 755 benchmark-zran-no-prefetch-master/wordpress.csv zran-no-prefetch-master.csv
sudo install -m 755 benchmark-nydus-no-prefetch-master/wordpress.csv nydus-no-prefetch-master.csv
sudo install -m 755 benchmark-nydus-all-prefetch-master/wordpress.csv nydus-all-prefetch-master.csv
sudo install -m 755 benchmark-nydus-filelist-prefetch-master/wordpress.csv nydus-filelist-prefetch-master.csv
files=(oci.csv nydus-all-prefetch.csv nydus-all-prefetch-master.csv zran-all-prefetch.csv zran-all-prefetch-master.csv nydus-no-prefetch.csv nydus-no-prefetch-master.csv zran-no-prefetch.csv zran-no-prefetch-master.csv nydus-filelist-prefetch.csv nydus-filelist-prefetch-master.csv)
;;
*)
echo "Unknown command: $1"
;;
esac

echo "| benchmark-result | pull-elapsed(s) | create-elapsed(s) | run-elapsed(s) | total-elapsed(s) |"
echo "|:-------|:-----------------:|:-------------------:|:----------------:|:------------------:|"

files=(oci.csv nydus-all-prefetch.csv zran-all-prefetch.csv nydus-no-prefetch.csv zran-no-prefetch.csv nydus-filelist-prefetch.csv)

for file in "${files[@]}"; do
if ! [ -f "$file" ]; then
continue
Expand All @@ -24,4 +39,4 @@ tail -n +2 "$file" | while read line; do
total=$(echo "$line" | cut -d ',' -f 5)
printf "| %s | %s | %s | %s | %s |\n" "$filename" "$pull" "$create" "$run" "$total"
done
done
done

0 comments on commit 2067d1a

Please sign in to comment.