Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit a2e0974

Browse files
nharper285chkeita
authored andcommitted
Reporting coverage on task start up (#3502)
* Reporting coverage on task start up * Moving metric up.
1 parent e2f38ce commit a2e0974

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/agent/onefuzz-task/src/tasks/coverage/generic.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ impl CoverageTask {
141141

142142
context.heartbeat.alive();
143143

144+
info!("report initial coverage");
145+
context.report_coverage_stats().await;
146+
144147
for dir in &self.config.readonly_inputs {
145148
debug!("recording coverage for {}", dir.local_path.display());
146149

@@ -161,7 +164,6 @@ impl CoverageTask {
161164
}
162165

163166
if seen_inputs {
164-
context.report_coverage_stats().await;
165167
context.save_and_sync_coverage().await?;
166168
}
167169

src/agent/onefuzz/src/syncdir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ impl SyncedDir {
283283
Event::new_coverage => {
284284
jr_client
285285
.send_direct(
286-
JobResultData::CoverageData,
286+
JobResultData::NewCoverage,
287287
HashMap::from([("count".to_string(), 1.0)]),
288288
)
289289
.await;
@@ -351,7 +351,7 @@ impl SyncedDir {
351351
Event::new_coverage => {
352352
jr_client
353353
.send_direct(
354-
JobResultData::CoverageData,
354+
JobResultData::NewCoverage,
355355
HashMap::from([("count".to_string(), 1.0)]),
356356
)
357357
.await;

0 commit comments

Comments
 (0)