An overview of the

Don’t talk about profile of the importance of the tools. Erlang profile be sure to check out this article. http://erlang.org/doc/efficie… This blog post contains some practical facts.

steps

Fprof collects data

The collection is triggered in the program or directly by REMOTE_CONSOLE.

: fpr. trace(:start) # After some time, be careful not to collect online. Fprof is the profile that has the most impact on performance, and also has the most complete information: fpr. trace(:stop)

Without passing parameters, the fprof information is written to the fprof. Trace file by default.

Use KCacheGrind to view the results of Fprof

Convert to callgrind format using erlgrind

~ ~ / install » wget https://raw.githubusercontent.com/isacssouza/erlgrind/master/src/erlgrind/install » chmod + x a Erlgrind ~/install » sudo mv erlgrind ~/ usr/local/bin ~/platform/ XXXXX (XXXX *) » erlgrind fprof. Trace Reading trace data... . . . . . . . . End of trace! Processing data... Creating output... Done!

Install kcachegrind

It can be installed directly from the package manager

Sudo apt-get install -y kcacheGrind ~/platform/ XXXXX (XXXXX *) » kcacheGrind XXX

The effect is as follows:

flame graph

todo

reference

http://erlang.org/doc/efficie…

http://blog.equanimity.nl/blo…