Skip to content

Commit a57a46a

Browse files
committed
fix: forgot durations serialize weird
1 parent ca89e37 commit a57a46a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

process/src/monitor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ struct SerializedModuleState {
5555
writes: BTreeMap<String, SerializedWriteStreamState>,
5656
}
5757

58-
const fn default_frequency() -> Duration {
59-
Duration::from_secs(5)
58+
const fn default_frequency() -> f64 {
59+
5.0
6060
}
6161

6262
#[derive(Deserialize)]
6363
pub struct MonitorConfig {
6464
output: PathBuf,
6565
#[serde(default = "default_frequency")]
66-
frequency: Duration,
66+
frequency_secs: f64,
6767
}
6868

6969
pub struct Monitor {
@@ -78,7 +78,7 @@ impl Monitor {
7878
modules: BTreeMap::new(),
7979
stream_writes: Arc::new(DashMap::new()),
8080
output_path: config.output,
81-
write_frequency: config.frequency,
81+
write_frequency: Duration::from_secs_f64(config.frequency_secs),
8282
}
8383
}
8484

0 commit comments

Comments
 (0)