ops_realtime_traffic_models.go 570 B

12345678910111213141516171819
  1. package service
  2. import "time"
  3. // OpsRealtimeTrafficSummary is a lightweight summary used by the Ops dashboard "Realtime Traffic" card.
  4. // It reports QPS/TPS current/peak/avg for the requested time window.
  5. type OpsRealtimeTrafficSummary struct {
  6. // Window is a normalized label (e.g. "1min", "5min", "30min", "1h").
  7. Window string `json:"window"`
  8. StartTime time.Time `json:"start_time"`
  9. EndTime time.Time `json:"end_time"`
  10. Platform string `json:"platform"`
  11. GroupID *int64 `json:"group_id"`
  12. QPS OpsRateSummary `json:"qps"`
  13. TPS OpsRateSummary `json:"tps"`
  14. }