• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
8 mod client;
9 mod periodic_logger;
10 mod request_handler;
11 
12 mod metrics_cleanup;
13 
14 use std::time::Duration;
15 
16 #[cfg(test)]
17 pub use client::force_initialize;
18 pub use client::get_destructor;
19 pub use client::initialize;
20 pub use client::is_initialized;
21 pub use client::log_descriptor;
22 pub use client::log_event;
23 pub use client::log_event_with_details;
24 pub use client::log_high_frequency_descriptor_event;
25 pub use client::log_histogram_metric;
26 pub use client::log_metric;
27 pub use client::log_metric_with_details;
28 pub use client::merge_session_invariants;
29 pub use client::push_descriptors;
30 pub use client::set_auth_token;
31 pub use client::set_graphics_api;
32 pub use client::set_package_name;
33 pub use metrics_cleanup::MetricsClientDestructor;
34 pub use periodic_logger::PeriodicLogger;
35 pub use request_handler::MetricsRequestHandler;
36 
37 pub const METRICS_UPLOAD_INTERVAL: Duration = Duration::from_secs(60);
38