Прочетете на английски Редактиране

Споделяне чрез


EventCounter.WriteMetric Method

Definition

Overloads

WriteMetric(Double)

Writes the metric if performance counters are on.

WriteMetric(Single)

Writes the metric if performance counters are on.

WriteMetric(Double)

Source:
EventCounter.cs
Source:
EventCounter.cs
Source:
EventCounter.cs

Writes the metric if performance counters are on.

C#
public void WriteMetric(double value);

Parameters

value
Double

The value to be written.

Remarks

For an example of how to use the WriteMetric(Single) method, see Introduction Tutorial: How to measure performance for very frequent events using EventCounters.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.1

WriteMetric(Single)

Source:
EventCounter.cs
Source:
EventCounter.cs
Source:
EventCounter.cs

Writes the metric if performance counters are on.

C#
public void WriteMetric(float value);

Parameters

value
Single

The value to be written.

Remarks

For an example of how to use the WriteMetric(Single) method, see the Introduction Tutorial: How to measure performance for very frequent events using EventCounters topic.

Applies to

.NET 10 и други версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.5, 1.6, 2.0, 2.1