Suppress a few unused code warnings (that code will be replaced in beta 3)

This commit is contained in:
Herbert Wolverson 2024-07-23 09:12:44 -05:00
parent 6cd40065da
commit 57bb09bc45
6 changed files with 14 additions and 9 deletions

View File

@ -3,6 +3,7 @@
use std::sync::Mutex;
use serde::Serialize;
#[allow(dead_code)]
#[derive(Serialize, Copy, Clone)]
pub enum WarningLevel {
Info,

View File

@ -12,5 +12,5 @@ pub use collection_manager::start_long_term_stats;
pub use throughput_summary::{ThroughputSummary, HostSummary};
pub(crate) use collation::SESSION_BUFFER;
pub use network_tree::NetworkTreeEntry;
pub(crate) use quick_drops::*;
//pub(crate) use quick_drops::*;
pub use quick_drops::CakeStats;

View File

@ -7,7 +7,7 @@ mod retriever;
mod stats_diff;
pub(crate) use retriever::*;
use serde::{Serialize, Deserialize};
pub(crate) use stats_diff::*;
//pub(crate) use stats_diff::*;
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CakeStats {

View File

@ -6,6 +6,7 @@ use queue_network::QueueNetwork;
use thiserror::Error;
pub(crate) use queue_node::QueueNode;
#[allow(dead_code)]
pub(crate) fn read_queueing_structure(
) -> Result<Vec<QueueNode>, QueueStructureError> {
// Note: the ? is allowed because the sub-types return a QueueStructureError and handle logging.

View File

@ -4,6 +4,7 @@ use tokio::process::Command;
pub use crate::collector::CakeStats;
use super::queue_structure::{read_queueing_structure, QueueNode};
#[allow(dead_code)]
#[derive(Debug, Error)]
pub(crate) enum AsyncQueueReaderMessage {
#[error("Unable to figure out the current queue structure")]
@ -16,10 +17,12 @@ pub(crate) enum AsyncQueueReaderMessage {
JsonDecode,
}
#[allow(dead_code)]
pub(crate) struct AsyncQueueReader {
pub(crate) interface: String,
}
#[allow(dead_code)]
impl AsyncQueueReader {
pub(crate) fn new<S: ToString>(interface: S) -> Self {
Self {

View File

@ -1,20 +1,20 @@
use lqos_config::load_config;
use tokio::sync::Mutex;
use once_cell::sync::Lazy;
use super::CakeStats;
static CAKE_TRACKER: Lazy<Mutex<CakeTracker>> = Lazy::new(|| Mutex::new(CakeTracker::new()));
//static CAKE_TRACKER: Lazy<Mutex<CakeTracker>> = Lazy::new(|| Mutex::new(CakeTracker::new()));
pub(crate) async fn update_cake_stats() -> Option<(Vec<CakeStats>, Vec<CakeStats>)> {
let mut tracker = CAKE_TRACKER.lock().await;
tracker.update().await
}
// pub(crate) async fn update_cake_stats() -> Option<(Vec<CakeStats>, Vec<CakeStats>)> {
// let mut tracker = CAKE_TRACKER.lock().await;
// tracker.update().await
// }
#[allow(dead_code)]
pub(crate) struct CakeTracker {
prev: Option<(Vec<CakeStats>, Vec<CakeStats>)>,
current: Option<(Vec<CakeStats>, Vec<CakeStats>)>,
}
#[allow(dead_code)]
impl CakeTracker {
pub(crate) fn new() -> Self {
Self {