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

Fix how tps benchmark is calculated #2236

Merged
merged 20 commits into from
Aug 27, 2020
Merged

Conversation

miiu96
Copy link
Contributor

@miiu96 miiu96 commented Aug 25, 2020

Modify how tps benchmark is calculated.
Now all the peer transactions and smart contract results are ignored on computation for all the metrics.

@sasurobert sasurobert self-requested a review August 25, 2020 08:33
@AdoAdoAdo AdoAdoAdo self-requested a review August 25, 2020 08:47

func getNumTxsFromMiniblocksWithoutPeerTxs(miniblocks []block.MiniBlockHeader) uint64 {
totalTxs := uint64(0)
for idx := 0; idx < len(miniblocks); idx++ {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use range instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

totalTxs := getNumTxsFromMiniblocksWithoutPeerTxs(metaBlock.MiniBlockHeaders)

// get number of transactions from shard blocks that are included in metablock
for idx := 0; idx < len(metaBlock.ShardInfo); idx++ {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use range instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

sasurobert
sasurobert previously approved these changes Aug 25, 2020
AdoAdoAdo
AdoAdoAdo previously approved these changes Aug 25, 2020
@miiu96 miiu96 dismissed stale reviews from AdoAdoAdo and sasurobert via 7ad8ebc August 26, 2020 06:30
sasurobert
sasurobert previously approved these changes Aug 26, 2020
AdoAdoAdo
AdoAdoAdo previously approved these changes Aug 26, 2020
@miiu96 miiu96 self-assigned this Aug 27, 2020
Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System tests passed.

@LucianMincu LucianMincu merged commit 2b60058 into development Aug 27, 2020
@LucianMincu LucianMincu deleted the fix-tps-benchmark branch August 27, 2020 19:36
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

4 participants