4 echo "This script tries to benchmark your machine using 7-zip, by calling"
5 echo "the \"7za b\" command. See <https://s1.hoffart.de/7zip-bench/> for"
6 echo "existing results. It generates an \"result file\" that is suitable"
7 echo "for submission to the site mentioned above, but you have to do this"
8 echo "on your own, there is NO automatic submission."
10 echo "Please make sure that your machine is \"mostly idle\"!"
11 echo "All commands run will be shown below."
15 if ! command -v "7za" >/dev/null 2>&1; then
16 echo "Command \"$1\" not found - please install 7-Zip first!" >&2
20 # Check & create "result file" ...
21 RESULT_FILE="$(uname -n)-7zip-bench.txt"
22 if [ -e "$RESULT_FILE" ]; then
23 echo "Result file \"$RESULT_FILE\" already exists. Aborting!" >&2
28 echo "Ready to go? Hit CTRL-C if not!"
29 for i in 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1; do
30 printf "\033[2K\r(%s)" "$i"
35 echo "------------------------------------------------------------------------------" >"$RESULT_FILE"
44 sysctl hw.model hw.memsize hw.machine hw.ncpu machdep.cpu.brand_string
55 echo "------------------------------------------------------------------------------" >>"$RESULT_FILE"
62 echo "Please send the results stored in \"$RESULT_FILE\""
63 echo "to Goetz Hoffart for inclusion on <https://s1.hoffart.de/7zip-bench/>."
65 if command -v "sendfile" >/dev/null 2>&1; then
66 echo "For example by running this command:"
67 echo; echo " sendfile \"$RESULT_FILE\" goetz@s1.hoffart.de"; echo
69 echo "You can send it via email to:"
70 echo; echo " bench@hoffart.de"; echo