func (em *EventMeter) GetMetric(query string) (*EventMetric, error) {
	em.mtx.Lock()
	defer em.mtx.Unlock()
	metric, ok := em.queryToMetricMap[query]
	if !ok {
		return nil, fmt.Errorf("unknown query: %s", query)
	}
	return metric.fillMetric().Copy(), nil
}
// GetMetric fills in the latest data for an query and return a copy.
GetMetric fills in the latest data for an query and return a copy.
// GetMetric fills in the latest data for an query and return a copy .
func (em *EventMeter) GetMetric(query string) (*EventMetric, error) {
	em.mtx.Lock()
	defer em.mtx.Unlock()
	metric, ok := em.queryToMetricMap[query]
	if !ok {
		return nil, fmt.Errorf("unknown query: %s", query)
	}
	return metric.fillMetric().Copy(), nil
}
func ( em * EventMeter ) GetMetric ( query string ) ( * EventMetric , error ) { em . mtx . Lock ( ) defer em . mtx . Unlock ( ) metric , ok := em . queryToMetricMap [ query ] if ! ok { return nil , fmt . Errorf ( " " , query ) } return metric . fillMetric ( ) . Copy ( ) , nil }
GetMetric fills in the latest data for an query and return a copy.
GetMetric fills in the latest data for an query and return a copy .