mirror of
https://github.com/safing/portbase
synced 2025-09-02 10:40:39 +00:00
Merge pull request #108 from safing/feature/perf-debug-snippet
Add debug snippet for debugging non-attributable performance issues
This commit is contained in:
commit
104455ad88
2 changed files with 12 additions and 0 deletions
|
@ -173,6 +173,13 @@ func startModules() error {
|
||||||
case statusReady:
|
case statusReady:
|
||||||
execCnt++
|
execCnt++
|
||||||
m.start(reports)
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,6 +187,11 @@ func (mng *Manager) shouldServeUpdates() bool {
|
||||||
// CheckConfig checks subsystem configuration values and enables
|
// CheckConfig checks subsystem configuration values and enables
|
||||||
// or disables subsystems and their dependencies as required.
|
// or disables subsystems and their dependencies as required.
|
||||||
func (mng *Manager) CheckConfig(ctx context.Context) error {
|
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)
|
return mng.handleConfigChanges(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue