https://github.com/stwind/yokogao
Erlang Application Profiling Toolkit.
https://github.com/stwind/yokogao
Last synced: 5 months ago
JSON representation
Erlang Application Profiling Toolkit.
- Host: GitHub
- URL: https://github.com/stwind/yokogao
- Owner: stwind
- Created: 2013-09-11T09:30:43.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-12T06:41:19.000Z (almost 13 years ago)
- Last Synced: 2025-04-08T09:41:09.588Z (about 1 year ago)
- Homepage:
- Size: 145 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Yokogao
=======
Erlang application profiling toolkit.
## Usage
### Config
```erlang
{yokogao, [
{log_dir, "log"}
]}
```
### Tracing
#### Tracing Function
```erlang
yokogao:trace_fun(fun erlang:memory/0, []).
```
#### Tracing for a period
Trace for one second.
```erlang
yokogao:trace_for(1000).
```
#### Custom tracing period
```erlang
{ok, File} = yokogao:start_trace("my_trace"),
%% do something
ok = yokogao:stop_trace(File).
```
### Analyzing
You should find the `.analysis` files in the `log_dir` (default to `log`) folder, e.g. `fprof_9_12_10_49_4.analysis`.
Then you can convert it to callgrind output:
```bash
make grind FILE=fprof_9_12_10_49_4
```
this will produce a `fprof_9_12_10_49_4.cgrind` file, which can be interpreted by `kcachegrind` (`qcachegrind` in OSX case).
Now you can do to inspect the results
```bash
qcachegrind log/fprof_9_12_10_49_4.cgrind
```