aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/go.opencensus.io/stats/measure_int64.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.opencensus.io/stats/measure_int64.go')
-rw-r--r--vendor/go.opencensus.io/stats/measure_int64.go36
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/go.opencensus.io/stats/measure_int64.go b/vendor/go.opencensus.io/stats/measure_int64.go
new file mode 100644
index 0000000..c4243ba
--- /dev/null
+++ b/vendor/go.opencensus.io/stats/measure_int64.go
@@ -0,0 +1,36 @@
1// Copyright 2017, OpenCensus Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15
16package stats
17
18// Int64Measure is a measure for int64 values.
19type Int64Measure struct {
20 *measureDescriptor
21}
22
23// M creates a new int64 measurement.
24// Use Record to record measurements.
25func (m *Int64Measure) M(v int64) Measurement {
26 return Measurement{m: m.measureDescriptor, v: float64(v)}
27}
28
29// Int64 creates a new measure for int64 values.
30//
31// See the documentation for interface Measure for more guidance on the
32// parameters of this function.
33func Int64(name, description, unit string) *Int64Measure {
34 mi := registerMeasureHandle(name, description, unit)
35 return &Int64Measure{mi}
36}