CurrentSignals implements interfaces.ScalingSignalProvider for autoscaler-facing hints.
()
| 811 | |
| 812 | // CurrentSignals implements interfaces.ScalingSignalProvider for autoscaler-facing hints. |
| 813 | func (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 | |
| 828 | func (s *Server) backendSaturationHints() []string { |
| 829 | out := make([]string, 0) |
no test coverage detected