MCPcopy Create free account
hub / github.com/InferCore/InferCore / CurrentSignals

Method CurrentSignals

internal/server/server.go:813–826  ·  view source on GitHub ↗

CurrentSignals implements interfaces.ScalingSignalProvider for autoscaler-facing hints.

()

Source from the content-addressed store, hash-verified

811
812// CurrentSignals implements interfaces.ScalingSignalProvider for autoscaler-facing hints.
813func (s *Server) CurrentSignals() types.ScalingSignals {
814 ttftRatio := 1.0
815 var fbRate float64
816 if me, ok := s.sloEngine.(*slo.MemoryEngine); ok {
817 ttftRatio, fbRate = me.ScalingAggregates()
818 }
819 return types.ScalingSignals{
820 QueueDepth: int(s.inferInflight.Load()),
821 TimeoutSpike: s.timeoutSpikeActive(),
822 TTFTDegradationRatio: ttftRatio,
823 RecentFallbackRate: fbRate,
824 BackendSaturationHints: s.backendSaturationHints(),
825 }
826}
827
828func (s *Server) backendSaturationHints() []string {
829 out := make([]string, 0)

Callers 2

statusMethod · 0.95
initPrometheusMetricsMethod · 0.95

Calls 3

timeoutSpikeActiveMethod · 0.95
ScalingAggregatesMethod · 0.80

Tested by

no test coverage detected