Add relevant timings in log messages
Description
In order to find bottlenecks in our node implementation more easily we should add timings to all time-consuming algorithms, for example:
- Time it took to solidify a certain amount of milestones;
- Time it took to prune a certain number of milestones;
- Time it took to fully initialize the node;
- Time it took to fully shutdown the node;
- Time it took to fully traverse one or more milestones;
- Time it took to update CRI values.
- Time it took to compile rocksdb (jk) and so on...
Motivation
- We need this to nail down where it's worth investing time to improve the overall performance.
- Adding it is a matter of just a few minutes (which makes we wonder why didn't add it from the get-go)
Are you planning to do it yourself in a pull request?
Yes.
Now that bee-trace is about to land, do you think we still need this @Alex6323?
IMHO this kind of stuff should be done through tracing tools, logs other than INFO are already barely readable because there is too much of it. Something different that could be done is to gather these metrics and publish them through MQTT or whatever.
It reminds me that we started speaking of a Grafana board for the node at some point. That would be the ultimate way to gather and display all these metrics.
Sounds like an interesting project for the new year if no one else is taking it :eyes: