public final class WindowsPerformanceCounterAsMetric extends AbstractWindowsPerformanceCounter
MetricTelemetry
Created by gupele on 3/30/2015.| Constructor and Description |
|---|
WindowsPerformanceCounterAsMetric(java.lang.Iterable<WindowsPerformanceCounterData> pcsData)
Registers the argument's data into performance counters.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getId() |
void |
report(TelemetryClient telemetryClient)
Go through the data that we have and ask for each key its value, and then send using the requested display name.
|
protected void |
send(TelemetryClient telemetryClient,
double value,
java.lang.String key) |
reportErrorpublic WindowsPerformanceCounterAsMetric(java.lang.Iterable<WindowsPerformanceCounterData> pcsData) throws java.lang.Throwable
pcsData - The performance counters to register for Windows OS.java.lang.Throwable - The constructor might throw an Error if the JniPCConnector is not able to properly
connect to the native code. or Exception if the constructor is not called under Windows OS.public java.lang.String getId()
public void report(TelemetryClient telemetryClient)
telemetryClient - The TelemetryClient to use for sendingprotected void send(TelemetryClient telemetryClient, double value, java.lang.String key)