我很困惑如何在R中使用。我按照文档中的示例,类似于以下内容:
Rprof(filename="testProfile.out")
test()
Rprof(NULL)
summaryRprof("testProfile.out")
然而,在testProfile.out
内,我只有一行:sample.interval=20000
这让我很困惑,当我运行summaryRProf
时,出现了no events were recorded
的提示。
如果有任何建议,将不胜感激。
1:50
更改为1:5000
,你就会开始看到一些东西。现在,你的test()
对于默认的interval = 0.02
来说太快了。你也可以尝试对for (i in 1:100) test()
进行分析。 - flodel