sociomantic-tsunami / swarm

Asynchronous client/node framework library
Boost Software License 1.0
14 stars 26 forks source link

Add framework for per-request response time stats (client) #289

Closed gavin-norman-sociomantic closed 6 years ago

gavin-norman-sociomantic commented 6 years ago

We already have request timing stats on the node side, but nothing on the client side.

There's already a simple per-request stats tracker in the client: https://github.com/sociomantic-tsunami/swarm/blob/v5.x.x/src/swarm/neo/client/requests/Stats.d#L31-L51, but it only includes overall average handling time, not the time-bucket per-request timing that the node has.

For one-shot requests, time-bucket stats would probably be useful for analysing performance problems. (Timing stats are generally not of use for stream or batch requests.)

gavin-norman-sociomantic commented 6 years ago

There's already a simple per-request stats tracker in the client: https://github.com/sociomantic-tsunami/swarm/blob/v5.x.x/src/swarm/neo/client/requests/Stats.d#L31-L51, but it only includes overall average handling time, not the time-bucket per-request timing that the node has.

gavin-norman-sociomantic commented 6 years ago

The current per-request stats tracking is also on a whole request level, not on a per-transaction (sub-request) level.

gavin-norman-sociomantic commented 6 years ago

Similarly to how it works in the node, this would only make sense for one-shot requests (i.e. not for streaming or batch requests).

gavin-norman-sociomantic commented 6 years ago

Updated issue description with latest info.