Distribution

Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

trait Bucket

Describes a single bucket within a distribution.

Describes a single bucket within a distribution.

Indicates the value below which a given percentage (or rank) of the entire distribution are.

Indicates the value below which a given percentage (or rank) of the entire distribution are.

Value members

Concrete methods

Tries to convert a distribution to the provided unit. Take into account that since Distributions are based on buckets with integer boundaries, converting from greater to lower magnitudes (e.g. from seconds to milliseconds) will always preserve precision, but the same is not true when converting the way around (e.g. from milliseconds to seconds) since the conversion could produce floating point result like which will always be rounded to the nearest integer equal or greater than 1. For example, when converting a value of 3500 milliseconds to seconds, the converted value of 3.2 seconds will be rounded down to 3 seconds and when converting a value of 300 milliseconds to seconds, it will be rounded up to 1 (the smallest possible value in a histogram).

Tries to convert a distribution to the provided unit. Take into account that since Distributions are based on buckets with integer boundaries, converting from greater to lower magnitudes (e.g. from seconds to milliseconds) will always preserve precision, but the same is not true when converting the way around (e.g. from milliseconds to seconds) since the conversion could produce floating point result like which will always be rounded to the nearest integer equal or greater than 1. For example, when converting a value of 3500 milliseconds to seconds, the converted value of 3.2 seconds will be rounded down to 3 seconds and when converting a value of 300 milliseconds to seconds, it will be rounded up to 1 (the smallest possible value in a histogram).

If the distribution and target unit dimensions are not the same then a warning will be logged and the distribution will be returned unchanged.

def convert(distribution: Distribution, unit: MeasurementUnit, toUnit: MeasurementUnit, toDynamicRange: DynamicRange): Distribution

Tries to convert the a distribution to the provided unit and dynamic range. Take into account that since Distributions are based on buckets with integer boundaries, converting from greater to lower magnitudes (e.g. from seconds to milliseconds) will always preserve precision, but the same is not true when converting the way around (e.g. from milliseconds to seconds) since the conversion could produce floating point result like which will always be rounded to the nearest integer equal or greater than 1. For example, when converting a value of 3500 milliseconds to seconds, the converted value of 3.2 seconds will be rounded down to 3 seconds and when converting a value of 300 milliseconds to seconds, it will be rounded up to 1 (the smallest possible value in a histogram).

Tries to convert the a distribution to the provided unit and dynamic range. Take into account that since Distributions are based on buckets with integer boundaries, converting from greater to lower magnitudes (e.g. from seconds to milliseconds) will always preserve precision, but the same is not true when converting the way around (e.g. from milliseconds to seconds) since the conversion could produce floating point result like which will always be rounded to the nearest integer equal or greater than 1. For example, when converting a value of 3500 milliseconds to seconds, the converted value of 3.2 seconds will be rounded down to 3 seconds and when converting a value of 300 milliseconds to seconds, it will be rounded up to 1 (the smallest possible value in a histogram).

If the distribution and target unit dimensions are not the same then a warning will be logged and the distribution will be returned unchanged.

Merges two distributions into a new one, which includes the values from both distributions. The resulting distribution will always have the dynamic range of the "left" distribution.

Merges two distributions into a new one, which includes the values from both distributions. The resulting distribution will always have the dynamic range of the "left" distribution.

def merge(left: Distribution, right: Distribution, dynamicRange: DynamicRange): Distribution

Merges two distributions into a new one, which includes the values from both distributions, adjusting the values to the provided dynamic range if necessary.

Merges two distributions into a new one, which includes the values from both distributions, adjusting the values to the provided dynamic range if necessary.