combos.go 1023 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package metrics
  2. // type comboCounterRef struct {
  3. // *MetricMeta
  4. // usageCounter Counter
  5. // metricCounter Counter
  6. // }
  7. //
  8. // func RegComboCounter(name string, tagStrings ...string) Counter {
  9. // meta := NewMetricMeta(name, tagStrings)
  10. // cr := &comboCounterRef{
  11. // MetricMeta: meta,
  12. // usageCounter: NewCounter(meta),
  13. // metricCounter: NewCounter(meta),
  14. // }
  15. //
  16. // UsageStats.Register(cr.usageCounter)
  17. // MetricStats.Register(cr.metricCounter)
  18. //
  19. // return cr
  20. // }
  21. //
  22. // func (c comboCounterRef) Clear() {
  23. // c.usageCounter.Clear()
  24. // c.metricCounter.Clear()
  25. // }
  26. //
  27. // func (c comboCounterRef) Count() int64 {
  28. // panic("Count called on a combocounter ref")
  29. // }
  30. //
  31. // // Dec panics.
  32. // func (c comboCounterRef) Dec(i int64) {
  33. // c.usageCounter.Dec(i)
  34. // c.metricCounter.Dec(i)
  35. // }
  36. //
  37. // // Inc panics.
  38. // func (c comboCounterRef) Inc(i int64) {
  39. // c.usageCounter.Inc(i)
  40. // c.metricCounter.Inc(i)
  41. // }
  42. //
  43. // func (c comboCounterRef) Snapshot() Metric {
  44. // return c.metricCounter.Snapshot()
  45. // }