Module vivaldi_latency

Vivaldi helper module for measuring latency between nodes.

Copyright © 2009-2015 Zuse Institute Berlin

Version: $Id$

Behaviours: gen_component.

Authors: Thorsten Schuett (schuett@zib.de).

Description

Vivaldi helper module for measuring latency between nodes.

Data Types

erlang_timestamp()

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

message()

message() = {{pong,
              PidName :: pid_groups:pidname() | undefined},
             Count :: pos_integer()}
          | {start_ping}
          | {shutdown}
          | {'DOWN',
             MonitorRef :: reference(),
             process,
             Owner :: comm:erl_local_pid(),
             Info :: any()}

state()

state() = 
    {Owner :: comm:erl_local_pid(),
     RemotePid :: comm:mypid(),
     Token ::
         {gossip_vivaldi:network_coordinate(),
          gossip_vivaldi:est_error()},
     Start :: erlang_timestamp() | unknown,
     Count :: non_neg_integer(),
     Latencies :: [gossip_vivaldi:latency()]}

Function Index

check_config/0Checks whether config parameters of the vivaldi_latency process exist and are valid.
init/1
measure_latency/3
on/2message handler.
start_gen_component/5

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

on/2

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

message handler

init/1

init(X1 ::
         {pid(),
          comm:mypid(),
          {gossip_vivaldi:network_coordinate(),
           gossip_vivaldi:est_error()}}) ->
        state()

measure_latency/3

measure_latency(RemotePid :: comm:mypid(),
                RemoteCoordinate ::
                    gossip_vivaldi:network_coordinate(),
                RemoteConfidence :: gossip_vivaldi:est_error()) ->
                   {ok, pid()}

check_config/0

check_config() -> boolean()

Checks whether config parameters of the vivaldi_latency process exist and are valid.


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