11. Profiling
11 Profiling
11.1 Do Not Guess About Performance - Profile
Even experienced software developers often guess wrong about where the performance bottlenecks are in their programs. Therefore, profile your program to see where the performance bottlenecks are and concentrate on optimizing them.
Erlang/OTP contains several tools to help finding bottlenecks:
-
fprof
provides the most detailed information about where the program time is spent, but it significantly slows down the program it profiles. -
eprof
provides time information of each function used in the program. No call graph is produced, buteprof
has considerable less impact on the program it profiles.If the program is too large to be profiled by
fprof
oreprof
, thecover
andc