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

Commit

Permalink
Reporting coverage on task start up (#3502)
Browse files Browse the repository at this point in the history
* Reporting coverage on task start up

* Moving metric up.
  • Loading branch information
nharper285 committed Sep 14, 2023
1 parent 9ede0de commit cde6a19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/agent/onefuzz-task/src/tasks/coverage/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ impl CoverageTask {

context.heartbeat.alive();

info!("report initial coverage");
context.report_coverage_stats().await;

for dir in &self.config.readonly_inputs {
debug!("recording coverage for {}", dir.local_path.display());

Expand All @@ -161,7 +164,6 @@ impl CoverageTask {
}

if seen_inputs {
context.report_coverage_stats().await;
context.save_and_sync_coverage().await?;
}

Expand Down
4 changes: 2 additions & 2 deletions src/agent/onefuzz/src/syncdir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl SyncedDir {
Event::new_coverage => {
jr_client
.send_direct(
JobResultData::CoverageData,
JobResultData::NewCoverage,
HashMap::from([("count".to_string(), 1.0)]),
)
.await;
Expand Down Expand Up @@ -351,7 +351,7 @@ impl SyncedDir {
Event::new_coverage => {
jr_client
.send_direct(
JobResultData::CoverageData,
JobResultData::NewCoverage,
HashMap::from([("count".to_string(), 1.0)]),
)
.await;
Expand Down

0 comments on commit cde6a19

Please sign in to comment.