Skip to content

Commit

Permalink
Record branch probe coverage in plot_data
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-bell committed Jan 9, 2022
1 parent 6c8abc5 commit b971382
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ private void prepareOutputDirectory() throws IOException {

protected String getStatNames() {
return "# unix_time, cycles_done, cur_path, paths_total, pending_total, " +
"pending_favs, map_size, unique_crashes, unique_hangs, max_depth, execs_per_sec, valid_inputs, invalid_inputs, valid_cov";
"pending_favs, map_size, unique_crashes, unique_hangs, max_depth, execs_per_sec, valid_inputs, invalid_inputs, valid_cov, all_cov, valid_cov";

This comment has been minimized.

Copy link
@rohanpadhye

rohanpadhye Jan 9, 2022

There seem to be two columns named valid_cov here. Maybe rename the third-from-last column to valid_map_size, because it's actually a fraction in AFL-compatible format rather than a meaningful coverage number.

This comment has been minimized.

Copy link
@jon-bell

jon-bell Jan 9, 2022

Author Owner

I don't want to break backwards compatibility with other scripts that might make assumptions for what valid_cov is. I chose new names for the columns and added them in a separate PR - rohanpadhye#173

}

/* Writes a line of text to a given log file. */
Expand Down Expand Up @@ -520,10 +520,10 @@ protected void displayStats(boolean force) {
}
}

String plotData = String.format("%d, %d, %d, %d, %d, %d, %.2f%%, %d, %d, %d, %.2f, %d, %d, %.2f%%",
String plotData = String.format("%d, %d, %d, %d, %d, %d, %.2f%%, %d, %d, %d, %.2f, %d, %d, %.2f%%, %d, %d",
TimeUnit.MILLISECONDS.toSeconds(now.getTime()), cyclesCompleted, currentParentInputIdx,
numSavedInputs, 0, 0, nonZeroFraction, uniqueFailures.size(), 0, 0, intervalExecsPerSecDouble,
numValid, numTrials-numValid, nonZeroValidFraction);
numValid, numTrials-numValid, nonZeroValidFraction, nonZeroCount, nonZeroValidCount);
appendLineToFile(statsFile, plotData);
}

Expand Down

0 comments on commit b971382

Please sign in to comment.