Copyright 2018, OpenCensus Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

package metricdata

import (
	
)
Point is a single data point of a time series.
Time is the point in time that this point represents in a time series.
Value is the value of this point. Prefer using ReadValue to switching on the value type, since new value types might be added.
	Value interface{}
}
go:generate stringer -type ValueType
NewFloat64Point creates a new Point holding a float64 value.
func ( time.Time,  float64) Point {
	return Point{
		Value: ,
		Time:  ,
	}
}
NewInt64Point creates a new Point holding an int64 value.
func ( time.Time,  int64) Point {
	return Point{
		Value: ,
		Time:  ,
	}
}
NewDistributionPoint creates a new Point holding a Distribution value.
func ( time.Time,  *Distribution) Point {
	return Point{
		Value: ,
		Time:  ,
	}
}
NewSummaryPoint creates a new Point holding a Summary value.
func ( time.Time,  *Summary) Point {
	return Point{
		Value: ,
		Time:  ,
	}
}
ValueVisitor allows reading the value of a point.
type ValueVisitor interface {
	VisitFloat64Value(float64)
	VisitInt64Value(int64)
	VisitDistributionValue(*Distribution)
	VisitSummaryValue(*Summary)
}
ReadValue accepts a ValueVisitor and calls the appropriate method with the value of this point. Consumers of Point should use this in preference to switching on the type of the value directly, since new value types may be added.
func ( Point) ( ValueVisitor) {
	switch v := .Value.(type) {
	case int64:
		.VisitInt64Value()
	case float64:
		.VisitFloat64Value()
	case *Distribution:
		.VisitDistributionValue()
	case *Summary:
		.VisitSummaryValue()
	default:
		panic("unexpected value type")
	}
}
Distribution contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets.
Count is the number of values in the population. Must be non-negative. This value must equal the sum of the values in bucket_counts if a histogram is provided.
Sum is the sum of the values in the population. If count is zero then this field must be zero.
SumOfSquaredDeviation is the sum of squared deviations from the mean of the values in the population. For values x_i this is: Sum[i=1..n]((x_i - mean)^2) Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition describes Welford's method for accumulating this sum in one pass. If count is zero then this field must be zero.
BucketOptions describes the bounds of the histogram buckets in this distribution. A Distribution may optionally contain a histogram of the values in the population. If nil, there is no associated histogram.
Bucket If the distribution does not have a histogram, then omit this field. If there is a histogram, then the sum of the values in the Bucket counts must equal the value in the count field of the distribution.
BucketOptions describes the bounds of the histogram buckets in this distribution.
Bounds specifies a set of bucket upper bounds. This defines len(bounds) + 1 (= N) buckets. The boundaries for bucket index i are: [0, Bounds[i]) for i == 0 [Bounds[i-1], Bounds[i]) for 0 < i < N-1 [Bounds[i-1], +infinity) for i == N-1
Bucket represents a single bucket (value range) in a distribution.
Count is the number of values in each bucket of the histogram, as described in bucket_bounds.
Exemplar associated with this bucket (if any).
Summary is a representation of percentiles.
Count is the cumulative count (if available).
Sum is the cumulative sum of values (if available).
HasCountAndSum is true if Count and Sum are available.
Snapshot represents percentiles calculated over an arbitrary time window. The values in this struct can be reset at arbitrary unknown times, with the requirement that all of them are reset at the same time.
Snapshot represents percentiles over an arbitrary time. The values in this struct can be reset at arbitrary unknown times, with the requirement that all of them are reset at the same time.
Count is the number of values in the snapshot. Optional since some systems don't expose this. Set to 0 if not available.
Sum is the sum of values in the snapshot. Optional since some systems don't expose this. If count is 0 then this field must be zero.
Percentiles is a map from percentile (range (0-100.0]) to the value of the percentile.
go:generate stringer -type Type
Type is the overall type of metric, including its value type and whether it represents a cumulative total (since the start time) or if it represents a gauge value.
type Type int