An open API service indexing awesome lists of open source software.

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.

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
```