Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Profile a .net core application on mac?

I can launch an application like:

dotnet myapp.dll

But how can I perform time or memory profiling on it? In visual studio for Mac community edition, no "profile" option shows up under the run menu (it requires enterprise).

I am essentially looking for the equivalent of mono --profile=log in .net core 2.0

like image 516
evolvedmicrobe Avatar asked Nov 03 '17 19:11

evolvedmicrobe


1 Answers

Profiler API is already implemented in .NET Core runtime and available on all major platforms: Windows, Linux, macOS. However, it was thoroughly tested only on Windows and Linux. Devs recommend to profile on macOS with grain of salt and set up some verification tests.

Currently Microsoft offers only Xamarin profiler for macOS. I would evaluate Visual Studio Enterprise for macOS - it is available for 30 day free trial.

Another approach is to use existing basic implementation of .NET Core Profiling API sample in Microsoft Clr Samples repo - ProfilingAPI - ReJITEnterLeaveHooks and if needed add some missing functionality. For additional details see CoreCLR GitHub repo issue #14786 How To Build My Own .Net Core Profiler

Otherwise I am not aware of any other tested and production ready macOS .NET Core profilers.

like image 192
Jacek Blaszczynski Avatar answered Sep 22 '22 12:09

Jacek Blaszczynski