dotnet / core

.NET news, announcements, release notes, and more!
https://dot.net
MIT License
20.91k stars 4.89k forks source link

Profiling from Linux/macOS #1647

Closed keith-miller closed 6 years ago

keith-miller commented 6 years ago

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. Not in Visual Studio, of course, but something that possibly can be run from the command line. Coming from Java, the JMX gives you a lot of visibility on what is going on. Having a way to do that in Net Core, then feeding the data to StatsD/Graphite is incredibly helpful.

Sorry if this belongs in dotnet/corefx, I wasn't sure.

Thanks!

leecow commented 6 years ago

@brianrob may have some ideas.

brianrob commented 6 years ago

@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.

keith-miller commented 6 years ago

@brianrob ok, thanks! Using perfcollect seems to be a very manual process. Looking forward to the changes coming in EventPipe. Having a way to poll (or push) this data would be great.

Thanks again

brianrob commented 6 years ago

Yes, it is a manual process. Are you looking for detailed tracing information, or are you looking for something more like performance monitoring?

keith-miller commented 6 years ago

Looking for performance monitoring. We are using .Net Core as our dedicated game server, as it gives us the ability to share libraries with our Unity code base. My main use case would be monitoring performance during a load test while the dedicated server is under stress, and see where we can make improvements or where it falls over.

Hope that helps. And thanks again for .Net Core!

brianrob commented 6 years ago

Gotcha. Thanks @doyouevensunbro! Thanks for the feedback!