Home

Awesome

Erlang Easy Profiling (eep)

Erlang Easy Profiling (eep) application provides a way to analyze application performance and call hierarchy.

Main features:

Limitations:

How to

On target system:

  1. Make sure the target system can use eep module (link eep to your rebar project or place compiled eep.beam at any code path)
  2. Collect runtime data to local file
<pre> 1> eep:start_file_tracing("file_name"), timer:sleep(10000), eep:stop_tracing(). </pre>
  1. Copy $PWD/file_name.trace from the target system

Outside the target system:

  1. Make sure collected runtime data is in current directory ($PWD/file_name.trace)
  2. Convert to callgrind format
<pre> 1> eep:convert_tracing("file_name"). </pre>
  1. Start kcachegrind
<pre> $ kcachegrind callgrind.out.file_name </pre>

Also

  1. Collect specific module calls only
<pre> 1> eep:start_file_tracing("file_name", [], [my_module_1, my_module_2]). </pre>
  1. Include time spent waiting for event (not running)
<pre> 1> eep:convert_tracing("file_name", [waits]). </pre>
  1. Dump collected runtime data
<pre> 1> eep:dump_tracing("file_name"). </pre>
  1. Remove separation by erlang process
<pre> $ grep -v "^ob=" callgrind.out.file_name > callgrind.out.merged_file_name </pre>
  1. Route runtime data to other host, then process trace on that host
<pre> (eep@otherhost) 1> eep:start_net_client("targethost", 1088, "file_name", wait). (eep@targethost) 1> eep:start_net_tracing(1088). </pre>

Useful

Screenshots

Author

Igor Milyakov [virtan@virtan.com] 10

License

The MIT License (MIT)

Copyright (c) 2013 Igor Milyakov virtan@virtan.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.