func toMetricTagsID(name string, tags Tags) metricTagsID {
	// calculate how large to make our byte buffer below
	bufSize := len(name)
	for _, t := range tags {
		bufSize += len(t.keyValue) + 1 // 1 for separator
	}

	buf := bytes.NewBuffer(make([]byte, 0, bufSize))
	_, _ = buf.WriteString(name)
	for _, tag := range tags {
		_, _ = buf.WriteRune('|')
		_, _ = buf.WriteString(tag.keyValue)
	}
	return metricTagsID(buf.Bytes())
}
// toMetricTagsID generates the metricTagsID identifier for the metricWithTags. A unique {metricName, set<Tag>} input will
// generate a unique output. This implementation tries to minimize memory allocation and runtime.
// The ID is created by adding the tags in the order they are provided (this means that, if the caller wants a specific set of tags to always
// result in the same ID, they must sort the Tags before providing them to this function).
toMetricTagsID generates the metricTagsID identifier for the metricWithTags. A unique {metricName, set} input will
generate a unique output. This implementation tries to minimize memory allocation and runtime.
The ID is created by adding the tags in the order they are provided (this means that, if the caller wants a specific set of tags to always
result in the same ID, they must sort the Tags before providing them to this function).
// toMetricTagsID generates the metricTagsID identifier for the metricWithTags . A unique { metricName set<Tag > } input will // generate a unique output . This implementation tries to minimize memory allocation and runtime . // The ID is created by adding the tags in the order they are provided ( this means that if the caller wants a specific set of tags to always // result in the same ID they must sort the Tags before providing them to this function ) .
func toMetricTagsID(name string, tags Tags) metricTagsID {
	bufSize := len(name)
	for _, t := range tags {
		bufSize += len(t.keyValue) + 1 
	}
	buf := bytes.NewBuffer(make([]byte, 0, bufSize))
	_, _ = buf.WriteString(name)
	for _, tag := range tags {
		_, _ = buf.WriteRune('|')
		_, _ = buf.WriteString(tag.keyValue)
	}
	return metricTagsID(buf.Bytes())
}
func toMetricTagsID ( name string , tags Tags ) metricTagsID { bufSize := len ( name ) for _ , t := range tags { bufSize += len ( t . keyValue ) + 1 } buf := bytes . NewBuffer ( make ( [ ] byte , 0 , bufSize ) ) _ , _ = buf . WriteString ( name ) for _ , tag := range tags { _ , _ = buf . WriteRune ( '|' ) _ , _ = buf . WriteString ( tag . keyValue ) } return metricTagsID ( buf . Bytes ( ) ) }
toMetricTagsID generates the metricTagsID identifier for the metricWithTags.
toMetricTagsID generates the metricTagsID identifier for the metricWithTags .
// calculate how large to make our byte buffer below // 1 for separator