public final class Distributions
extends java.lang.Object
Distribution instances.| Modifier and Type | Method and Description |
|---|---|
static com.google.api.servicecontrol.v1.Distribution |
addSample(double value,
com.google.api.servicecontrol.v1.Distribution distribution)
Updates as new distribution that contains value added to an existing one.
|
static com.google.api.servicecontrol.v1.Distribution |
createExplicit(double[] bounds)
Creates a
Distribution with ExplicitBuckets. |
static com.google.api.servicecontrol.v1.Distribution |
createExponential(int numFiniteBuckets,
double growthFactor,
double scale)
Creates an
Distribution with ExponentialBuckets. |
static com.google.api.servicecontrol.v1.Distribution |
createLinear(int numFiniteBuckets,
double width,
double offset)
Creates a
Distribution with LinearBuckets. |
static com.google.api.servicecontrol.v1.Distribution |
merge(com.google.api.servicecontrol.v1.Distribution prior,
com.google.api.servicecontrol.v1.Distribution latest)
Merge
prior with latest. |
public static com.google.api.servicecontrol.v1.Distribution createExponential(int numFiniteBuckets,
double growthFactor,
double scale)
Distribution with ExponentialBuckets.numFiniteBuckets - initializes the number of finite bucketsgrowthFactor - initializes the growth factorscale - initializes the scaleDistribution with ExponentialBucketsjava.lang.IllegalArgumentException - if a bad input prevents creation.public static com.google.api.servicecontrol.v1.Distribution createLinear(int numFiniteBuckets,
double width,
double offset)
Distribution with LinearBuckets.numFiniteBuckets - initializes the number of finite bucketswidth - initializes the width of each bucketoffset - initializes the offset of the start bucketDistribution with LinearBucketsjava.lang.IllegalArgumentException - if a bad input prevents creation.public static com.google.api.servicecontrol.v1.Distribution createExplicit(double[] bounds)
Distribution with ExplicitBuckets.bounds - initializes the bounds used to define the explicit bucketsDistribution with ExplicitBucketsjava.lang.IllegalArgumentException - if a bad input prevents creation.public static com.google.api.servicecontrol.v1.Distribution addSample(double value,
com.google.api.servicecontrol.v1.Distribution distribution)
value - the sample valuedistribution - a Distributionpublic static com.google.api.servicecontrol.v1.Distribution merge(com.google.api.servicecontrol.v1.Distribution prior,
com.google.api.servicecontrol.v1.Distribution latest)
prior with latest.prior - a Distribution instancelatest - a Distribution, expected to be a later version of priorDistribution that combines the statistics and buckets of the earlier twojava.lang.IllegalArgumentException - if the bucket options of prior and latest
don't matchjava.lang.IllegalArgumentException - if the bucket counts of prior and latest dont'
match