pub fn new(inner: S, size: Option<usize>) -> (Self, UploadProgressQuery<BUCKETS, INTERVAL>) {
        let state = Arc::new(Mutex::new((0, [(0, 0); BUCKETS])));
        let now = Instant::now();
        let query = UploadProgressQuery::new(now, Arc::downgrade(&state), size);

        (
            Self {
                state,
                start: now,
                inner,
            },
            query,
        )
    }
Create a new `UploadProgress` with the given stream and interval.
crates/turborepo-cache/src/upload_progress.rs