• Home
Show / Hide Table of Contents

Class HystrixRollingPercentile

Inheritance
System.Object
HystrixRollingPercentile
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Hystrix.Dotnet
Assembly: Hystrix.Dotnet.dll
Syntax
public class HystrixRollingPercentile

Constructors

| Improve this Doc View Source

HystrixRollingPercentile(IDateTimeProvider, Int32, Int32, Int32, IHystrixConfigurationService)

Declaration
public HystrixRollingPercentile(IDateTimeProvider dateTimeProvider, int timeInMilliseconds, int numberOfBuckets, int bucketDataLength, IHystrixConfigurationService configurationService)
Parameters
Type Name Description
IDateTimeProvider dateTimeProvider
System.Int32 timeInMilliseconds
System.Int32 numberOfBuckets
System.Int32 bucketDataLength
IHystrixConfigurationService configurationService

Methods

| Improve this Doc View Source

AddValue(Int32[])

Add value (or values) to current bucket.

Declaration
public void AddValue(params int[] values)
Parameters
Type Name Description
System.Int32[] values

Value to be stored in current bucket such as execution latency in milliseconds.

| Improve this Doc View Source

GetMean()

This returns the mean (average) of all values in the current snapshot. This is not a percentile but often desired so captured and exposed here.

Declaration
public int GetMean()
Returns
Type Description
System.Int32

Mean of all values.

| Improve this Doc View Source

GetPercentile(Double)

Compute a percentile from the underlying rolling buckets of values. For performance reasons it maintains a single snapshot of the sorted values from all buckets that is re-generated each time the bucket rotates. This means that if a bucket is 5000ms, then this method will re-compute a percentile at most once every 5000ms.

Declaration
public int GetPercentile(double percentile)
Parameters
Type Name Description
System.Double percentile

Value such as 99 (99th percentile), 99.5 (99.5th percentile), 50 (median, 50th percentile) to compute and retrieve percentile from rolling buckets.

Returns
Type Description
System.Int32

The percentile value.

| Improve this Doc View Source

Reset()

Force a reset so that percentiles start being gathered from scratch.

Declaration
public void Reset()
  • Improve this Doc
  • View Source
Back to top Licensed under MIT by Travix International.
Generated by DocFX.