From 8e8b752524e1c1558a0858a121bb56ac1b78456c Mon Sep 17 00:00:00 2001 From: Nayana Bidari Date: Fri, 14 May 2021 17:20:13 -0700 Subject: Add stuck tasks and startup stuck tasks to weirdness metric Weirdness metric will replace the below two metrics: - watchdog/stuck_startup_detected - watchdog/stuck_tasks_detected PiperOrigin-RevId: 373895696 --- pkg/sentry/watchdog/watchdog.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/sentry') diff --git a/pkg/sentry/watchdog/watchdog.go b/pkg/sentry/watchdog/watchdog.go index bd31464d0..dfe85f31d 100644 --- a/pkg/sentry/watchdog/watchdog.go +++ b/pkg/sentry/watchdog/watchdog.go @@ -243,6 +243,7 @@ func (w *Watchdog) waitForStart() { } stuckStartup.Increment() + metric.WeirdnessMetric.Increment("watchdog_stuck_startup") var buf bytes.Buffer buf.WriteString(fmt.Sprintf("Watchdog.Start() not called within %s", w.StartupTimeout)) @@ -316,6 +317,7 @@ func (w *Watchdog) runTurn() { // Task.UninterruptibleSleepStart/Finish. tc = &offender{lastUpdateTime: lastUpdateTime} stuckTasks.Increment() + metric.WeirdnessMetric.Increment("watchdog_stuck_tasks") newTaskFound = true } newOffenders[t] = tc -- cgit v1.2.3