/// <summary> /// Create a new performance counter metric object from the provided raw data packet /// </summary> /// <remarks>The new metric will automatically be added to the metric definition's metrics collection.</remarks> /// <param name="definition">The object that defines this metric</param> /// <param name="packet">The raw data packet</param> internal PerfCounterMetric(PerfCounterMetricDefinition definition, PerfCounterMetricPacket packet) : base(definition, packet) { m_InstanceAlias = PerfCounterInstanceAlias.None; m_PollingState = PerfCounterPollingState.Inactive; }
/// <summary> /// Create a new performance counter metric object from the provided windows performance counter /// </summary> /// <remarks>The new metric will automatically be added to the metric definition's metrics collection.</remarks> /// <param name="definition">The metric definition for the provided windows performance counter</param> /// <param name="counter">The windows performance counter to add as a metric</param> /// <param name="alias">An alias to use to determine the instance name instead of the instance of the supplied counter.</param> public PerfCounterMetric(PerfCounterMetricDefinition definition, PerformanceCounter counter, PerfCounterInstanceAlias alias) : base(definition, new PerfCounterMetricPacket(definition.Packet, counter)) { m_InstanceAlias = alias; m_PollingState = PerfCounterPollingState.Inactive; }