From 010bff4874ddc0eee49d65edd03bcfbe0a702198 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Wed, 23 Sep 2015 17:18:57 -0400 Subject: [PATCH] Register consumer process name. --- src/beam_stats.app.src | 2 +- src/beam_stats_consumer.erl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/beam_stats.app.src b/src/beam_stats.app.src index 2dbb0cf..3dca90d 100644 --- a/src/beam_stats.app.src +++ b/src/beam_stats.app.src @@ -1,7 +1,7 @@ {application, beam_stats, [ {description, "Periodic VM stats production and consumption."}, - {vsn, "0.8.2"}, + {vsn, "0.9.0"}, {registered, []}, {applications, [ kernel diff --git a/src/beam_stats_consumer.erl b/src/beam_stats_consumer.erl index 3e46042..3c5ce1d 100644 --- a/src/beam_stats_consumer.erl +++ b/src/beam_stats_consumer.erl @@ -89,10 +89,11 @@ consume_async(PID, #beam_stats{}=BEAMStats) -> %% ============================================================================ start_link(ConsumerModule, ConsumerOptions) -> + RegisteredName = ConsumerModule, GenServerModule = ?MODULE, GenServerOpts = [], InitArgs = [ConsumerModule, ConsumerOptions], - gen_server:start_link(GenServerModule, InitArgs, GenServerOpts). + gen_server:start_link({local, RegisteredName}, GenServerModule, InitArgs, GenServerOpts). %% ============================================================================ %% gen_server callbacks (unused) -- 2.20.1