如何查找NuSMV模型使用的内存和运行时

问题描述 投票:1回答:1

给定一个NuSMV模型,如何找到它的运行时间以及它消耗了多少内存?

因此可以在系统提示符下使用此命令找到运行时:/ usr / bin / time -f“time%e s”NuSMV filename.smv

以上给出了挂钟时间。有没有更好的方法从NuSMV本身获取运行时统计信息?

另外如何找出程序在处理文件时使用了多少RAM内存?

performance time nusmv
1个回答
0
投票

一种可能性是使用usage命令,它显示当前正在使用的RAM量,以及工具自启动时使用的用户和系统时间(因此,应在每个之前和之后调用usage)您要配置的操作)。

一个示例执行:

NuSMV > usage
Runtime Statistics
------------------
Machine name: *****
User time    0.005 seconds
System time  0.005 seconds

Average resident text size       =     0K
Average resident data+stack size =     0K
Maximum resident size            =  6932K

Virtual text size                =  8139K
Virtual data size                = 34089K
    data size initialized        =  3424K
    data size uninitialized      =   178K
    data size sbrk               = 30487K
Virtual memory limit             = -2147483648K (-2147483648K)

Major page faults = 0
Minor page faults = 2607
Swaps = 0
Input blocks = 0
Output blocks = 0
Context switch (voluntary) = 9
Context switch (involuntary) = 0

NuSMV > reset; read_model -i nusmvLab.2018.06.07.smv ; go ; check_property ; usage
-- specification (L6 != pc U cc = len) IN mm is true
-- specification  F (min = 2 & max = 9) IN mm is true
-- specification  G !((((max > arr[0] & max > arr[1]) & max > arr[2]) & max > arr[3]) & max > arr[4]) IN mm is true
-- invariant max >= min IN mm is true

Runtime Statistics
------------------
Machine name: *****
User time   47.214 seconds
System time  0.284 seconds

Average resident text size       =     0K
Average resident data+stack size =     0K
Maximum resident size            = 270714K

Virtual text size                =  8139K
Virtual data size                = 435321K
    data size initialized        =  3424K
    data size uninitialized      =   178K
    data size sbrk               = 431719K
Virtual memory limit             = -2147483648K (-2147483648K)

Major page faults = 1
Minor page faults = 189666
Swaps = 0
Input blocks = 48
Output blocks = 0
Context switch (voluntary) = 12
Context switch (involuntary) = 145
© www.soinside.com 2019 - 2024. All rights reserved.