// AddMetricByString dynamically creates a PCPMetric
AddMetricByString dynamically creates a PCPMetric
// AddMetricByString dynamically creates a PCPMetric
func (r *PCPRegistry) AddMetricByString(str string, val interface{}, t MetricType, s MetricSemantics, u MetricUnit) (Metric, error) {
	metric, indom, instances, err := parseString(str)
	if err != nil {
		return nil, err
	}
	if instances == nil {
		return r.addSingletonMetricByString(metric, val, t, s, u)
	}
	return r.addInstanceMetricByString(metric, val, indom, instances, t, s, u)
}
func ( r * PCPRegistry ) AddMetricByString ( str string , val interface { } , t MetricType , s MetricSemantics , u MetricUnit ) ( Metric , error ) { metric , indom , instances , err := parseString ( str ) if err != nil { return nil , err } if instances == nil { return r . addSingletonMetricByString ( metric , val , t , s , u ) } return r . addInstanceMetricByString ( metric , val , indom , instances , t , s , u ) }
AddMetricByString dynamically creates a PCPMetric
AddMetricByString dynamically creates a PCPMetric