EventCounter 類別

定義

提供收集班 EventSource 級中非常頻繁事件統計數據的能力。

public ref class EventCounter : System::Diagnostics::Tracing::DiagnosticCounter
public ref class EventCounter
public ref class EventCounter : IDisposable
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public class EventCounter : System.Diagnostics.Tracing.DiagnosticCounter
public class EventCounter : System.Diagnostics.Tracing.DiagnosticCounter
public class EventCounter
public class EventCounter : IDisposable
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
type EventCounter = class
    inherit DiagnosticCounter
type EventCounter = class
    inherit DiagnosticCounter
type EventCounter = class
type EventCounter = class
    interface IDisposable
Public Class EventCounter
Inherits DiagnosticCounter
Public Class EventCounter
Public Class EventCounter
Implements IDisposable
繼承
EventCounter
繼承
EventCounter
屬性
實作

備註

關於如何使用這個 EventCounter 類別的範例,請參考 入門教學:如何用事件計數器衡量非常頻繁事件的效能

建構函式

名稱 Description
EventCounter(String, EventSource)

初始化 EventCounter 類別的新執行個體。

屬性

名稱 Description
DisplayName

取得或設定計數器的顯示名稱。

(繼承來源 DiagnosticCounter)
DisplayUnits

取得或設定計數器的顯示單元。

(繼承來源 DiagnosticCounter)
EventSource

取得這個計數器所附帶的事件源。

(繼承來源 DiagnosticCounter)
Name

知道這個櫃檯的名字。

(繼承來源 DiagnosticCounter)

方法

名稱 Description
AddMetadata(String, String)

將鍵值元資料加入計數器,作為有效載荷的一部分。

(繼承來源 DiagnosticCounter)
Dispose()

移除該指示物,從該集合中移除該 EventSource 計算物。

Dispose()

移除該指示物,從該集合中移除該 EventSource 計算物。

(繼承來源 DiagnosticCounter)
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetType()

取得目前實例的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
ToString()

回傳當前事件計數器實例的字串表示。

ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)
WriteMetric(Double)

如果效能計數器開啟,它會寫入指標。

WriteMetric(Single)

如果效能計數器開啟,它會寫入指標。

適用於

另請參閱