Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1033)

Unified Diff: common/tsmon/monitor/acq.go

Issue 2123853002: Added unit annotation supports onto tsmon in go. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Specify the unit of logdog/collector/subscription/processing_time_ms with types.Milliseconds Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/tsmon/metric/standard_metrics.go ('k') | common/tsmon/monitor/acq_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/tsmon/monitor/acq.go
diff --git a/common/tsmon/monitor/acq.go b/common/tsmon/monitor/acq.go
index f3806be45168613fd92ce46cf163c3b2622622e6..5d097d50c44786838af22d0049904868dd58874e 100644
--- a/common/tsmon/monitor/acq.go
+++ b/common/tsmon/monitor/acq.go
@@ -44,6 +44,9 @@ func SerializeCell(c types.Cell) *pb.MetricsData {
d.StartTimestampUs = proto.Uint64(uint64(c.ResetTime.UnixNano() / int64(time.Microsecond)))
}
c.Target.PopulateProto(&d)
+ if c.Units.IsSpecified() {
+ d.Units = c.Units.AsProto()
+ }
SerializeValue(c.ValueType, c.Value, &d)
return &d
« no previous file with comments | « common/tsmon/metric/standard_metrics.go ('k') | common/tsmon/monitor/acq_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698