我正在针对一个dotMemory Windows应用程序运行IoT命令行,该应用程序需要对自定义设备进行许多小时的测试。
我的目的是在应用程序在设备上运行时,根据时间获取内存快照。例如,如果测试设计为运行24小时,我希望每小时获得10秒的内存快照。
我找到了两种方法:
schtasks安排每次执行;attach和trigger参数运行dotMemory,并获取单个文件上的所有快照。第一个场景已经为我准备好了,但是很容易看到,第二个场景更适合在收集数据之后进行进一步的分析。
我可以通过使用命令来启动它,如下所示:
C:\dotMemory\dotMemory.exe attach $processId --trigger-on-activation --trigger-timer=10s --trigger-max-snapshots=24 --trigger-delay=3600s --save-to-dir=c:\dotMemory\Snapshots
我的问题来了:
的情况下达到最大快照值后停止吗?
参考资料:https://www.jetbrains.com/help/dotmemory/Working_with_dotMemory_Command-Line_Profiler.html
发布于 2021-05-11 15:53:14
如果您以分析方式启动应用程序,而不是附加到已经运行的进程中,停止分析会话将杀死分析下的应用程序。您可以通过将##dotMemory["disconnect"]命令传递给dotMemory控制台stdin来停止分析会话。(例如,一些脚本可以在一段时间后完成)。
详细信息请参见dotmemory help service-messages
##dotMemory["disconnect"] Disconnect profiler.
If you started profiling with 'start*' commands, the profiled process will be killed.
If you started profiling with 'attach' command, the profiler will detach from the process.一些关于你的命令行的笔记。使用此comand行,dotMemory将每10秒获得一个快照,,但将在一个小时后开始执行。没有“10秒内存快照”这样的东西,内存快照是内存中对象图的瞬间快照。任务的正确命令行是C:\dotMemory\dotMemory.exe attach $processId --trigger-on-activation --trigger-timer=1h --trigger-max-snapshots=24 --save-to-dir=c:\dotMemory\Snapshots。
https://stackoverflow.com/questions/67487664
复制相似问题