diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2023-10-24 11:52:01 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2023-10-24 16:29:25 +0000 |
| commit | 7256c5bd35ec860ad8a46282316ea57ccb707a95 (patch) | |
| tree | 3153a381845b4b239f29575124e24e7a67bcfba3 | |
| parent | af8d2e46418eefb127e9fa9309a63fa60ef7fc66 (diff) | |
dashboard: export more stat data
Export first crash time and fix commit hashes.
Export list of managers on which the bug was triggered.
Calculate reporting time more precisely.
| -rw-r--r-- | dashboard/app/stats.go | 9 | ||||
| -rw-r--r-- | pkg/stats/syzbotstats/bug.go | 7 |
2 files changed, 12 insertions, 4 deletions
diff --git a/dashboard/app/stats.go b/dashboard/app/stats.go index adcb24643..4133690cc 100644 --- a/dashboard/app/stats.go +++ b/dashboard/app/stats.go @@ -154,13 +154,15 @@ func getBugSummaries(c context.Context, ns, stage string) ([]*syzbotstats.BugSta continue } targetStage := bugReportingByName(bug, stage) - if targetStage == nil || targetStage.Closed.IsZero() { + if targetStage == nil || targetStage.Reported.IsZero() { continue } obj := &syzbotstats.BugStatSummary{ Title: bug.Title, - ReleasedTime: targetStage.Closed, + FirstTime: bug.FirstTime, + ReleasedTime: targetStage.Reported, ResolvedTime: bug.Closed, + HappenedOn: bug.HappenedOn, Strace: dashapi.CrashFlags(crash.Flags)&dashapi.CrashUnderStrace > 0, } for _, stage := range bug.Reporting { @@ -168,6 +170,9 @@ func getBugSummaries(c context.Context, ns, stage string) ([]*syzbotstats.BugSta obj.IDs = append(obj.IDs, stage.ID) } } + for _, commit := range bug.CommitInfo { + obj.FixHashes = append(obj.FixHashes, commit.Hash) + } if crash.ReproSyz > 0 { obj.ReproTime = crash.Time } diff --git a/pkg/stats/syzbotstats/bug.go b/pkg/stats/syzbotstats/bug.go index 11e97fac1..c11274583 100644 --- a/pkg/stats/syzbotstats/bug.go +++ b/pkg/stats/syzbotstats/bug.go @@ -8,14 +8,17 @@ import "time" type BugStatSummary struct { Title string IDs []string // IDs used by syzbot for this bug. + FirstTime time.Time // When the bug was first hit. ReleasedTime time.Time // When the bug was published. ReproTime time.Time // When we found the reproducer. CauseBisectTime time.Time // When we found cause bisection. ResolvedTime time.Time // When the bug was resolved. Status BugStatus Subsystems []string - Strace bool // Whether we managed to reproduce under strace. - HitsPerDay float64 // Average number of bug hits per day. + Strace bool // Whether we managed to reproduce under strace. + HitsPerDay float64 // Average number of bug hits per day. + FixHashes []string // Hashes of fix commits. + HappenedOn []string // Managers on which the crash happened. } type BugStatus string |
