Add debug snippet for debugging non-attributable performance issues

This commit is contained in:
Daniel 2020-12-01 19:24:41 +01:00
parent 36068d8cac
commit f8529cf530
2 changed files with 12 additions and 0 deletions
modules

View file

@ -173,6 +173,13 @@ func startModules() error {
case statusReady:
execCnt++
m.start(reports)
// DEBUG SNIPPET
// Slow-start for non-attributable performance issues.
// If you use subsystems, you'll need the snippet there too.
// log.Errorf("modules: starting %s", m.Name)
// time.Sleep(10 * time.Second)
// break
// END DEBUG SNIPPET
}
}

View file

@ -187,6 +187,11 @@ func (mng *Manager) shouldServeUpdates() bool {
// CheckConfig checks subsystem configuration values and enables
// or disables subsystems and their dependencies as required.
func (mng *Manager) CheckConfig(ctx context.Context) error {
// DEBUG SNIPPET
// Slow-start for non-attributable performance issues.
// You'll need the snippet in the modules too.
// time.Sleep(11 * time.Second)
// END DEBUG SNIPPET
return mng.handleConfigChanges(ctx)
}