metrics_generic/
lib.rs

1// Copyright 2024 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5//! Provides noop implementations of metrics interfaces, to be used by builds which don't wish
6//! to log metrics.
7
8mod client;
9mod periodic_logger;
10mod request_handler;
11
12mod metrics_cleanup;
13
14use std::time::Duration;
15
16#[cfg(test)]
17pub use client::force_initialize;
18pub use client::get_destructor;
19pub use client::initialize;
20pub use client::is_initialized;
21pub use client::log_descriptor;
22pub use client::log_event;
23pub use client::log_event_with_details;
24pub use client::log_high_frequency_descriptor_event;
25pub use client::log_histogram_metric;
26pub use client::log_metric;
27pub use client::log_metric_with_details;
28pub use client::merge_session_invariants;
29pub use client::push_descriptors;
30pub use client::set_auth_token;
31pub use client::set_graphics_api;
32pub use client::set_package_name;
33pub use metrics_cleanup::MetricsClientDestructor;
34pub use periodic_logger::PeriodicLogger;
35pub use request_handler::MetricsRequestHandler;
36
37pub const METRICS_UPLOAD_INTERVAL: Duration = Duration::from_secs(60);