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

Side by Side Diff: common/tsmon/types/cell.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 unified diff | Download patch
« no previous file with comments | « common/tsmon/store/storetest/testing.go ('k') | common/tsmon/types/metric.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package types 5 package types
6 6
7 import ( 7 import (
8 "time" 8 "time"
9 9
10 "github.com/luci/luci-go/common/tsmon/field" 10 "github.com/luci/luci-go/common/tsmon/field"
11 ) 11 )
12 12
13 // Cell is the smallest unit of data recorded by tsmon. Metrics can be 13 // Cell is the smallest unit of data recorded by tsmon. Metrics can be
14 // thought of as multi-dimensional maps (with fields defining the dimensions) - 14 // thought of as multi-dimensional maps (with fields defining the dimensions) -
15 // a Cell is one value in that map, with information about its fields and its 15 // a Cell is one value in that map, with information about its fields and its
16 // type. 16 // type.
17 type Cell struct { 17 type Cell struct {
18 MetricInfo 18 MetricInfo
19 MetricMetadata
19 CellData 20 CellData
20 } 21 }
21 22
22 // MetricInfo contains the definition of a metric. 23 // MetricInfo contains the definition of a metric.
23 type MetricInfo struct { 24 type MetricInfo struct {
24 Name string 25 Name string
25 Description string 26 Description string
26 Fields []field.Field 27 Fields []field.Field
27 ValueType ValueType 28 ValueType ValueType
28 } 29 }
29 30
31 // MetricMetadata contains user-provided metadata for a metric.
32 type MetricMetadata struct {
33 Units MetricDataUnits // the unit of recorded data for a given metric.
34 }
35
30 // CellData contains the value of a single cell. 36 // CellData contains the value of a single cell.
31 type CellData struct { 37 type CellData struct {
32 FieldVals []interface{} 38 FieldVals []interface{}
33 Target Target 39 Target Target
34 ResetTime time.Time 40 ResetTime time.Time
35 Value interface{} 41 Value interface{}
36 } 42 }
OLDNEW
« no previous file with comments | « common/tsmon/store/storetest/testing.go ('k') | common/tsmon/types/metric.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698