語言

Meter.CreateCounter 方法

定義

多載

名稱 Description
CreateCounter<T>(String, String, String)

建立一個指標 Counter 物件。

CreateCounter<T>(String, String, String, IEnumerable<KeyValuePair<String,Object>>)

建立一個指標計數器物件。

CreateCounter<T>(String, String, String)

來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs

建立一個指標 Counter 物件。

public System.Diagnostics.Metrics.Counter<T> CreateCounter<T>(string name, string? unit = default, string? description = default) where T : struct;
member this.CreateCounter : string * string * string -> System.Diagnostics.Metrics.Counter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateCounter(Of T As Structure) (name As String, Optional unit As String = Nothing, Optional description As String = Nothing) As Counter(Of T)

類型參數

T

測量的數字類型。

參數

name
String

樂器名稱。 不可以是 null。

unit
String

可選的儀器計量單位。

description
String

可選的儀器說明。

傳回

一個新的櫃檯。

備註

計數器是一種支持非負增量的工具。 反擊器的範例用途:

  • 計算接收到的位元組數。
  • 計算完成的請求數量。
  • 計算建立的帳號數量。
  • 數數檢查點的數量。
  • 計算 HTTP 5xx 錯誤的數量。

適用於

CreateCounter<T>(String, String, String, IEnumerable<KeyValuePair<String,Object>>)

來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs
來源:
Meter.cs

建立一個指標計數器物件。

public:
generic <typename T>
 where T : value class System::Diagnostics::Metrics::Counter<T> ^ CreateCounter(System::String ^ name, System::String ^ unit, System::String ^ description, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ tags);
public System.Diagnostics.Metrics.Counter<T> CreateCounter<T>(string name, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>> tags) where T : struct;
public System.Diagnostics.Metrics.Counter<T> CreateCounter<T>(string name, string? unit, string? description, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object?>>? tags) where T : struct;
member this.CreateCounter : string * string * string * seq<System.Collections.Generic.KeyValuePair<string, obj>> -> System.Diagnostics.Metrics.Counter<'T (requires 'T : struct)> (requires 'T : struct)
Public Function CreateCounter(Of T As Structure) (name As String, unit As String, description As String, tags As IEnumerable(Of KeyValuePair(Of String, Object))) As Counter(Of T)

類型參數

T

測量的數字類型。

參數

name
String

樂器名稱。 它不能 null。

unit
String

可選的儀器計量單位。

description
String

可選的樂器說明。

tags
IEnumerable<KeyValuePair<String,Object>>

標籤要貼在櫃檯上。

傳回

一個新的櫃檯。

備註

計數器是一種支持非負增量的工具。

反擊器的範例用途:

  • 計算接收到的位元組數。
  • 計算完成的請求數量。
  • 計算建立的帳號數量。
  • 數數檢查點的數量。
  • 計算 HTTP 5xx 錯誤的數量。

適用於