xmtpd
xmtpd copied to clipboard
Latency combinators
Extracted from an @insipx comment:
It might be nice to include a latency combinator, like api::measured or something that automatically runs the request w/ a timeout, then returns a struct with the query result and measured std::time::Duration.
Some example combinators: https://github.com/xmtp/libxmtp/tree/main/xmtp_proto/src/traits/combinators
The trait changed a little but should apply. that way we can re use this logic for any other endpoint anywhere in the code, which might be useful for debugging in the future