nano-node
nano-node copied to clipboard
Benchmark `inactive_vote_cache` in slow_tests
This PR adds a basic functionality to monitor performance of node over time and uses that to test performance of container for inactive votes. The core tool is nano::test::rate_observer
which is used to periodically monitor stat values and calculate change rate. For future work it should be easy to parse the program output and process those values, for example to then use and aggregate them in a database.
Sample output on my device:
rate of 'vote_cache::vote_new::in': nan /s
rate of 'vote_cache::vote_new::in': 113337.44 /s
rate of 'vote_cache::vote_new::in': 115760.83 /s
rate of 'vote_cache::vote_new::in': 117533.78 /s
rate of 'vote_cache::vote_new::in': 116776.37 /s
rate of 'vote_cache::vote_new::in': 116376.71 /s
rate of 'vote_cache::vote_new::in': 116524.33 /s
rate of 'vote_cache::vote_new::in': 118575.04 /s
rate of 'vote_cache::vote_new::in': 122038.00 /s
rate of 'vote_cache::vote_new::in': 122379.21 /s
rate of 'vote_cache::vote_new::in': 122367.63 /s
rate of 'vote_cache::vote_new::in': 122590.55 /s
rate of 'vote_cache::vote_new::in': 122381.16 /s
rate of 'vote_cache::vote_new::in': 121846.92 /s
rate of 'vote_cache::vote_new::in': 122136.44 /s