Debian Codegraph @

src/collection/network.rs

raw symbols SCIP
1 //! Data collection for network usage/IO.
2
3 pub mod sysinfo;
4 pub use self::sysinfo::*;
5
6 #[derive(Default, Clone, Debug)]
7 /// All units in bits.
8 pub struct NetworkHarvest {
9 pub rx: u64,
10 pub tx: u64,
11 pub total_rx: u64,
12 pub total_tx: u64,
13 pub rx_packets: u64,
14 pub tx_packets: u64,
15 pub total_rx_packets: u64,
16 pub total_tx_packets: u64,
17 }
18
19 impl NetworkHarvest {
20 pub fn first_run_cleanup(&mut self) {
21 self.rx = 0;
22 self.tx = 0;
23 }
24 }