succd: run at 100Hz, monitor load and jitter

This commit is contained in:
Serge Bazanski 2024-09-28 14:26:24 +02:00
parent 12f6815673
commit 96e07ece2d
4 changed files with 35 additions and 5 deletions

View file

@ -7,6 +7,7 @@ import "k8s.io/klog"
//
// This is a subset of daemon functions limited to a safe, explicit subset.
type daemonController interface {
loopLoad() int64
// snapshot returns an internally consistent copy of the daemon state.
snapshot() *daemonState
// rpSet enables/disables the roughing pump.
@ -19,6 +20,10 @@ type daemonController interface {
ventPress()
}
func (d *daemon) loopLoad() int64 {
return d.load.Load()
}
func (d *daemon) snapshot() *daemonState {
d.mu.RLock()
ds := d.daemonState