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

https://github.com/timuryan/sherlock_mem

Elixir memory usage tracer for GenServer processes
https://github.com/timuryan/sherlock_mem

elixir genserver performance-metrics

Last synced: 4 months ago
JSON representation

Elixir memory usage tracer for GenServer processes

Awesome Lists containing this project

README

          

# SherlockMem

Memory usage tracer for GenServer processes.

## Installation

The package can be installed by adding `sherlock_mem` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[{:sherlock_mem, "~> 0.1.3"}]
end
```

## Basic Usage

- Add "use SherlockMem" in each GenServer module like this:

```elixir
defmodule Slack do
use GenServer
use SherlockMem
...
end
```

- At runtime enable tracing module by running in iex console:

```elixir
SherlockMem.enable(Slack)
```

- For each init callback there will be messages like this:

```console
print_mem_before "init_before"
print_mem_after "init_after "
```

- Library is wrapping standard GenServer callbacks: init, handle_cast, handle_call, handle_info

### More details

- default log level is info
- it's using recon to get current process memory usage