com.neeve.sma
Class MessageLatencyManager

java.lang.Object
  extended by java.lang.Thread
      extended by com.neeve.sma.MessageLatencyManager
All Implemented Interfaces:
Runnable

public final class MessageLatencyManager
extends Thread

Stores cross-stack message latencies.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static boolean captureMsgLatencyStats
          Contains whether messaging related latencies should be captured
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MessageLatencyManager(String name)
          Construct using the manager name
 
Method Summary
 MessageLatencyManager compute()
          Compute derived stats from the current sample set.
 StringBuilder get(StringBuilder sb, boolean csv)
          Format and stats into a string builder object
 com.neeve.stats.IStats.Latencies getCreateToSendLatencies()
          Get the c2o (create->send) latencies
 com.neeve.stats.IStats.Latencies getDeserializeLatencies()
          Get the d (deserialize) latencies
 com.neeve.stats.IStats.Latencies getDeserializeToReceiveLatencies()
          Get the d2i (post-deserialize->receive) latencies
 com.neeve.stats.IStats.Latencies getOriginToReceiveLatencies()
          Get the o2i (origin->receive) latencies
 com.neeve.stats.IStats.Latencies getSendToSerializeLatencies()
          Get the o2s (send->pre-serialize) latencies
 com.neeve.stats.IStats.Latencies getSerializeLatencies()
          Get the s (serialize) latencies
 com.neeve.stats.IStats.Latencies getSerializeToWireLatencies()
          Get the s2w (pre-serialize->pre-wire) latencies
 com.neeve.stats.IStats.Latencies getWireLatencies()
          Get the w (wire) latencies
 com.neeve.stats.IStats.Latencies getWireToDeserializeLatencies()
          Get the w2d (wire->pre-deserialize) latencies
 String name()
          Get the latency manager's name (must be unique system wide)
 void reset()
          Reset the latency manager
 void run()
          Implementation of Runnable.run()
 void shutdown()
          Shut down the latency stats manager
 void start()
          Overrides Thread.start()
 void update(MessageView view)
          Update message latencies
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

captureMsgLatencyStats

public static final boolean captureMsgLatencyStats
Contains whether messaging related latencies should be captured

Constructor Detail

MessageLatencyManager

public MessageLatencyManager(String name)
Construct using the manager name

Method Detail

name

public final String name()
Get the latency manager's name (must be unique system wide)


start

public final void start()
Overrides Thread.start()

Overrides:
start in class Thread

update

public final void update(MessageView view)
Update message latencies


compute

public final MessageLatencyManager compute()
Compute derived stats from the current sample set.


get

public final StringBuilder get(StringBuilder sb,
                               boolean csv)
Format and stats into a string builder object

Returns:
Returns the passed in string builder object.

getCreateToSendLatencies

public final com.neeve.stats.IStats.Latencies getCreateToSendLatencies()
Get the c2o (create->send) latencies


getSendToSerializeLatencies

public final com.neeve.stats.IStats.Latencies getSendToSerializeLatencies()
Get the o2s (send->pre-serialize) latencies


getSerializeLatencies

public final com.neeve.stats.IStats.Latencies getSerializeLatencies()
Get the s (serialize) latencies


getSerializeToWireLatencies

public final com.neeve.stats.IStats.Latencies getSerializeToWireLatencies()
Get the s2w (pre-serialize->pre-wire) latencies


getWireLatencies

public final com.neeve.stats.IStats.Latencies getWireLatencies()
Get the w (wire) latencies


getWireToDeserializeLatencies

public final com.neeve.stats.IStats.Latencies getWireToDeserializeLatencies()
Get the w2d (wire->pre-deserialize) latencies


getDeserializeLatencies

public final com.neeve.stats.IStats.Latencies getDeserializeLatencies()
Get the d (deserialize) latencies


getDeserializeToReceiveLatencies

public final com.neeve.stats.IStats.Latencies getDeserializeToReceiveLatencies()
Get the d2i (post-deserialize->receive) latencies


getOriginToReceiveLatencies

public final com.neeve.stats.IStats.Latencies getOriginToReceiveLatencies()
Get the o2i (origin->receive) latencies


reset

public final void reset()
Reset the latency manager


shutdown

public final void shutdown()
Shut down the latency stats manager


run

public final void run()
Implementation of Runnable.run()

Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2015 Neeve Research, LLC. All Rights Reserved.