https://github.com/nlog/nlog.performancecounter
NLog extensions for displaying and updating Windows Performance Counters
https://github.com/nlog/nlog.performancecounter
csharp dotnet nlog nlog-target performancecounter
Last synced: about 2 months ago
JSON representation
NLog extensions for displaying and updating Windows Performance Counters
- Host: GitHub
- URL: https://github.com/nlog/nlog.performancecounter
- Owner: NLog
- License: bsd-3-clause
- Created: 2022-06-05T10:52:42.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-09-21T16:32:29.000Z (9 months ago)
- Last Synced: 2025-09-21T17:26:11.832Z (9 months ago)
- Topics: csharp, dotnet, nlog, nlog-target, performancecounter
- Language: C#
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NLog.PerformanceCounter
NLog extensions to [Display Windows Performance Counters](https://github.com/NLog/NLog/wiki/PerformanceCounter-Layout-Renderer) and [Update Windows Performance Counters](https://github.com/NLog/NLog/wiki/PerfCounter-target)
[](https://www.nuget.org/packages/NLog.PerformanceCounter)
[](https://ci.appveyor.com/project/nlog/NLog-PerformanceCounter/branch/master)
### How to install
1) Install the package
`Install-Package NLog.PerformanceCounter` or in your csproj:
```xml
```
2) Add to your nlog.config:
```xml
```
Alternative register from code using [fluent configuration API](https://github.com/NLog/NLog/wiki/Fluent-Configuration-API):
```csharp
LogManager.Setup().SetupExtensions(ext => {
ext.RegisterTarget();
ext.RegisterLayoutRenderer();
});
```
### Example of displaying PerformanceCounter
Example of `NLog.config`-file that displays Windows Performance Counter value:
```xml
```
### Example of updating PerformanceCounter
Example of `NLog.config`-file that updates Windows Performance Counter value:
```xml
```