1) Start the daemon,
2) make sure mining is stopped (to make sure all cores are free),
3) start the benchmark for 50 runs. (10 runs will have 20% error maybe 20% of the time)
4) sum the times, divide by 10, divide by 2 for seconds per hash. Invert for hash / sec.
Where avg benchmark seconds = 2 / hash rate.
The third line below does 3 and 4. I've got it set for 50 runs (nearly an hour) instead of 10
[edit: instead of line 2 above and below, it might be more accurate to start the daemon with gen=0 in zcash.conf. ]
~/zcash/src/zcash-cli setgenerate false
~/zcash/src/zcash-cli zcbenchmark solveequihash 50 | grep runn | perl -ne '/(\d+...)/; $sum+=$1; print "$1\n"; $n++; print "avg: " . $sum/$n . "\nhashes/sec: ". $n*2/$sum . "\n";'
My estimate from watching network:
Blocks per hour per core = 240 / difficulty / (avg benchmark seconds like 40)
CPU equivalents on network with 40 second solves from the benchmark and 4 cores = current difficulty setting