nexrad_data/aws/realtime/poll_stats.rs
1use std::time::Duration;
2
3/// Statistics from the polling process.
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
5pub enum PollStats {
6 /// The number of network calls made to find the most recent volume.
7 LatestVolumeCalls(usize),
8 /// The number of network calls made to find a new volume.
9 NewVolumeCalls(usize),
10 /// Statistics for a new chunk.
11 NewChunk(NewChunkStats),
12}
13
14/// Statistics for a new chunk.
15#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
16pub struct NewChunkStats {
17 /// The number of network calls made to find a new chunk.
18 pub calls: usize,
19 /// The latency between when a chunk was uploaded to S3 and when it was downloaded.
20 pub latency: Option<Duration>,
21}