address telemetry log message locality (#736)

This commit is contained in:
bmc-msft
2021-03-26 18:45:36 -04:00
committed by GitHub
parent 5c149413a5
commit dc9b6fa1b0
4 changed files with 27 additions and 19 deletions

View File

@ -4,7 +4,7 @@
use super::afl;
use anyhow::{Error, Result};
use onefuzz::jitter::delay_with_jitter;
use onefuzz_telemetry::{track_event, Event::runtime_stats};
use onefuzz_telemetry::Event::runtime_stats;
use serde::Deserialize;
pub const STATS_DELAY: std::time::Duration = std::time::Duration::from_secs(30);
@ -21,7 +21,7 @@ pub async fn monitor_stats(path: Option<String>, format: Option<StatsFormat>) ->
StatsFormat::AFL => afl::read_stats(&path).await,
};
if let Ok(stats) = stats {
track_event(runtime_stats, stats);
log_events!(runtime_stats; stats);
}
delay_with_jitter(STATS_DELAY).await;
}