Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What profilers and analyzers are there for Erlang/OTP?

Are there any good code profilers/analyzers for Erlang? I need something that can build a call graph (eg gprof) for my code.

like image 899
Sushant Avatar asked Oct 15 '08 14:10

Sushant


2 Answers

For static code analysis you have Xref and Dialyzer, for profiling you can use cprof, fprof or eprof, reference here.

like image 196
Christian C. Salvadó Avatar answered Sep 21 '22 19:09

Christian C. Salvadó


The 'fprof' module includes profiling features. From the fprof module documentation:

fprof:apply(foo, create_file_slow, [junk, 1024]).
fprof:profile().
fprof:analyse().

fprof:apply (or trace) runs the function, profile converts the trace file into something useful, and analyse prints out the summary. This will give you a list of function calls observed, what called them, and what they called, as well as wall-clock timing info.

like image 42
krakatoa Avatar answered Sep 20 '22 19:09

krakatoa