Skip to content

Commit

Permalink
Explicitly refuse to gather any stats if gather_stats is false or the…
Browse files Browse the repository at this point in the history
… license key is empty.
  • Loading branch information
thebracket committed Jan 16, 2025
1 parent 3f91572 commit 0f1ff6e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/rust/lqosd/src/throughput_tracker/stats_submission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ pub(crate) fn submit_throughput_stats(
counter: u8,
system_usage_actor: crossbeam_channel::Sender<tokio::sync::oneshot::Sender<SystemStats>>,
) {
let config = load_config();
if config.is_err() {
return;
}
let config = config.unwrap();
if config.long_term_stats.gather_stats == false {
return;
}
if config.long_term_stats.license_key.is_none() {
return;
}

let mut metrics = LtsSubmitMetrics::new();
let mut lts2_needs_shaped_devices = false;
// If ShapedDevices has changed, notify the stats thread
Expand Down

0 comments on commit 0f1ff6e

Please sign in to comment.