- Hourly Transactions Per Second is calculated by dividing total requests count by 3600.
- Average TPS metrics is be calculated through below formula:
Average TPS Metrics = Sum (hourly TPS for a day)/24
- Peak TPS metrics is calculated from hourly TPS calculated for Average TPS metrics:
Peak TPS Metrics = Max (hourly TPS for a day)
For Average TPS metrics, the standard specifies averaging the transactions per second over the period of one day.
The calculation above for Average TPS for a day would be acceptable. Aggregating hourly, then further aggregating over the course of a day, does not affect the result.
For Peak TPS metrics, the standard specifies the peak transactions per second for any second in the course of one day.
The formula above for Peak TPS over a day does not give acceptable results.
Hourly aggregation removes the granularity required to calculate Peak TPS.
The formula for average TPS metrics above proposes aggregating the TPS hourly, then dividing the result by the seconds in an hour. If there were 3600 transactions in an hour but they all occurred in the same second, the Peak TPS would be 3600. The formula above would incorrectly report a peak of 1 TPS.
To reduce the calculation overhead for TPS, it would be acceptable to aggregate to the minute. This is often done in the industry. Any aggregation above a minute would be misleading.