mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 09:54:09 +01:00
Measure RPC latency after connection lock is taken
This commit is contained in:
parent
1d59449677
commit
defe9f13af
@ -292,8 +292,8 @@ impl Daemon {
|
||||
}
|
||||
|
||||
fn call_jsonrpc(&self, method: &str, request: &Value) -> Result<Value> {
|
||||
let timer = self.latency.with_label_values(&[method]).start_timer();
|
||||
let mut conn = self.conn.lock().unwrap();
|
||||
let timer = self.latency.with_label_values(&[method]).start_timer();
|
||||
let request = request.to_string();
|
||||
conn.send(&request)?;
|
||||
self.size
|
||||
|
Loading…
Reference in New Issue
Block a user