From 7256c5bd35ec860ad8a46282316ea57ccb707a95 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 24 Oct 2023 11:52:01 +0200 Subject: 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. --- dashboard/app/stats.go | 9 +++++++-- 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 -- cgit mrf-deployment