Skip to content

Instantly share code, notes, and snippets.

@Reimerei
Last active August 29, 2015 14:23
Show Gist options
  • Save Reimerei/16c654ae83dca9993014 to your computer and use it in GitHub Desktop.
Save Reimerei/16c654ae83dca9993014 to your computer and use it in GitHub Desktop.
Profiling Exlixir

get fproxf

https://github.com/talko/fprofx

compile fproxf

erlc src/fprofx.erl

copy beam file to project

path: _build/dev/lib/fprofx/ebin/

open project console

iex -S mix

profile a function

  • :fprofx.apply(SBS, :config, ["fooo"], [{:procs, :erlang.processes -- [:erlang.whereis(:fprofx_server)]}])
  • :fprofx.profile
  • :fprofx.analyse([{:dest, 'fprofx.analysis'}])

convert output file with tool from fproxfx

../fprofx/erlgrindx fprofx.analysis

open with kcachegrind

kcachegrind fprofx.cgrind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment