mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
spanstats: change field names
This commit is contained in:
parent
bc097d90cb
commit
d78ada07b5
@ -14,8 +14,8 @@ enum SpanStatus {
|
|||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub struct CallStats {
|
pub struct CallStats {
|
||||||
pub nb: usize,
|
pub call_count: usize,
|
||||||
pub ns: u64,
|
pub time: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn to_call_stats<R: std::io::Read>(
|
pub fn to_call_stats<R: std::io::Read>(
|
||||||
@ -75,5 +75,5 @@ fn site_to_string(call_site: NewCallsite) -> String {
|
|||||||
fn calls_to_stats(calls: Vec<Duration>) -> CallStats {
|
fn calls_to_stats(calls: Vec<Duration>) -> CallStats {
|
||||||
let nb = calls.len();
|
let nb = calls.len();
|
||||||
let sum: Duration = calls.iter().sum();
|
let sum: Duration = calls.iter().sum();
|
||||||
CallStats { nb, ns: sum.as_nanos() as u64 }
|
CallStats { call_count: nb, time: sum.as_nanos() as u64 }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user