How to program PerformanceCounter log

I understand that with the help Perfmon.mscyou can create your own performance counter and using the counter log, you can write the counter value to a text file.

I also understand that I can also use this programmatically by creating a performance counter, using System.Diagnostics.PerformanceCounterand getting the value of the counter using the NextValue()method. Is there a programmatic way to tell an object PerformanceCounterto write a log to a text file too (similar to a counter counter Perfmon.msc)?

+5
source share
2 answers

P/Invoke, , . logman System.Diagnostics.Process.Start()

+2

.NET . , Win32 API , , . API . . p/invoke API.

+4

All Articles