Open neilfromcork opened 1 year ago
Performance count example: https://stackoverflow.com/questions/62945915/asp-net-core-linux-get-cpu-usage
Performance counters with bespoke counters tutorial: https://www.youtube.com/watch?v=SqxvleC0L4g
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/event-counter-perf
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/metrics
https://www.meziantou.net/getting-telemetry-data-from-inside-or-outside-a-dotnet-application.htm
Use System.Diagnostics to get current processor time: https://stackoverflow.com/questions/54178660/how-to-get-cpu-usage-and-virtual-memory-for-a-process-in-net-core
Get Memory usage: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.workingset64?view=net-7.0
Example with bespoke source plus an event listener: https://www.infoworld.com/article/3700076/how-to-use-eventcounters-in-net-core.html
Currently the Performance Monitoring subsystem uses the PeformanceCounter in System.Diagnostics. Because this only works with Windows, we should redesign a performance monitoring system that is platform independent.