yt_dlp/stats/config.rs
1/// Configuration for the [`super::StatisticsTracker`].
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3pub struct TrackerConfig {
4 /// Maximum number of completed download records retained in history.
5 /// Oldest records are evicted when this limit is reached. Default: 1000.
6 pub max_download_history: usize,
7}
8
9impl Default for TrackerConfig {
10 fn default() -> Self {
11 Self {
12 max_download_history: 1000,
13 }
14 }
15}
16
17impl std::fmt::Display for TrackerConfig {
18 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19 write!(f, "TrackerConfig(max_history={})", self.max_download_history)
20 }
21}