在许多赛车运动中,遥测在提高速度方面起着重要作用。 感谢lizmat的大量提交,你现在也可以使用遥测了。
perl6 -e 'use Telemetry; snapper(½); my @a = (‚aaaa‘..‚zzzz‘).pick(1000); say @a.sort.[*-1 / 2];'
zyzl
Telemetry Report of Process #30304 (2017-11-05T17:24:38Z)
No supervisor thread has been running
Number of Snapshots: 31
Initial Size: 93684 Kbytes
Total Time: 14.74 seconds
Total CPU Usage: 15.08 seconds
wallclock util% max-rss gw gtc tw ttc aw atc
500951 53.81 8424
500557 51.92 9240
548677 52.15 12376
506068 52.51 196
500380 51.94 8976
506552 51.74 9240
500517 52.45 9240
500482 52.33 9504
506813 51.67 6864
502634 51.63
500520 51.78 6072
500539 52.13 7128
503437 52.29 7920
500419 52.45 8976
500544 51.89 8712
500550 49.92 6864
602948 49.71 8712
500548 50.33
500545 49.92 320
500518 49.92
500530 49.92
500529 49.91
500507 49.92
506886 50.07
500510 49.93 1848
500488 49.93
500511 49.93
508389 49.94
508510 51.27 264
27636 58.33
--------- ------ -------- --- -------- --- -------- --- --------
14738710 51.16 130876
Legend:
wallclock Number of microseconds elapsed
util% Percentage of CPU utilization (0..100%)
max-rss Maximum resident set size (in Kbytes)
gw The number of general worker threads
gtc The number of tasks completed in general worker threads
tw The number of timer threads
ttc The number of tasks completed in timer threads
aw The number of affinity threads
atc The number of tasks completed in affinity threads
snapper
函数以数据采集的时间为间隔。程序终止后,会显示出上面的表格。
该模块自带大量的 sub,可以收集手头相同的数据,并提交自己的报告。在长期运行的过程中可能是合理的。或者你时不时的手动调用 report
sub。
use Telemetry;
react {
snapper;
whenever Supply.interval(60) {
say report;
}
}
如果终端不能切入,你可以使用 http 来获取遥测数据。
文档还没有完成,模块也没有完成。所以请继续关注更多数据。
by gfldex.