mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
udp: add optional peers per torrent statistics
This commit is contained in:
parent
c0ed0eb7db
commit
f0e0a84088
9 changed files with 251 additions and 17 deletions
|
|
@ -9,6 +9,7 @@ use crossbeam_channel::{Sender, TrySendError};
|
|||
use aquatic_common::access_list::AccessListArcSwap;
|
||||
use aquatic_common::CanonicalSocketAddr;
|
||||
use aquatic_udp_protocol::*;
|
||||
use hdrhistogram::Histogram;
|
||||
|
||||
use crate::config::Config;
|
||||
|
||||
|
|
@ -132,6 +133,11 @@ impl PeerStatus {
|
|||
}
|
||||
}
|
||||
|
||||
pub enum StatisticsMessage {
|
||||
Ipv4PeerHistogram(Histogram<u64>),
|
||||
Ipv6PeerHistogram(Histogram<u64>),
|
||||
}
|
||||
|
||||
pub struct Statistics {
|
||||
pub requests_received: AtomicUsize,
|
||||
pub responses_sent_connect: AtomicUsize,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue