Loupe - Log - Monitor - Resolve
Gibraltar.Agent.Metrics Namespace / SampledMetric Class / SamplingType Property

In This Topic
    SamplingType Property (SampledMetric)
    In This Topic
    The intended method of interpreting the sampled counter value.
    Syntax
    'Declaration
     
    
    Public ReadOnly Property SamplingType As SamplingType
    public SamplingType SamplingType {get;}
    Remarks

    Depending on how your application can conveniently aggregate data, select the matching sampling type. For example, consider a metric designed to record disk utilization in bytes / second. This can be done by:

    1. Recording with each sample the total number of bytes written from the start of the process to the current point. This would use the Total Count Sampling Type.
    2. Recording with each sample the number of bytes written since the last sample. This would use the IncrementalCount Sampling Type.
    3. Recording with each sample the bytes per second since the last sample. This would use the RawCount Sampling Type.

    Fraction Sampling Formats

    When you want to record a metric that represents a percentage, such as percent utilization, it's often easiest to record the individual metric samples with both parts of the fraction used to derive the percentage. For example, consider a metric designed to record percent disk utilization (as a percentage of working time). This can be done by:

    1. Recording with each sample the total number of ticks spent writing to disk as the value and the total number of ticks spent servicing requests as the base value. This would use the TotalFraction Sampling Type.
    2. Recording with each sample the number of ticks spent writing to disk since the last sample as the value and the number of ticks spent servicing client requests since the last sample as the base value. This would use the IncrementalFraction Sampling Type.
    3. Recording with each sample the number of ticks spent writing per second as the value and the number of ticks spent servicing client requests per second as the base value. This would use the RawFraction Sampling Type.

    The advantage of the fractional sampling types over simply doing the division yourself is primarily the additional safety aspects built into Loupe (such as division by zero protection) and automatic, accurate extrapolation to different sampling intervals (such as when samples are recorded once per second but you want to view them on a longer interval)

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also