Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print the range including 95% of the hash rate values #79

Merged
merged 1 commit into from
Oct 9, 2018

Conversation

marktwtn
Copy link
Collaborator

@marktwtn marktwtn commented Oct 4, 2018

Implement functions of getting the average value and standard deviation.
Print the hash rate range when the BUILD_STAT option is enabled.
Close #77.


The output message with BUILD_STAT option enabled would look like this:

Hash rate average value: XXXX.XXX kH/sec
with the range +- xxx.xxx kH/sec including 95% of the hash rate values.

@furuame
Copy link
Member

furuame commented Oct 4, 2018

Here is my suggestion:

  1. How about executing PoW POW_TOTAL times only when ENABLE_STAT enabled? We just need to check correctness unless ENABLE_STATE enabled.
  2. I'm not sure whether executing the PoW for the "same" transaction tryte many times achieve the original goal. Or, you can also consider doing PoW for different transaction trytes. There are some testing data in tests/trytes.txt

@marktwtn
Copy link
Collaborator Author

marktwtn commented Oct 5, 2018

1. How about executing PoW `POW_TOTAL` times only when `ENABLE_STAT` enabled?
We just need to check correctness unless `ENABLE_STATE` enabled.

I agree. Just make it simple.
If ENABLE_STATE is disabled, check the correctness.
If ENABLE_STATE is enabled, check the correctness and do the hash rate statistics analysis.

The program structure would be the same, except that there would be a variable which controls the total execution times of PoW.
If ENABLE_STATE is disabled, the total execution times equals to 1.
If ENABLE_STATE is enabled, the total execution times equals to macro POW_TOTAL.

2. I'm not sure whether executing the PoW for the "same" transaction tryte many times
achieve the original goal.
Or, you can also consider doing PoW for different transaction trytes.
There are some testing data in `tests/trytes.txt`

I guess it still achieves the original goal since we only care about the hash rate, which is dependent to the implementation?

@furuame
Copy link
Member

furuame commented Oct 6, 2018

Don't you care the elapsed time of each PoW?

@marktwtn
Copy link
Collaborator Author

marktwtn commented Oct 7, 2018

We only focus on the hash rate now.
If the elapsed time of PoW of different transaction tryte needs to be shown, I will make sure each execution of PoW uses the different transaction tryte.

tests/test-pow.c Outdated Show resolved Hide resolved
tests/test-pow.c Outdated Show resolved Hide resolved
Implement functions of getting the average value and standard deviation.
Print the hash rate range when the `BUILD_STAT` option is enabled.
Close DLTcollab#77.
@furuame furuame merged commit 09f4416 into DLTcollab:dev Oct 9, 2018
@marktwtn marktwtn deleted the hash-rate-distribution branch October 13, 2018 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants