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

@ -70,6 +70,9 @@ type apiData struct {
// HighReached is true when the system has reached a high vacuum stage.
HighReached bool
}
// LoopLoad is a percentage expressing how busy the processing loop is; 100
// is full utilization; >100 is lag.
LoopLoad int64
// System junk.
System struct {
// Load of the system.
@ -114,6 +117,7 @@ func (s *webServer) apiData(skipSystem bool) *apiData {
ad.Pumps.DPOn = state.dpOn
ad.Feedback.RoughReached = rough
ad.Feedback.HighReached = high
ad.LoopLoad = s.d.loopLoad()
ad.System.Load = load
ad.System.Hostname = hostname
return &ad