Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/obmarg/plug_fprof
An Elixir Plug for profiling code with fprof.
https://github.com/obmarg/plug_fprof
Last synced: 29 days ago
JSON representation
An Elixir Plug for profiling code with fprof.
- Host: GitHub
- URL: https://github.com/obmarg/plug_fprof
- Owner: obmarg
- Created: 2015-07-18T14:51:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-18T16:03:31.000Z (over 9 years ago)
- Last Synced: 2024-08-13T09:46:35.030Z (3 months ago)
- Language: Elixir
- Size: 117 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - A Plug that adds fprof tracing to requests, to allow for easy profiling. (Framework Components)
- fucking-awesome-elixir - plug_fprof - A Plug that adds fprof tracing to requests, to allow for easy profiling. (Framework Components)
- awesome-elixir - plug_fprof - A Plug that adds fprof tracing to requests, to allow for easy profiling. (Framework Components)
README
PlugFprof
=========A Plug that adds fprof tracing to a web app.
### Usage
Add to your dependencies in `mix.exs`:
```elixir
defp deps do
[{:plug_fprof, "~> 0.0.1"}]
end
```Then `use` it from within your plug/pheonix router:
```elixir
defmodule MyRouter do
use Plug.Router
use PlugFprofend
```FProf will write it's tracing data into `fprof.trace`. You can profile &
analyze this from `iex`:```
iex(1)> :fprof.profile()
Reading trace data...
.........
End of trace!
:ok
iex(2)> :fprof.analyse([dest: 'analysis.txt', cols: 120, callers: true, sort:
:own, totals: true, details: true])
Processing data...
Creating output...
Done!
:ok
```See [the fprof documentation](http://www.erlang.org/doc/man/fprof.html) for
more details.