IncrementingEventCounter 類別

定義

為不斷增加之變數 (例如執行階段中的例外狀況數) 提供 EventCounter 的變化。

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

備註

IncrementingEventCounter 用於追蹤一律增加的值,例如要求總數、擲回的例外狀況總數等等。針對這類計量,只要報告總值並不一定適合用來監視其健康情況。 例如,追蹤整個程式期間已配置多少個位元組,對於診斷配置太多記憶體的任何潛在問題並不實用。 可協助我們的計量是在過去一分鐘、小時或一些任意時間間隔中配置多少個位元組,而不是整個程式的持續時間。 IncrementingEventCounter 可用來追蹤和報告計量取用者所指定時間間隔的增量。

IncrementingEventCounter 不會計算平均值或標準差之類的統計資料,因為它只會追蹤一段時間內的增量。

建構函式

IncrementingEventCounter(String, EventSource)

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

屬性

DisplayName

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

(繼承來源 DiagnosticCounter)
DisplayRateTimeScale

取得或設定應顯示此計量的速率。

DisplayUnits

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

(繼承來源 DiagnosticCounter)
EventSource

取得此計數器所附加的 EventSource。

(繼承來源 DiagnosticCounter)
Name

取得此計數器的名稱。

(繼承來源 DiagnosticCounter)

方法

AddMetadata(String, String)

將索引鍵/值中繼資料新增至將作為承載一部分的計數器。

(繼承來源 DiagnosticCounter)
Dispose()

EventSource 報告的集合中移除計數器。

(繼承來源 DiagnosticCounter)
Equals(Object)

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

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
Increment(Double)

將值新增到計數器在下一次計時器間隔期間將發佈的總數。

MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回目前遞增事件計數器執行個體的字串表示。

適用於

另請參閱