|
|
@ -348,8 +348,20 @@ func (s memorySeriesStorage) Close() (err error) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s memorySeriesStorage) GetAllMetricNames() ([]string, error) {
|
|
|
|
func (s memorySeriesStorage) GetAllMetricNames() (metrics []string, err error) {
|
|
|
|
panic("not implemented")
|
|
|
|
metricSet := map[string]bool{}
|
|
|
|
|
|
|
|
for _, series := range s.fingerprintToSeries {
|
|
|
|
|
|
|
|
if metricName, ok := series.metric["name"]; !ok {
|
|
|
|
|
|
|
|
err = fmt.Errorf("Found timeseries without metric name label: %v", series.metric)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
metricSet[string(metricName)] = true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for metricName := range metricSet {
|
|
|
|
|
|
|
|
metrics = append(metrics, metricName)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sort.Strings(metrics)
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s memorySeriesStorage) ForEachSample(builder IteratorsForFingerprintBuilder) (err error) {
|
|
|
|
func (s memorySeriesStorage) ForEachSample(builder IteratorsForFingerprintBuilder) (err error) {
|
|
|
|