| 337 | } |
| 338 | |
| 339 | void Fuzzer::PrintStats(const char *Where, const char *End, size_t Units, |
| 340 | size_t Features) { |
| 341 | size_t ExecPerSec = execPerSec(); |
| 342 | if (!Options.Verbosity) |
| 343 | return; |
| 344 | Printf("#%zd\t%s", TotalNumberOfRuns, Where); |
| 345 | if (size_t N = TPC.GetTotalPCCoverage()) |
| 346 | Printf(" cov: %zd", N); |
| 347 | if (size_t N = Features ? Features : Corpus.NumFeatures()) |
| 348 | Printf(" ft: %zd", N); |
| 349 | if (!Corpus.empty()) { |
| 350 | Printf(" corp: %zd", Corpus.NumActiveUnits()); |
| 351 | if (size_t N = Corpus.SizeInBytes()) { |
| 352 | if (N < (1 << 14)) |
| 353 | Printf("/%zdb", N); |
| 354 | else if (N < (1 << 24)) |
| 355 | Printf("/%zdKb", N >> 10); |
| 356 | else |
| 357 | Printf("/%zdMb", N >> 20); |
| 358 | } |
| 359 | if (size_t FF = Corpus.NumInputsThatTouchFocusFunction()) |
| 360 | Printf(" focus: %zd", FF); |
| 361 | } |
| 362 | if (TmpMaxMutationLen) |
| 363 | Printf(" lim: %zd", TmpMaxMutationLen); |
| 364 | if (Units) |
| 365 | Printf(" units: %zd", Units); |
| 366 | |
| 367 | Printf(" exec/s: %zd", ExecPerSec); |
| 368 | Printf(" rss: %zdMb", GetPeakRSSMb()); |
| 369 | Printf("%s", End); |
| 370 | } |
| 371 | |
| 372 | void Fuzzer::PrintFinalStats() { |
| 373 | if (Options.PrintFullCoverage) |
no test coverage detected