We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca89e37 commit a57a46aCopy full SHA for a57a46a
process/src/monitor.rs
@@ -55,15 +55,15 @@ struct SerializedModuleState {
55
writes: BTreeMap<String, SerializedWriteStreamState>,
56
}
57
58
-const fn default_frequency() -> Duration {
59
- Duration::from_secs(5)
+const fn default_frequency() -> f64 {
+ 5.0
60
61
62
#[derive(Deserialize)]
63
pub struct MonitorConfig {
64
output: PathBuf,
65
#[serde(default = "default_frequency")]
66
- frequency: Duration,
+ frequency_secs: f64,
67
68
69
pub struct Monitor {
@@ -78,7 +78,7 @@ impl Monitor {
78
modules: BTreeMap::new(),
79
stream_writes: Arc::new(DashMap::new()),
80
output_path: config.output,
81
- write_frequency: config.frequency,
+ write_frequency: Duration::from_secs_f64(config.frequency_secs),
82
83
84
0 commit comments