在 mac 上分析 .net 核心应用程序?

Profile a .net core application on mac?

我可以启动这样的应用程序:

dotnet myapp.dll

但是我如何对其执行时间或内存分析?在 visual studio for Mac 社区版中,运行 菜单下没有显示 "profile" 选项(需要企业版)。

我本质上是在寻找 .net core 2.0

mono --profile=log 的等价物

Profiler API 已在 .NET Core 运行时中实现并可在所有主要平台上使用:Windows、Linux、macOS。但是,它仅在 Windows 和 Linux 上进行了全面测试。开发人员建议在 macOS 上进行概要分析并设置一些验证测试。

目前 Microsoft 仅提供适用于 macOS 的 Xamarin 探查器。我会评估 Visual Studio Enterprise for macOS - 它可以免费试用 30 天。

另一种方法是使用 Microsoft Clr Samples repo 中 .NET Core Profiling API 示例的现有基本实现 - ProfilingAPI - ReJITEnterLeaveHooks 并在需要时添加一些缺失的功能。有关其他详细信息,请参阅 CoreCLR GitHub 回购问题 #14786 How To Build My Own .Net Core Profiler

否则我不知道任何其他经过测试和生产就绪的 macOS .NET Core 分析器。