Add CPU runtime counter (dotnet/coreclr#23680)
authorSung Yoon Whang <suwhang@microsoft.com>
Thu, 4 Apr 2019 03:40:50 +0000 (20:40 -0700)
committerGitHub <noreply@github.com>
Thu, 4 Apr 2019 03:40:50 +0000 (20:40 -0700)
commit83379f79fecb4bdfefaa58f7a48d1ffd3ed1bb4e
tree86fac1a736082c924e90bf7675b167f41afb17ce
parent144c408b5a7b62a3148124e3f43a0eed7c6dfd46
Add CPU runtime counter (dotnet/coreclr#23680)

* Add cpu counter

* Fix windows build

* Make the counter just return current CPU usage as %

* Add Unix

* Fix unix build

* Some cleanup

* rename

* fixing some build errors

* some cleanup

* remove unused using

* more cleanup

* newline

* Address PR feedback

* more pr feedback

* More feedback

Commit migrated from https://github.com/dotnet/coreclr/commit/3dbfa1e039d8fbb45d0d9eadffa768ba2b2e89dc
src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj
src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/RuntimeEventSource.cs
src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/RuntimeEventSourceHelper.Unix.cs [new file with mode: 0644]
src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/RuntimeEventSourceHelper.Windows.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems