Add peak_rss_mb metrics
@@ -192,13 +192,18 @@ static void printSummary(honggfuzz_t* hfuzz) {
uint64_t guardNb = ATOMIC_GET(hfuzz->feedback.feedbackMap->guardNb);
uint64_t branch_percent_cov =
guardNb ? ((100 * ATOMIC_GET(hfuzz->linux.hwCnts.softCntEdge)) / guardNb) : 0;
+ struct rusage usage;
+ if (getrusage(RUSAGE_CHILDREN, &usage)){
+ PLOG_F("getrusage failed");
+ }
LOG_I("Summary iterations:%zu time:%" PRIu64 " speed:%" PRIu64 " "
"crashes_count:%zu timeout_count:%zu new_units_added:%zu "
- "slowest_unit_ms:%" PRId64 " guard_nb:%" PRIu64 " branch_coverage_percent:%" PRIu64,
+ "slowest_unit_ms:%" PRId64 " guard_nb:%" PRIu64 " branch_coverage_percent:%" PRIu64 " "
+ "peak_rss_mb:%zu",
hfuzz->cnts.mutationsCnt, elapsed_sec, exec_per_sec, hfuzz->cnts.crashesCnt,
hfuzz->cnts.timeoutedCnt, hfuzz->io.newUnitsAdded,
hfuzz->timing.timeOfLongestUnitInMilliseconds, hfuzz->feedback.feedbackMap->guardNb,
- branch_percent_cov);
+ branch_percent_cov, usage.ru_maxrss);
}
static void pingThreads(honggfuzz_t* hfuzz) {
