Module comm_stats

CommLayer: statistics gathering.

Copyright © 2012-2015 Zuse Institute Berlin

Version: $Id$

Behaviours: gen_component.

Authors: Nico Kruber (kruber@zib.de).

Description

CommLayer: statistics gathering.

Data Types

erlang_timestamp()

erlang_timestamp() = 
    {MegaSecs :: non_neg_integer(),
     Secs :: 0..999999,
     MicroSecs :: 0..999999}

message()

message() = 
    {report_stat,
     RcvCnt :: non_neg_integer(),
     RcvBytes :: non_neg_integer(),
     SendCnt :: non_neg_integer(),
     SendBytes :: non_neg_integer()}

state()

state() = 
    {StartTime :: erlang_timestamp(),
     RcvCnt :: non_neg_integer(),
     RcvBytes :: non_neg_integer(),
     SendCnt :: non_neg_integer(),
     SendBytes :: non_neg_integer()}

Function Index

get_no_of_ch/0Get number of channels for the current VM.
get_stats/0
init/1initialize: return initial state.
on/2message handler.
start_gen_component/5
start_link/1

Function Details

start_gen_component/5

start_gen_component(Module :: module(),
                    Handler :: gen_component:handler(),
                    Args :: term(),
                    Options :: [gen_component:option()],
                    Self :: pid()) ->
                       no_return() | ok

get_stats/0

get_stats() ->
             {RcvCnt :: non_neg_integer(),
              RcvBytes :: non_neg_integer(),
              SendCnt :: non_neg_integer(),
              SendBytes :: non_neg_integer()}

get_no_of_ch/0

get_no_of_ch() -> {no_of_channels, comm:mypid(), pos_integer()}

Get number of channels for the current VM. The answer is collected synchronously, use only for debugging.

start_link/1

start_link(CommLayerGroup :: pid_groups:groupname()) ->
              {ok, pid()}

init/1

init(X1 :: []) -> state()

initialize: return initial state.

on/2

on(X1 :: message(), State :: state()) -> state()

message handler


Generated by EDoc, Aug 2 2016, 13:42:53.