// Add add count for CounterMetrics
Add add count for CounterMetrics
// Add add count for CounterMetrics
func (c *SimpleCollector) Add(key string, delta float64) {
	c.mu.Lock()
	defer c.mu.Unlock()
	if _, dup := c.metrics[key]; !dup {
		c.metrics[key] = &CounterMetrics{
			key:   key,
			value: &Float{},
		}
	}
	if v, ok := c.metrics[key].(*CounterMetrics); ok {
		v.value.add(delta)
	}
}
func ( c * SimpleCollector ) Add ( key string , delta float64 ) { c . mu . Lock ( ) defer c . mu . Unlock ( ) if _ , dup := c . metrics [ key ] ; ! dup { c . metrics [ key ] = & CounterMetrics { key : key , value : & Float { } , } } if v , ok := c . metrics [ key ] . ( * CounterMetrics ) ; ok { v . value . add ( delta ) } }
Add add count for CounterMetrics
Add add count for CounterMetrics
// add key // incremental counter, ignore otherwise