use std::sync::atomic::{AtomicU64, Ordering};
#[derive(Default)]
pub struct OnboardingMetrics {
pub search_requests_total: AtomicU64,
pub graph_requests_total: AtomicU64,
pub dimension_mismatch_total: AtomicU64,
pub empty_search_results_total: AtomicU64,
pub filter_parse_errors_total: AtomicU64,
}
impl OnboardingMetrics {
pub fn record_search_request(&self) {
self.search_requests_total.fetch_add(1, Ordering::Relaxed);
}
pub fn record_dimension_mismatch(&self) {
self.dimension_mismatch_total
.fetch_add(1, Ordering::Relaxed);
}
pub fn record_empty_search_results(&self) {
self.empty_search_results_total
.fetch_add(1, Ordering::Relaxed);
}
pub fn record_filter_parse_error(&self) {
self.filter_parse_errors_total
.fetch_add(1, Ordering::Relaxed);
}
pub fn record_graph_request(&self) {
self.graph_requests_total.fetch_add(1, Ordering::Relaxed);
}
}