public sealed class Distribution : IMessage<Distribution>, IEquatable<Distribution>, IDeepCloneable<Distribution>, IBufferMessage, IMessage
Reference documentation and code samples for the Service Control v1 API class Distribution.
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
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 ofbucket_option`
below for more details.
The sum of squared deviations from the mean:
Sum[i=1..count]((x_i - mean)^2)
where each x_i is a sample values. If count is zero then this field
must be zero, otherwise validation of the request fails.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eDistribution\u003c/code\u003e class within the Service Control v1 API is 2.4.0, representing a frequency distribution of double-valued sample points.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDistribution\u003c/code\u003e class, inheriting from \u003ccode\u003eobject\u003c/code\u003e, implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and is found within the \u003ccode\u003eGoogle.Cloud.ServiceControl.V1\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDistribution\u003c/code\u003e objects track several metrics, including the total sample count, mean, minimum, maximum, and the sum of squared deviations, along with optionally keeping track of samples within histogram buckets.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides properties such as \u003ccode\u003eBucketCounts\u003c/code\u003e, \u003ccode\u003eExemplars\u003c/code\u003e, and different bucket types (\u003ccode\u003eExplicitBuckets\u003c/code\u003e, \u003ccode\u003eExponentialBuckets\u003c/code\u003e, \u003ccode\u003eLinearBuckets\u003c/code\u003e) to manage and analyze the distribution of samples.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple versions of the Distribution Class available for reference between 1.0.0 and 2.4.0.\u003c/p\u003e\n"]]],[],null,["# Service Control v1 API - Class Distribution (2.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.4.0 (latest)](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/latest/Google.Cloud.ServiceControl.V1.Distribution)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/2.3.0/Google.Cloud.ServiceControl.V1.Distribution)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/2.2.0/Google.Cloud.ServiceControl.V1.Distribution)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/2.1.0/Google.Cloud.ServiceControl.V1.Distribution)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/2.0.0/Google.Cloud.ServiceControl.V1.Distribution)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/1.4.0/Google.Cloud.ServiceControl.V1.Distribution)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/1.3.0/Google.Cloud.ServiceControl.V1.Distribution)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/1.2.0/Google.Cloud.ServiceControl.V1.Distribution)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/1.1.0/Google.Cloud.ServiceControl.V1.Distribution)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/1.0.0/Google.Cloud.ServiceControl.V1.Distribution) \n\n public sealed class Distribution : IMessage\u003cDistribution\u003e, IEquatable\u003cDistribution\u003e, IDeepCloneable\u003cDistribution\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Service Control v1 API class Distribution.\n\nDistribution represents a frequency distribution of double-valued sample\npoints. It contains the size of the population of sample points plus\nadditional optional information:\n\n- the arithmetic mean of the samples\n- the minimum and maximum of the samples\n- the sum-squared-deviation of the samples, used to compute variance\n- a histogram of the values of the sample points \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Distribution \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Distribution](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/latest/Google.Cloud.ServiceControl.V1.Distribution), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Distribution](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/latest/Google.Cloud.ServiceControl.V1.Distribution), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Distribution](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/latest/Google.Cloud.ServiceControl.V1.Distribution), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.ServiceControl.V1](/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/latest/Google.Cloud.ServiceControl.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.ServiceControl.V1.dll\n\nConstructors\n------------\n\n### Distribution()\n\n public Distribution()\n\n### Distribution(Distribution)\n\n public Distribution(Distribution other)\n\nProperties\n----------\n\n### BucketCounts\n\n public RepeatedField\u003clong\u003e BucketCounts { get; }\n\nThe number of samples in each histogram bucket. `bucket_counts` are\noptional. If present, they must sum to the `count` value.\n\nThe buckets are defined below in `bucket_option`. There are N buckets.\n`bucket_counts[0]` is the number of samples in the underflow bucket.\n`bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples\nin each of the finite buckets. And `bucket_counts[N] is the number\nof samples in the overflow bucket. See the comments of`bucket_option\\`\nbelow for more details.\n\nAny suffix of trailing zeros may be omitted.\n\n### BucketOptionCase\n\n public Distribution.BucketOptionOneofCase BucketOptionCase { get; }\n\n### Count\n\n public long Count { get; set; }\n\nThe total number of samples in the distribution. Must be \\\u003e= 0.\n\n### Exemplars\n\n public RepeatedField\u003cDistribution.Types.Exemplar\u003e Exemplars { get; }\n\nExample points. Must be in increasing order of `value` field.\n\n### ExplicitBuckets\n\n public Distribution.Types.ExplicitBuckets ExplicitBuckets { get; set; }\n\nBuckets with arbitrary user-provided width.\n\n### ExponentialBuckets\n\n public Distribution.Types.ExponentialBuckets ExponentialBuckets { get; set; }\n\nBuckets with exponentially growing width.\n\n### LinearBuckets\n\n public Distribution.Types.LinearBuckets LinearBuckets { get; set; }\n\nBuckets with constant width.\n\n### Maximum\n\n public double Maximum { get; set; }\n\nThe maximum of the population of values. Ignored if `count` is zero.\n\n### Mean\n\n public double Mean { get; set; }\n\nThe arithmetic mean of the samples in the distribution. If `count` is\nzero then this field must be zero.\n\n### Minimum\n\n public double Minimum { get; set; }\n\nThe minimum of the population of values. Ignored if `count` is zero.\n\n### SumOfSquaredDeviation\n\n public double SumOfSquaredDeviation { get; set; }\n\nThe sum of squared deviations from the mean:\nSum\\[i=1..count\\]((x_i - mean)\\^2)\nwhere each x_i is a sample values. If `count` is zero then this field\nmust be zero, otherwise validation of the request fails."]]