Class: Google::Apis::ServicecontrolV1::Distribution
- Inherits:
-
Object
- Object
- Google::Apis::ServicecontrolV1::Distribution
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/servicecontrol_v1/classes.rb,
generated/google/apis/servicecontrol_v1/representations.rb,
generated/google/apis/servicecontrol_v1/representations.rb
Overview
Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information:
- the arithmetic mean of the samples
- the minimum and maximum of the samples
- the sum-squared-deviation of the samples, used to compute variance
- a histogram of the values of the sample points
Instance Attribute Summary collapse
-
#bucket_counts ⇒ Array<Fixnum>
The number of samples in each histogram bucket.
-
#count ⇒ Fixnum
The total number of samples in the distribution.
-
#explicit_buckets ⇒ Google::Apis::ServicecontrolV1::ExplicitBuckets
Describing buckets with arbitrary user-provided width.
-
#exponential_buckets ⇒ Google::Apis::ServicecontrolV1::ExponentialBuckets
Describing buckets with exponentially growing width.
-
#linear_buckets ⇒ Google::Apis::ServicecontrolV1::LinearBuckets
Describing buckets with constant width.
-
#maximum ⇒ Float
The maximum of the population of values.
-
#mean ⇒ Float
The arithmetic mean of the samples in the distribution.
-
#minimum ⇒ Float
The minimum of the population of values.
-
#sum_of_squared_deviation ⇒ Float
The sum of squared deviations from the mean: Sumi=1..count where each x_i is a sample values.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Distribution
constructor
A new instance of Distribution.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Distribution
Returns a new instance of Distribution
1440 1441 1442 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1440 def initialize(**args) update!(**args) end |
Instance Attribute Details
#bucket_counts ⇒ Array<Fixnum>
The number of samples in each histogram bucket. bucket_counts
are
optional. If present, they must sum to the count
value.
The buckets are defined below in bucket_option
. There are N buckets.
bucket_counts[0]
is the number of samples in the underflow bucket.
bucket_counts[1]
to bucket_counts[N-1]
are the numbers of samples
in each of the finite buckets. And bucket_counts[N] is the number
of samples in the overflow bucket. See the comments of
bucket_option
below for more details.
Any suffix of trailing zeros may be omitted.
Corresponds to the JSON property
bucketCounts`
1415 1416 1417 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1415 def bucket_counts @bucket_counts end |
#count ⇒ Fixnum
The total number of samples in the distribution. Must be >= 0.
Corresponds to the JSON property count
1402 1403 1404 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1402 def count @count end |
#explicit_buckets ⇒ Google::Apis::ServicecontrolV1::ExplicitBuckets
Describing buckets with arbitrary user-provided width.
Corresponds to the JSON property explicitBuckets
1420 1421 1422 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1420 def explicit_buckets @explicit_buckets end |
#exponential_buckets ⇒ Google::Apis::ServicecontrolV1::ExponentialBuckets
Describing buckets with exponentially growing width.
Corresponds to the JSON property exponentialBuckets
1438 1439 1440 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1438 def exponential_buckets @exponential_buckets end |
#linear_buckets ⇒ Google::Apis::ServicecontrolV1::LinearBuckets
Describing buckets with constant width.
Corresponds to the JSON property linearBuckets
1386 1387 1388 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1386 def linear_buckets @linear_buckets end |
#maximum ⇒ Float
The maximum of the population of values. Ignored if count
is zero.
Corresponds to the JSON property maximum
1425 1426 1427 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1425 def maximum @maximum end |
#mean ⇒ Float
The arithmetic mean of the samples in the distribution. If count
is
zero then this field must be zero.
Corresponds to the JSON property mean
1397 1398 1399 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1397 def mean @mean end |
#minimum ⇒ Float
The minimum of the population of values. Ignored if count
is zero.
Corresponds to the JSON property minimum
1391 1392 1393 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1391 def minimum @minimum end |
#sum_of_squared_deviation ⇒ Float
The sum of squared deviations from the mean:
Sumi=1..count
where each x_i is a sample values. If count
is zero then this field
must be zero, otherwise validation of the request fails.
Corresponds to the JSON property sumOfSquaredDeviation
1433 1434 1435 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1433 def sum_of_squared_deviation @sum_of_squared_deviation end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 |
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1445 def update!(**args) @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets) @minimum = args[:minimum] if args.key?(:minimum) @mean = args[:mean] if args.key?(:mean) @count = args[:count] if args.key?(:count) @bucket_counts = args[:bucket_counts] if args.key?(:bucket_counts) @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets) @maximum = args[:maximum] if args.key?(:maximum) @sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation) @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets) end |