Search code examples
nlogperformancecounter

What is the purpose of PerfCounter target in NLog


The documentation is quite terse. Is the purpose to benchmark the logging itself, or to benchmark my code? Do I need to put the PERF target inside another target? Or it is the other way around? Can someone give an example of how I should use it?


Solution

  • Never tried using it myself, but I can see there are two options in NLog for dealing with Windows Performance Counters:

    Have updated the PerfCounter-Target-Wiki about using install to create the performance counter. Found some example code here: PerformanceCounterTarget Class

    Here is someone that actually have used the PerCounter-Target: Performance Counters with NLog