- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
所以我有一个基于 io-streams
的管道,我刚刚运行(解释)并使用 -s
转储统计信息:
123,680 bytes allocated in the heap
3,464 bytes copied during GC
68,912 bytes maximum residency (1 sample(s))
13,008 bytes maximum slop
1 MB total memory in use (0 MB lost due to fragmentation)
Tot time (elapsed) Avg pause Max pause
Gen 0 0 colls, 0 par 0.000s 0.000s 0.0000s 0.0000s
Gen 1 1 colls, 0 par 0.000s 0.000s 0.0002s 0.0002s
INIT time 0.000s ( 0.000s elapsed)
MUT time 0.001s (299.935s elapsed)
GC time 0.000s ( 0.000s elapsed)
EXIT time 0.000s ( 0.000s elapsed)
Total time 0.134s (299.936s elapsed)
%GC time 0.2% (0.0% elapsed)
Alloc rate 106,371,724 bytes per MUT second
Productivity 99.7% of total user, 0.0% of total elapsed
所以基本上没有时间花在垃圾收集上。但是我感到困惑的是括号中的时间。来自 the docs括号中的时间和时间之间的区别是什么并不明显。任何人都可以对此有所了解吗?
最佳答案
括号中的时间是挂钟时间。如果你看着墙上的时钟,这是一个人(你)在程序运行时所经历的时间。 CPU 时间是你的程序经历的时间:
If you use the
-s
flag then, when your program finishes, you will see something like this (the exact details will vary depending on what sort of RTS you have, e.g. you will only see profiling data if your RTS is compiled for profiling):36,169,392 bytes allocated in the heap
4,057,632 bytes copied during GC
1,065,272 bytes maximum residency (2 sample(s))
54,312 bytes maximum slop
3 MB total memory in use (0 MB lost due to fragmentation)
Generation 0: 67 collections, 0 parallel, 0.04s, 0.03s elapsed
Generation 1: 2 collections, 0 parallel, 0.03s, 0.04s elapsed
SPARKS: 359207 (557 converted, 149591 pruned)
INIT time 0.00s ( 0.00s elapsed)
MUT time 0.01s ( 0.02s elapsed)
GC time 0.07s ( 0.07s elapsed)
EXIT time 0.00s ( 0.00s elapsed)
Total time 0.08s ( 0.09s elapsed)
%GC time 89.5% (75.3% elapsed)
Alloc rate 4,520,608,923 bytes per MUT second
Productivity 10.5% of total user, 9.1% of total elapsed[…]
Next there is the CPU time and wall clock time elapsed broken down by what the runtime system was doing at the time. INIT is …
挂钟时间通常大于 CPU 时间,除非您同时使用多个内核。使用 getLine
、sleep
和 可以实现 CPU 时间非常而挂钟时间很高的简单示例回声
:
$ {sleep 10; echo 1} | ghc -e 'getLine' +RTS -s > /dev/null
32,006,664 bytes allocated in the heap
20,644,024 bytes copied during GC
5,813,624 bytes maximum residency (6 sample(s))
156,360 bytes maximum slop
12 MB total memory in use (0 MB lost due to fragmentation)
Tot time (elapsed) Avg pause Max pause
Gen 0 37 colls, 0 par 0.011s 0.011s 0.0003s 0.0009s
Gen 1 6 colls, 0 par 0.052s 0.052s 0.0087s 0.0105s
TASKS: 5 (1 bound, 4 peak workers (4 total), using -N1)
SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)
INIT time 0.001s ( 0.001s elapsed)
MUT time 0.016s ( 9.903s elapsed) <------------
GC time 0.063s ( 0.063s elapsed)
EXIT time 0.010s ( 0.010s elapsed)
Total time 0.125s ( 9.977s elapsed)
Alloc rate 1,956,305,120 bytes per MUT second
Productivity 48.7% of total user, 0.6% of total elapsed
如您所见,MUT CPU 时间很短,而 MUT 挂钟时间很长,因为应用程序等待输入。
关于haskell - 这个统计输出是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37696504/
我目前正在学习数据挖掘,有以下问题。 机器学习和数据挖掘之间有什么关系? 我发现许多数据挖掘技术都与统计相关,而我“听说”数据挖掘与机器学习有很多关系。所以我的问题是:机器学习与统计学密切相关吗? 如
我有很多表的数据,例如: event_id player finish 1 a 1 1 b 2 1 c
我对 http_status_module 提供的统计数据感兴趣 特别是上游部分的统计数据。 http://nginx.org/en/docs/http/ngx_http_status_module.
除了 Cluster MBean 之外,是否有任何可以在 Akka (Java) 中启用的内置 JMX 公开监控/统计信息?我看过 Typesafe Console,但由于它需要许可证才能用于从多个节
我正在尝试在我的程序中使用“usage”统计信息来获取类似于 time 的数据工具。但是,我很确定我做错了什么。这些值似乎是正确的,但有时可能有点奇怪。我没有在网上找到好的资源。有人知道如何做得更好吗
我有一个带有统计表的 MySQL 数据库。我想以年历、月度的形式输出数据。对于没有点击率的几个月,我想花费一个“空”DIV。有两个ID。 $query = mysqli_query($db,"SELE
设置: 问题是经典概率问题的复杂形式: 70 colored balls are placed in an urn, 10 for each of the seven rainbow colors.
有哪些 Ruby gem 可以执行数据处理? 最佳答案 我知道有 3 种从 Ruby 访问 R 的方法: RinRuby RSRuby 通过 Rserve-Ruby-Client 预约 RinRuby
背景 图像领域内的一个国内会议快要召开了,要发各种邀请邮件,之后要录入、统计邮件回复(参会还是不参会等)。如此重要的任务,老师就托付给我了。ps: 统计回复邮件的时候,能知道谁参会或谁不参会。
我正在添加用户输入的几个数字并将它们添加到数组列表中。 到目前为止我的代码: package project143; import java.util.*; /** * @author -- */
正如标题所示,我需要做的是在各种 iO/Android/Windows 应用程序中跟踪各种用户事件 - 例如点击、滑动、在页面上花费的时间等。 这些应用程序基于响应式 HTML/CSS/JS,并具有简
我希望计算 HTML 表中每个唯一值的实例数,并在其自己的表中返回结果。该表是根据用户的文本输入生成的。例如,用户输入可能如下所示: Report 46 Bob Marley 4/20/2
如何使用 PHP 计算数字数组的 z 分数?我需要计算 z 分数,然后找到百分位数 (CDF)!我可以使用哪些 PHP 函数?谢谢! 最佳答案 以下代码将给出 CDF 的良好近似值(Abramowit
我只是想知道是否可以计算 GitHub 上空存储库的总数。 如果不适合所有用户,可以为自己做吗? 编辑 我已经尝试过size:0搜索,但似乎返回了很多包含数据的存储库。采用 size:0..1 之类的
public class Scanner { private HtmlProcessor hp; private String baseUrl; private int ste
我正在使用 Mule ESB 3.4。我想开发一个自定义 Java 组件来计算流收到的请求数量。流程将例如像这样: http inbound-endpoint -> counter -> vm-out
我喜欢借助 GitHub API 来统计存储库中所有开放的拉取请求和问题。我发现 API 端点 /repos/:owner/:repo 结果包含 open_issues 属性。然而,这是问题和拉取请求
如何使用 PHP 计算数字数组的 z 分数?我需要计算 z 分数,然后找到百分位数 (CDF)!我可以使用哪些 PHP 函数?谢谢! 最佳答案 以下代码将给出 CDF 的良好近似值(Abramowit
已关闭。此问题需要 debugging details 。目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and the
我正在尝试以编程方式获取搜索字词列表的 Google 新闻搜索结果计数(即有多少个结果),但仅限于过去 1 年。使用用户界面搜索时,结果计数仅出现在常规搜索中,但在“工具 > 最近 > 过去一年”下时
我是一名优秀的程序员,十分优秀!