View Source Bonfire.Common.MemoryMonitor (Bonfire v0.9.11-social-beta.6)

This module implements a GenServer that monitors the memory usage of a process. It periodically checks the memory consumption.

Summary

Functions

Returns a specification to start this module under a supervisor.

Handles incoming messages to the GenServer.

Starts the MemoryMonitor process linked to the caller process with given options.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_memory_usage(name, pid \\ self())

handle_info(msg, state)

Handles incoming messages to the GenServer.

  • :check - Performs memory usage checks on the monitored process

start_link(name, pid_to_monitor \\ self())

Starts the MemoryMonitor process linked to the caller process with given options.