aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-08-20 12:34:18 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-08-20 11:01:51 +0000
commite4aed695dda3b9b6c5185feb5f5f993955843594 (patch)
tree0e56007ed2b370ad556a0be45bbd41dc7c1af081 /syz-cluster
parent1157ee352849f8b61e467c77531165ac237d9246 (diff)
syz-cluster: display the session processing time
Diffstat (limited to 'syz-cluster')
-rw-r--r--syz-cluster/dashboard/templates/index.html4
-rw-r--r--syz-cluster/pkg/db/entities.go7
2 files changed, 10 insertions, 1 deletions
diff --git a/syz-cluster/dashboard/templates/index.html b/syz-cluster/dashboard/templates/index.html
index 80d069749..b52da738f 100644
--- a/syz-cluster/dashboard/templates/index.html
+++ b/syz-cluster/dashboard/templates/index.html
@@ -61,7 +61,9 @@
<td>{{.Series.AuthorEmail}}</td>
<td>
{{if .Session}}
- {{.Session.Status}} {{if gt .Findings 0}}<b>[{{.Findings}} findings]</b>{{end}}
+ {{.Session.Status}}
+ {{if eq .Session.Status "finished"}}in {{.Session.Duration}}{{end}}
+ {{if gt .Findings 0}}<br /><b>[{{.Findings}} findings]</b>{{end}}
{{else}}
-
{{end}}
diff --git a/syz-cluster/pkg/db/entities.go b/syz-cluster/pkg/db/entities.go
index b1ffc6949..53e52b4ea 100644
--- a/syz-cluster/pkg/db/entities.go
+++ b/syz-cluster/pkg/db/entities.go
@@ -102,6 +102,13 @@ func (s *Session) Status() SessionStatus {
return SessionStatusFinished
}
+func (s *Session) Duration() time.Duration {
+ if s.FinishedAt.IsNull() {
+ return 0
+ }
+ return s.FinishedAt.Time.Sub(s.StartedAt.Time).Truncate(time.Minute)
+}
+
func (s *Session) SetStartedAt(t time.Time) {
s.StartedAt = spanner.NullTime{Time: t, Valid: true}
}