Skip to content

Commit 1f2eb3d

Browse files
author
Jill Grant
authored
Merge pull request #13311 from Mikejo5000/mikejo-br24
Add content for .NET Meters histogram tool
2 parents b1e4570 + bad84ad commit 1f2eb3d

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

docs/profiling/dotnet-counters-tool.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Visualize dotnet counters"
33
description: Use the .NET Counters tool in the Visual Studio Performance Profiler to visualize dotnet counters over time and better understand your data.
4-
ms.date: "12/7/2020"
4+
ms.date: "11/05/2024"
55
ms.topic: "conceptual"
66
helpviewer_keywords:
77
- "dotnet, counters, profiling"
@@ -61,6 +61,30 @@ You can also view graphs in the detailed report by selecting the checkboxes next
6161

6262
The table updates to relevant values for the time selected in the graphs. Use the **Clear Selection** button to reset the selected time range to the entire trace.
6363

64+
::: moniker range=">=vs-2022"
65+
## View .NET Meter counter data
66+
67+
Starting in Visual Studio 2022 version 17.8, .NET Counters tool supports integration with the .NET <xref:System.Diagnostics.Metrics.Meter> API, adding support for instrument options such as `Counter` and `ObservableCounter`.
68+
69+
The `Counter` keeps track of a value changing over time, with the caller reporting updates using `Counter.Add`. In contrast, `ObservableCounter` is similar to `Counter`, but the caller takes care of keeping track of the total value. The .NET Counters tool reports the rate of change in the total.
70+
71+
For more information, see [Creating Metrics](/dotnet/core/diagnostics/metrics-instrumentation).
72+
73+
## View .NET Meter histogram data
74+
75+
Starting in Visual Studio 2022 version 17.12 Preview 2, .NET Counters tool supports .NET <xref:System.Diagnostics.Metrics.Meter> Histogram integration.
76+
77+
The .NET Meter Histogram allows you to identify and analyze histogram data generated by .NET histogram instruments, recorded using `CreateHistogram`. When recording data using the histogram instrument, results are visualized, providing a clear representation of data distribution.
78+
79+
Live histogram data is shown with the rest of the counters, under the name of the Meter instance.
80+
81+
To open the histogram graph, select the instrument name for the Meter instance, as shown here.
82+
83+
:::image type="content" source="../profiling/media/vs-2022/dotnet-counters-meter-histogram.gif" alt-text=".NET Counters meter histogram data.":::
84+
85+
In the preceding example, the tool shows data for the 50th, 90th, and 95th percentiles of the recorded measurements.
86+
::: moniker-end
87+
6488
## Related content
6589

6690
- [Optimizing Profiler settings](../profiling/optimize-profiler-settings.md)
356 KB
Loading

0 commit comments

Comments
 (0)