diff options
| author | Taras Madan <tarasmadan@google.com> | 2022-03-22 16:05:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-22 16:05:16 +0100 |
| commit | 1ffe9e6099af97bf8bd61cc89e7c5a4e38fc08c7 (patch) | |
| tree | 761f26b61eba13685139b2fb47e90e06afcdbeff /syz-verifier/stats.go | |
| parent | 01d1c21e1a32ecf82c6836c6cde42aa0d0e8caf9 (diff) | |
syz-verifier: improve statistics (#3038)
s/TotalMismatches/TotalCallMismatches/ for readability.
Add ExecErrorProgs to count failures.
Diffstat (limited to 'syz-verifier/stats.go')
| -rw-r--r-- | syz-verifier/stats.go | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/syz-verifier/stats.go b/syz-verifier/stats.go index 17a443315..91fd7538b 100644 --- a/syz-verifier/stats.go +++ b/syz-verifier/stats.go @@ -16,12 +16,13 @@ import ( // of the verification process. type Stats struct { // Calls stores statistics for all supported system calls. - Calls map[string]*CallStats - TotalMismatches int64 - TotalProgs int64 - FlakyProgs int64 - MismatchingProgs int64 - StartTime time.Time + Calls map[string]*CallStats + TotalCallMismatches int64 + TotalProgs int64 + ExecErrorProgs int64 + FlakyProgs int64 + MismatchingProgs int64 + StartTime time.Time } // CallStats stores information used to generate statistics for the @@ -65,7 +66,7 @@ func (stats *Stats) GetTextDescription(deltaTime float64) string { tc := stats.totalCallsExecuted() fmt.Fprintf(&result, "total number of mismatches / total number of calls "+ - "executed: %d / %d (%0.2f %%)\n\n", stats.TotalMismatches, tc, getPercentage(stats.TotalMismatches, tc)) + "executed: %d / %d (%0.2f %%)\n\n", stats.TotalCallMismatches, tc, getPercentage(stats.TotalCallMismatches, tc)) fmt.Fprintf(&result, "programs / minute: %0.2f\n\n", float64(stats.TotalProgs)/deltaTime) fmt.Fprintf(&result, "true mismatching programs: %d / total number of programs: %d (%0.2f %%)\n", stats.MismatchingProgs, stats.TotalProgs, getPercentage(stats.MismatchingProgs, stats.TotalProgs)) @@ -91,8 +92,8 @@ func (stats *Stats) getCallStatsTextDescription(call string) string { "\t↳ mismatches of %s / total number of mismatches: "+ "%d / %d (%0.2f %%)\n"+ "\t↳ %d distinct states identified: %v\n", syscallName, syscallName, syscallName, mismatches, occurrences, - getPercentage(mismatches, occurrences), syscallName, mismatches, stats.TotalMismatches, - getPercentage(mismatches, stats.TotalMismatches), len(syscallStat.States), stats.getOrderedStates(syscallName)) + getPercentage(mismatches, occurrences), syscallName, mismatches, stats.TotalCallMismatches, + getPercentage(mismatches, stats.TotalCallMismatches), len(syscallStat.States), stats.getOrderedStates(syscallName)) } func (stats *Stats) totalCallsExecuted() int64 { |
