Skip to main content

kmp_application/queries/
timing_breakdown.rs

1use std::time::Duration;
2
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct QueryTimingBreakdown {
5    pub graph_load: Duration,
6    pub detail_load: Duration,
7    pub bundle_assembly: Duration,
8    pub role_count: usize,
9    pub batch_size: usize,
10}
11
12impl QueryTimingBreakdown {
13    pub fn not_found(graph_load: Duration) -> Self {
14        Self {
15            graph_load,
16            detail_load: Duration::ZERO,
17            bundle_assembly: Duration::ZERO,
18            role_count: 0,
19            batch_size: 0,
20        }
21    }
22}