Explorar o código

change occurrences to operations

mihasya %!s(int64=12) %!d(string=hai) anos
pai
achega
ae85936ced
Modificáronse 2 ficheiros con 9 adicións e 6 borrados
  1. 3 0
      librato/client.go
  2. 6 6
      librato/librato.go

+ 3 - 0
librato/client.go

@@ -8,6 +8,9 @@ import (
 	"net/http"
 )
 
+const Operations = "operations"
+const OperationsShort = "ops"
+
 type LibratoClient struct {
 	Email, Token string
 }

+ 6 - 6
librato/librato.go

@@ -165,8 +165,8 @@ func (self *Reporter) BuildRequest(now time.Time, r metrics.Registry) (snapshot
 						Value:  m.Rate1(),
 						Period: int64(self.Interval.Seconds()),
 						Attributes: map[string]interface{}{
-							DisplayUnitsLong:  "occurences",
-							DisplayUnitsShort: "occ",
+							DisplayUnitsLong:  Operations,
+							DisplayUnitsShort: OperationsShort,
 							DisplayMin:        "0",
 						},
 					},
@@ -175,8 +175,8 @@ func (self *Reporter) BuildRequest(now time.Time, r metrics.Registry) (snapshot
 						Value:  m.Rate5(),
 						Period: int64(self.Interval.Seconds()),
 						Attributes: map[string]interface{}{
-							DisplayUnitsLong:  "occurences",
-							DisplayUnitsShort: "occ",
+							DisplayUnitsLong:  Operations,
+							DisplayUnitsShort: OperationsShort,
 							DisplayMin:        "0",
 						},
 					},
@@ -185,8 +185,8 @@ func (self *Reporter) BuildRequest(now time.Time, r metrics.Registry) (snapshot
 						Value:  m.Rate15(),
 						Period: int64(self.Interval.Seconds()),
 						Attributes: map[string]interface{}{
-							DisplayUnitsLong:  "occurences",
-							DisplayUnitsShort: "occ",
+							DisplayUnitsLong:  Operations,
+							DisplayUnitsShort: OperationsShort,
 							DisplayMin:        "0",
 						},
 					},