How exactly do you calculate how many hashes your hardware is generating?
Most mining software will have that number available for you. Or you can join a pool for a day or two and most of the bigger ones (eg slush, 50btc) make these stats available for your miner(s).
If you are trying to programmatically calculate this for software you are writing probably best to take an average every minute or so. As in most cases, the formula is built right into the unit -- num of hashes per (ie divided by) num of seconds.
Actually it's Mh/s (1,000,000 hash/sec) usually now so more like (Num hashes / 1,000,000) / sec
Ah, you start generating, after one second you cound how many you generated. If that is too random (generation of one takes too long), you generate for 10 seconds, count, divide by 10.
Is that THAT hard? Counting things and dividing by time are pretty obvious, or?
lol the Q/A contains far too much flaming and too little answers.
Obviously, hashes per second can be computed by some sort of some of hashes per time frame, divided by time in frame.
like... 0% of mining hardware will deliver its full-on however-millions-of-hashes directly to the mining software. From what I can tell, there's 2 other ways to measure the metric:
- # of qualified nonces to produce hash. As far as I know, this figures in the 'difficulty 1' mask. Some mining software when dealing with pools will throw out a great number of these unless they match the suggested share difficulty. Brings me to metric #2
- # of submitted shares, given current share difficulty. I believe this is how pools calculate your H/s. It's more variant because of the lower number of shares. I believe this can be computed by your 'accepted' rate, the share difficulty, and the block difficulty (i think???)
Any clarification on these would be.... really awesome