hyperledger / besu

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
1.49k stars 815 forks source link

Add metrics to DefaultBlockchain to get TPS and Mgas/s #7105

Closed ahamlat closed 4 months ago

ahamlat commented 4 months ago

PR description

This PR creates two new prometheus counters gasUsedCounter and numberOfTransactionsCounter. These new counters will help to create graphs on Transactions per second and Gas used per second.

We can see below the result on Ethereum Mainnet, where the throughput is around 1.26 mgas/s and TPS is slightly less than 14 transactions per second.

image

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

Locally, you can run these tests to catch failures early: