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

How to calculate the final throughput latency #64

Open
llvke opened this issue May 21, 2019 · 3 comments
Open

How to calculate the final throughput latency #64

llvke opened this issue May 21, 2019 · 3 comments

Comments

@llvke
Copy link

llvke commented May 21, 2019

I use ethereum benchmark and kvstore for experiments and get the result(. run-bench.sh 2 10 2 10).How to calculate the final throughput latency by using the result.

@TravisBacon
Copy link

  • for throughput, you must add up the txs in all polled block lines, then divided by 2*(number of lines starting with "In the last 2s")
  • for latency, simply look for the lines where tx count = X latency = Y and compute Y/X when X !=0

By the way , you can read more issues because your question may be asked by others before , including open and closed .

@llvke llvke closed this as completed May 21, 2019
@llvke
Copy link
Author

llvke commented May 21, 2019

  • for throughput, you must add up the txs in all polled block lines, then divided by 2*(number of lines starting with "In the last 2s")
  • for latency, simply look for the lines where tx count = X latency = Y and compute Y/X when X !=0

By the way , you can read more issues because your question may be asked by others before , including open and closed .

Thank you very much for your help。Can we communicate via email?This is my email [email protected]

@llvke llvke reopened this May 21, 2019
@haochenpan
Copy link

haochenpan commented Jun 3, 2019

Hi @llvke , @TravisBacon ,

Our research group took at their codebase, and around this line, https://github.com/ooibc88/blockbench/blob/master/src/macro/kvstore/ycsbc.cc#L95, they do latency calculation in the monitor thread and print out in the log file.

For Hyperledger, here is the case, I am not sure whether the following applies to other Blockchain backends:

For every TX a client inserts (using YCSB-C framework). the client logs the current time after sending a json rpc request and getting a reply, see here https://github.com/ooibc88/blockbench/blob/master/src/macro/kvstore/db/hyperledger_db.cc#L38.

The monitor thread (StatusThread ) polls a block (send an rpc request & parse Txs from json to array) once every 2 seconds by default. The thread then logs the current time as the end time for calculating the latency.

Each Tx’s latency = the difference between the aforementioned two logged times. Finally, Blockbench reports the sum of latencies of all Tx’s in that block.

Best wishes,
Roger.

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

No branches or pull requests

3 participants