Atavism Version 2018.1AGIS API

atavism.server.util
Class TimeHistogram

java.lang.Object
  extended by atavism.server.util.TimeHistogram
All Implemented Interfaces:
java.lang.Runnable

public class TimeHistogram
extends java.lang.Object
implements java.lang.Runnable

This class maintains a histogram of times, and is used to report queue delay times in the server.


Field Summary
protected  int bucketCount
           
protected  java.lang.Long[] defaultTimeBounds
           
protected  java.lang.Integer[] histogram
           
protected  java.lang.String name
           
protected  int pointCount
           
protected  int reportingInterval
           
protected  java.lang.Boolean running
           
protected  java.lang.Long[] timeBounds
           
 
Constructor Summary
TimeHistogram(java.lang.String name)
           
TimeHistogram(java.lang.String name, java.lang.Integer reportingInterval)
           
TimeHistogram(java.lang.String name, java.lang.Integer reportingInterval, java.lang.Long[] timeBounds)
           
 
Method Summary
 void addTime(long time)
           
protected  java.lang.String formatTime(long t)
           
protected  java.lang.String histogramString(int index)
           
protected  void report()
           
 void run()
           
protected  void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

reportingInterval

protected int reportingInterval

running

protected java.lang.Boolean running

bucketCount

protected int bucketCount

pointCount

protected int pointCount

histogram

protected java.lang.Integer[] histogram

timeBounds

protected java.lang.Long[] timeBounds

defaultTimeBounds

protected java.lang.Long[] defaultTimeBounds
Constructor Detail

TimeHistogram

public TimeHistogram(java.lang.String name)

TimeHistogram

public TimeHistogram(java.lang.String name,
                     java.lang.Integer reportingInterval)

TimeHistogram

public TimeHistogram(java.lang.String name,
                     java.lang.Integer reportingInterval,
                     java.lang.Long[] timeBounds)
Method Detail

stop

public void stop()

addTime

public void addTime(long time)

start

protected void start()

run

public void run()
Specified by:
run in interface java.lang.Runnable

report

protected void report()

formatTime

protected java.lang.String formatTime(long t)

histogramString

protected java.lang.String histogramString(int index)


Copyright © 2018 Dragonsan Studios Sp. z o.o.