【发布时间】:2018-04-16 15:30:25
【问题描述】:
我可以启动如下应用程序:
dotnet myapp.dll
但是我怎样才能对其进行时间或内存分析呢?在 Visual Studio for Mac 社区版中,运行菜单下没有显示“配置文件”选项(需要企业版)。
我本质上是在 .net core 2.0 中寻找 mono --profile=log 的等价物
【问题讨论】:
标签: c# macos .net-core profiling macos-sierra
我可以启动如下应用程序:
dotnet myapp.dll
但是我怎样才能对其进行时间或内存分析呢?在 Visual Studio for Mac 社区版中,运行菜单下没有显示“配置文件”选项(需要企业版)。
我本质上是在 .net core 2.0 中寻找 mono --profile=log 的等价物
【问题讨论】:
标签: c# macos .net-core profiling macos-sierra
Profiler API 已在 .NET Core 运行时中实现,并可在所有主要平台上使用:Windows、Linux、macOS。但是,它仅在 Windows 和 Linux 上经过全面测试。开发人员建议在 macOS 上使用盐粒进行分析并设置一些验证测试。
目前 Microsoft 仅提供适用于 macOS 的 Xamarin 分析器。我会评估适用于 macOS 的 Visual Studio Enterprise - 它可以免费试用 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 分析器。
【讨论】: