Add a struct for session stats + bump the counters
This commit is contained in:
parent
ee2ad7138e
commit
67afdb0aa5
8 changed files with 96 additions and 31 deletions
10
crates/librqbit/src/session_stats/atomic.rs
Normal file
10
crates/librqbit/src/session_stats/atomic.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
use std::sync::atomic::AtomicU64;
|
||||
|
||||
use crate::torrent_state::live::peers::stats::atomic::AggregatePeerStatsAtomic;
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub struct AtomicSessionStats {
|
||||
pub fetched_bytes: AtomicU64,
|
||||
pub uploaded_bytes: AtomicU64,
|
||||
pub peers: AggregatePeerStatsAtomic,
|
||||
}
|
||||
1
crates/librqbit/src/session_stats/mod.rs
Normal file
1
crates/librqbit/src/session_stats/mod.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
pub mod atomic;
|
||||
Loading…
Add table
Add a link
Reference in a new issue