我benchmark在snakemake工作流程中包括了一些规则的指令,并且生成的文件具有以下标头:
s h:m:s max_rss max_vms max_uss max_pss io_in io_out mean_load
Run Code Online (Sandbox Code Playgroud)
我找到的唯一文档提到了“基准txt文件(它将在MiB中包含运行时间和内存使用情况的制表符分隔的表)”。
我可以猜测,第1列和第2列是显示执行规则所花费时间的两种不同方式(以秒为单位,并转换为小时,分钟和秒)。
io_in并io_out可能与磁盘的读取及写入活动,但在被他们测量什么单位?
还有什么?这是在某处记录的吗?
我在中找到了以下代码/snakemake/benchmark.py,这很可能是基准数据的来源:
s h:m:s max_rss max_vms max_uss max_pss io_in io_out mean_load
Run Code Online (Sandbox Code Playgroud)
因此,这似乎来自所提供的功能psutil。
pap*_*kos 13
我将把它留在这里以供将来参考。
\n通读
\nsnakemake >= 6.0.0 基准测试模块psutil\'s memory_info()、memory_full_info()、io_counters()、cpu_times()如前所述:
\n| 科名 | 类型(单位) | 描述 |
|---|---|---|
| s | 浮点数(秒) | 运行时间(以秒为单位) |
| 小时:分:秒 | 细绳 (-) | 以小时、分钟、秒格式显示的运行时间 |
| 最大RSS | 浮动 (MB) | 最大“Resident Set Size\xe2\x80\x9d”,这是进程已使用的非交换物理内存。 |
| 最大虚拟机数 | 浮动 (MB) | Maximum \xe2\x80\x9cVirtual Memory Size\xe2\x80\x9d,这是进程使用的虚拟内存总量 |
| 最大uss | 浮动 (MB) | \xe2\x80\x9cUnique Set Size\xe2\x80\x9d,这是进程唯一的内存,如果进程立即终止,它将被释放。 |
| 最大PSS | 浮动 (MB) | \xe2\x80\x9cProportional Set Size\xe2\x80\x9d,是与其他进程共享的内存量,以在共享它的进程之间平均分配该量的方式进行计算(仅限 Linux) |
| io_in | 浮动 (MB) | 读取的 MB 数(累计)。 |
| io_输出 | 浮动 (MB) | 写入的 MB 数(累计)。 |
| 平均负载 | 漂浮 (-) | 随着时间的推移,CPU 使用率除以总运行时间(第一行) |
| CPU时间 | 漂浮(-) | 用户和系统的 CPU 时间总和 |
肯定可以更好地记录snakemake中的基准测试,但是psutil 在这里是占优的:
get_memory_info()
Return a tuple representing RSS (Resident Set Size) and VMS (Virtual Memory Size) in bytes.
On UNIX RSS and VMS are the same values shown by ps.
On Windows RSS and VMS refer to "Mem Usage" and "VM Size" columns of taskmgr.exe.
psutil.disk_io_counters(perdisk=False)
Return system disk I/O statistics as a namedtuple including the following attributes:
read_count: number of reads
write_count: number of writes
read_bytes: number of bytes read
write_bytes: number of bytes written
read_time: time spent reading from disk (in milliseconds)
write_time: time spent writing to disk (in milliseconds)
Run Code Online (Sandbox Code Playgroud)
您找到的代码确认所有内存使用情况和IO计数均以MB(=字节* 1024 * 1024)报告。
| 归档时间: |
|
| 查看次数: |
676 次 |
| 最近记录: |