Spike out adding transfer stats to halibut.
Background
Spikes out adding transfer stats (from what the client sees) to halibit.
This aims to record:
- Time it takes to send a request and number of bytes sent.
- Time it takes to receive a response and the number of bytes recieved.
- Time it takes waiting for the start of a response to begin coming back (not implemented).
It looks like adding that is possible but it gets tricky if we want the caller (the client which calls a method on the halibut proxy) to somehow be able to get at those logs. We could probably provide some sort of call back when the proxy is generated however to do that we would need to store that data in the queue.
This doesn't handle the cases of errors e.g. if something goes wrong receiving a message we wont report any transfer stats around sending or receiving. This becomes worse when polling communication is used since the client will just "walk away" if sending/receiving a message takes to long. If we did end up with stats they would be lost.
How to review this PR
Quality :heavy_check_mark:
Pre-requisites
- [ ] I have read How we use GitHub Issues for help deciding when and where it's appropriate to make an issue.
- [ ] I have considered informing or consulting the right people, according to the ownership map.
- [ ] I have considered appropriate testing for my change.