Skip to content

Instantly share code, notes, and snippets.

@mjsr
Last active June 14, 2021 03:40
Show Gist options
  • Save mjsr/f03db1efb0b99a96b024d95925538bcd to your computer and use it in GitHub Desktop.
Save mjsr/f03db1efb0b99a96b024d95925538bcd to your computer and use it in GitHub Desktop.
Simple stats for madMAx43v3r / chia-plotter
#!/bin/bash
# Shows the number of plots and the average time to complete.
# Requires you to send the logs to one file.
# $ ./mm.stats.sh /path/to/madmax.log
# num plots: 11 avg time: 28.3748 min
if [ -z "$1" ]; then
echo "Usage: $0 /path/to/madmax.log"
exit 1
fi
if ! [ -r "$1" ]; then
echo "Can't read \"$1\""
exit 1
fi
grep "Total plot creation time was" $1 | \
awk '{print $6}' | xargs -n 1 -i echo "{} / 60" | bc -l | \
awk '{total += $1; count++} END {print "num plots: " count " avg time: " total/count " min"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment