GetFingerprintsForLabelName simplifications.

``MetricPersistence.GetFingerprintsForLabelName(l *model.LabelName)``
->
``MetricPersistence.GetFingerprintsForLabelName(l model.LabelName)``
This commit is contained in:
Matt T. Proud 2013-02-13 17:44:35 -08:00
parent 900bb988c1
commit 1e2d6c7418
3 changed files with 7 additions and 7 deletions

View File

@ -38,7 +38,7 @@ type MetricPersistence interface {
// Get all of the metric fingerprints that are associated for a given label
// name.
GetFingerprintsForLabelName(labelName *model.LabelName) ([]*model.Fingerprint, error)
GetFingerprintsForLabelName(labelName model.LabelName) ([]*model.Fingerprint, error)
GetMetricForFingerprint(f *model.Fingerprint) (*model.Metric, error)

View File

@ -791,7 +791,7 @@ func TestGetFingerprintsForLabelName(t *testing.T) {
}
b := model.LabelName("name")
result, getErr := persistence.GetFingerprintsForLabelName(&b)
result, getErr := persistence.GetFingerprintsForLabelName(b)
if getErr != nil {
t.Error(getErr)
@ -802,7 +802,7 @@ func TestGetFingerprintsForLabelName(t *testing.T) {
}
b = model.LabelName("request_type")
result, getErr = persistence.GetFingerprintsForLabelName(&b)
result, getErr = persistence.GetFingerprintsForLabelName(b)
if getErr != nil {
t.Error(getErr)
@ -813,7 +813,7 @@ func TestGetFingerprintsForLabelName(t *testing.T) {
}
b = model.LabelName("language")
result, getErr = persistence.GetFingerprintsForLabelName(&b)
result, getErr = persistence.GetFingerprintsForLabelName(b)
if getErr != nil {
t.Error(getErr)
@ -824,7 +824,7 @@ func TestGetFingerprintsForLabelName(t *testing.T) {
}
b = model.LabelName("sprache")
result, getErr = persistence.GetFingerprintsForLabelName(&b)
result, getErr = persistence.GetFingerprintsForLabelName(b)
if getErr != nil {
t.Error(getErr)

View File

@ -231,7 +231,7 @@ func (l *LevelDBMetricPersistence) GetFingerprintsForLabelSet(labelSet model.Lab
return
}
func (l *LevelDBMetricPersistence) GetFingerprintsForLabelName(labelName *model.LabelName) (fps []*model.Fingerprint, err error) {
func (l *LevelDBMetricPersistence) GetFingerprintsForLabelName(labelName model.LabelName) (fps []*model.Fingerprint, err error) {
begin := time.Now()
defer func() {
@ -242,7 +242,7 @@ func (l *LevelDBMetricPersistence) GetFingerprintsForLabelName(labelName *model.
fps = make([]*model.Fingerprint, 0, 0)
raw, err := l.labelNameToFingerprints.Get(coding.NewProtocolBufferEncoder(model.LabelNameToDTO(labelName)))
raw, err := l.labelNameToFingerprints.Get(coding.NewProtocolBufferEncoder(model.LabelNameToDTO(&labelName)))
if err != nil {
return
}