Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Profiling dotnet core in Linux and Visual Studio Code

Is there any way to perform a CPU and memory profiling in Linux and Visual Studio Code for a dotnet core application? Similar to the "Diagnostics Tools" of Visual Studio 2017

like image 272
mneu Avatar asked Nov 21 '18 19:11

mneu


People also ask

Can we use Visual Studio code for .NET Core?

The . NET Core development experience is powered by the C# extension available from the Visual Studio Code Marketplace. To get the extension, press Ctrl-Shift-X / Cmd-Shift-X (all keyboard shortcuts in this guide are for macOS) to open the Extensions pane.

Can you use .NET Core on Linux?

NET Core, open source and available to run on any platform. Windows, Linux, MacOS, and even a television OS: Samsung's Tizen. Add in Microsoft's other . NET flavors, including Xamarin, and you can add the iOS and Android operating systems to the list.

Does Visual Studio code have a profiler?

By using profiling tools, a developer can view the state of the application, accumulate data about variable values, function calls, memory leaks and events traced during code debugging. Collected data from the profiling tool could be used for performance improvement during software development.


1 Answers

https://github.com/dotnet/core/issues/1647

Q: So, Visual Studio has profiling tools to help you optimize your .Net Core projects. I was wondering if this is possible to do on Linux or macOS.

REPLY: @doyouevensunbro, Visual Studio doesn't have any profiling tools that work with .NET Core on Linux. At the current time, we recommend collecting performance data on Linux using perf. Instructions are available at https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/linux-performance-tracing.md.

We're also working on exposing a .NET-centric profiler using functionality called EventPipe in CoreCLR. There's not much documentation on the subject yet.

See also:

Profiling .NET Core app on Linux

There’re multiple tools to use out there, but the basic toolkit for profiling .NET Core app on Linux seems to be perf utility along with lttng and perfcollect. Let’s have a look at all of them.

And:

Bringing .NET application performance analysis to Linux

like image 170
paulsm4 Avatar answered Sep 17 '22 21:09

paulsm4