1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use std::time::Duration;

/// Statistics from the polling process.
#[derive(Debug)]
pub enum PollStats {
    /// The number of network calls made to find the most recent volume.
    LatestVolumeCalls(usize),
    /// The number of network calls made to find a new volume.
    NewVolumeCalls(usize),
    /// Statistics for a new chunk.
    NewChunk(NewChunkStats),
}

/// Statistics for a new chunk.
#[derive(Debug)]
pub struct NewChunkStats {
    /// The number of network calls made to find a new chunk.
    pub calls: usize,
    /// The latency between when a chunk was uploaded to S3 and when it was downloaded.
    pub latency: Option<Duration>,
}