spawn recording latency

This commit is contained in:
Bryan Stitt 2023-06-19 17:46:58 -07:00
parent 6038351cb8
commit b7935f77fc

@ -381,9 +381,10 @@ impl OpenRequestHandle {
}
}
// TODO: benchmark spawning both of these
self.rpc.peak_latency.as_ref().unwrap().report(latency);
self.rpc.median_latency.as_ref().unwrap().record(latency);
tokio::spawn(async move {
self.rpc.peak_latency.as_ref().unwrap().report(latency);
self.rpc.median_latency.as_ref().unwrap().record(latency);
});
response
}