
Sampled Metrics are designed to record a single, summarized value on a periodic basis. Whenever a sample is recorded, the value is presumed to remain constant until the next sample is recorded. This works best when the data for each individual event is either unavailable or would be to inefficient to collect. To do this, the application has to do some degree of calculation or aggregation on its own and the useful trends have to be determined during development.
Windows Performance Counters are collected as Sampled metrics. Processor Utilization represents a good example of a sampled metric - It would be infeasible to record each time the processor was used for a task, and the underlying data isn't available.
For more information on how to take advantage of Sampled Metrics, see Developer's Reference - Metrics - Designing Sampled Metrics.
Event Metrics
An alternative to Sampled Metrics are Event Metrics. These offer more analysis options and can be much easier to record, particularly in multithreaded or stateless scenarios. For more information on the difference between Sampled and Event Metrics, see Developer's Reference - Metrics - Sampled and Event Metrics. For more information on Event Metrics, see EventMetric Class.
Viewing Metrics
Metrics are visible in the Session Viewer of Loupe Desktop. Metrics are not displayed in the Loupe Live Viewer.
System.Object
Gibraltar.Agent.Metrics.SampledMetric
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
SampledMetric Members
Gibraltar.Agent.Metrics Namespace
Metrics - Designing Sampled Metrics
Metrics - Sampled and Event Metrics