设为首页收藏本站获取积分奖励

R语言中文网

 找回密码
 立即注册
查看: 600|回复: 0

R语言启用R执行的性能分析Rprof()函数-中英文对照帮助文档

[复制链接]
发表于 2020-8-21 08:12:44 | 显示全部楼层 |阅读模式
        R语言启用R执行的性能分析Rprof()函数-中英文对照帮助文档

                                         By MicroRbt Martinez PhD

R语言函数名:Rprof()
R语言函数功能:启用R执行的性能分析
来自资源库:基础库(R语言自带)
Rprof()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。

描述-----Description-----

Enable or disable profiling of the execution of R expressions.
启用或禁用对R表达式执行的性能分析。


使用方法-----Usage-----

Rprof(filename = "Rprof.out", append = FALSE, interval = 0.02,
memory.profiling = FALSE, gc.profiling = FALSE,
line.profiling = FALSE, filter.callframes = FALSE,
numfiles = 100L, bufsize = 10000L)

参数-----Arguments-----

参数filename介绍: The file to be used for recording the profiling results. Set to NULL or "" to disable profiling.
用于记录性能分析结果的文件。设置为NULL或""以禁用分析。

参数append介绍: logical: should the file be over-written or appended to?
逻辑:文件应该被覆盖还是附加?

参数interval介绍: real: time interval between samples.
实数:样本之间的时间间隔。

参数memory.profiling介绍: logical: write memory use information to the file?
逻辑:将内存使用信息写入文件?

参数gc.profiling介绍: logical: record whether GC is running?
逻辑:记录GC是否正在运行?

参数line.profiling介绍: logical: write line locations to the file?
逻辑:将行位置写入文件?

参数filter.callframes介绍: logical: filter out intervening call frames of the call tree. See the filtering out call frames section.
逻辑:过滤掉呼叫树的中间呼叫帧。请参阅过滤掉呼叫帧部分。

参数numfiles, bufsize介绍: integers: line profiling memory allocation
整数:行分析内存分配


详情-----Details-----

Enabling profiling automatically disables any existing profiling to another or the same file.
启用概要分析会自动禁用对另一个文件或同一文件的任何现有概要分析。

Profiling works by writing out the call stack every interval seconds, to the file specified. Either the summaryRprof function or the wrapper script R CMD Rprof can be used to process the output file to produce a summary of the usage; use R CMD Rprof --help for usage information.
通过每隔interval秒将调用堆栈写到指定的文件中,进行分析即可工作。 summaryRprof函数或包装程序脚本R CMD Rprof均可用于处理输出文件以产生用法摘要。使用R CMD Rprof --help来获取使用情况信息。

How time is measured varies by platform:
如何测量时间因平台而异:

Exactly what the time interval measures is subtle: it is time that the R process is running and executing an R command. It is not however just CPU time, for if readline() is waiting for input, that counts (on Windows, but not on a Unix-alike).
确切地说,时间间隔测量的是微妙的:是时候了R进程正在运行并执行R命令
-----未完,待续-----,↓↓↓展开剩余72%↓↓↓
购买主题 前行需要您的支持,请赞助作者 【15 金钱】 就能浏览全部100%内容啦!(本贴一次赞助、永久可读)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|R语言中文网    

GMT+8, 2024-5-21 00:40 , Processed in 0.029261 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表