2007-11-19

erlang r12 新增加Percept并发性能调测模块

关键字: Percept profile 并发

Percept is an application-level profiler with focus on parallelism.

Can help in finding:
    – synchronization bottlenecks
    – periods of few runnable processes

Makes use of new trace points in the virtual machine.

Collects data about when processes are runnable andwaiting.

Graphical interactive presentation of collected data.

  • B2e7bcfc-2057-4dfc-a372-b724942f4b86-thumb
  • 描述: percept preview
  • 大小: 64.9 KB
评论
mryufeng 2007-11-21
另外还添加了Common Test Test Server2个Application来测试erlang的整个系统 用户可以直接写test case 貌似不错。
dcaoyuan 2007-11-20
不错,非常直观,这样不用我在Code中手工加代码测试各process的耗时了。图示结果表明,并行的第2到第5个Processes确实是差不多同时启动,且并行运行。第一个Process是在合并结果,这个非并行的耗时并不是最主要的。而且,erl的启动时间看来也在整个耗时中占了一部分,不过对更大的文件来说这部分时间就不重要了。
Arbow 2007-11-19
来做个尝试,程序是 widefinder项目的 tbray9a.erl,经过少量修改,去掉了 halt():

引用
1> percept:profile("test.dat", {tbray9a,start,[]}, [procs]).
Starting profiling.
8900 : 2006/09/29/Dynamic-IDE
2000 : 2006/07/28/Open-Data
1300 : 2003/07/25/NotGaming
800 : 2003/09/18/NXML
800 : 2003/10/16/Debbie
800 : 2006/01/31/Data-Protection
700 : 2003/06/23/SamsPie
600 : 2006/01/08/No-New-XML-Languages
600 : 2006/09/07/JRuby-guys
600 : 2005/07/27/Atomic-RSS
ok
2> percept:analyze("test.dat").
Parsing: "test.dat"
check_activity_consistency, invalid start state: inactive.
insert_trace, bad_state: {profile,<0.30.0>,inactive,
{code_server,call,2},
{1195,446574,24650}}
Parsed 79 entries in 1.79400e-3 s.
5 created processes.
0 opened ports.
ok
3> percept:start_webserver().
{started,"test98",57194}


在浏览器打开 http://localhost:57194/ 截图如下:



发表评论

提醒: 该博客已发表在公共论坛,博客所有留言会成为论坛回贴,留言请注意遵守论坛发贴规则

您还没有登录,请登录后发表评论