Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
9 contributors

Users who have contributed to this file

@TianqiZhang @mairaw @dend @yishengjin1413 @sywhang @VSC-Service-Account @gewarren @Jozkee @carlossanlop
234 lines (222 sloc) 11.9 KB
<Type Name="EventCounter" FullName="System.Diagnostics.Tracing.EventCounter">
<TypeSignature Language="C#" Value="public class EventCounter" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit EventCounter extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Diagnostics.Tracing.EventCounter" />
<TypeSignature Language="VB.NET" Value="Public Class EventCounter" />
<TypeSignature Language="C++ CLI" Value="public ref class EventCounter" />
<TypeSignature Language="F#" Value="type EventCounter = class" />
<AssemblyInfo>
<AssemblyName>System.Diagnostics.Tracing</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
<BaseTypeName FrameworkAlternate="netcore-3.0">System.Diagnostics.Tracing.DiagnosticCounter</BaseTypeName>
</Base>
<Interfaces>
</Interfaces>
<Attributes>
<Attribute FrameworkAlternate="netstandard-2.0">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides the ability to collect statistics for very frequent events through the <see cref="T:System.Diagnostics.Tracing.EventSource" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For an example of how to use the <xref:System.Diagnostics.Tracing.EventCounter> class, see [Introduction Tutorial: How to measure performance for very frequent events using EventCounters](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md).
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EventCounter (string name, System.Diagnostics.Tracing.EventSource eventSource);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string name, class System.Diagnostics.Tracing.EventSource eventSource) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Tracing.EventCounter.#ctor(System.String,System.Diagnostics.Tracing.EventSource)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; EventCounter(System::String ^ name, System::Diagnostics::Tracing::EventSource ^ eventSource);" />
<MemberSignature Language="F#" Value="new System.Diagnostics.Tracing.EventCounter : string * System.Diagnostics.Tracing.EventSource -&gt; System.Diagnostics.Tracing.EventCounter" Usage="new System.Diagnostics.Tracing.EventCounter (name, eventSource)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Diagnostics.Tracing</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="eventSource" Type="System.Diagnostics.Tracing.EventSource" />
</Parameters>
<Docs>
<param name="name">The event counter name.</param>
<param name="eventSource">The event source.</param>
<summary>Initializes a new instance of the <see cref="T:System.Diagnostics.Tracing.EventCounter" /> class.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="name" /> is <see langword="null" />.
-or-
<paramref name="eventSource" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Tracing.EventCounter.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Dispose();" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -&gt; unit&#xA;override this.Dispose : unit -&gt; unit" Usage="eventCounter.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Diagnostics.Tracing</AssemblyName>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Removes the counter from the set that the <see cref="T:System.Diagnostics.Tracing.EventSource" /> will report on.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
After being disposed, this counter will stop reporting values. If an <xref:System.Diagnostics.Tracing.EventCounter> is not explicitly disposed it will stop reporting automatically when the <xref:System.Diagnostics.Tracing.EventSource> it is attached to is disposed.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Tracing.EventCounter.ToString" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::String ^ ToString();" />
<MemberSignature Language="F#" Value="override this.ToString : unit -&gt; string" Usage="eventCounter.ToString " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Diagnostics.Tracing</AssemblyName>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a string representation of the current event counter instance.</summary>
<returns>The name, count and mean of the current event counter.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="WriteMetric">
<MemberSignature Language="C#" Value="public void WriteMetric (double value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void WriteMetric(float64 value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Tracing.EventCounter.WriteMetric(System.Double)" />
<MemberSignature Language="VB.NET" Value="Public Sub WriteMetric (value As Double)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void WriteMetric(double value);" />
<MemberSignature Language="F#" Value="member this.WriteMetric : double -&gt; unit" Usage="eventCounter.WriteMetric value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Diagnostics.Tracing</AssemblyName>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Double" Index="0" FrameworkAlternate="netcore-3.0;netstandard-2.1;netcore-3.1" />
</Parameters>
<Docs>
<param name="value">The value to be written.</param>
<summary>Writes the metric if performance counters are on.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For an example of how to use the <xref:System.Diagnostics.Tracing.EventCounter.WriteMetric(System.Single)> method, see [Introduction Tutorial: How to measure performance for very frequent events using EventCounters](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="WriteMetric">
<MemberSignature Language="C#" Value="public void WriteMetric (float value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void WriteMetric(float32 value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Diagnostics.Tracing.EventCounter.WriteMetric(System.Single)" />
<MemberSignature Language="VB.NET" Value="Public Sub WriteMetric (value As Single)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void WriteMetric(float value);" />
<MemberSignature Language="F#" Value="member this.WriteMetric : single -&gt; unit" Usage="eventCounter.WriteMetric value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Diagnostics.Tracing</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Single" />
</Parameters>
<Docs>
<param name="value">The value to be written.</param>
<summary>Writes the metric if performance counters are on.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For an example of how to use the <xref:System.Diagnostics.Tracing.EventCounter.WriteMetric(System.Single)> method, see the [Introduction Tutorial: How to measure performance for very frequent events using EventCounters](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md) topic.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.