edu.usc.bg
Class Distribution

java.lang.Object
  extended by java.lang.Thread
      extended by edu.usc.bg.Distribution
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
PoissonDistribution, RandomDistribution, UniformDistribution

public class Distribution
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static java.util.concurrent.atomic.AtomicBoolean flag
           
static double granularity
           
static java.util.concurrent.Semaphore QS
           
static java.util.ArrayList<Request> queue
           
static java.util.HashMap<java.lang.Integer,Times> requestStats
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Distribution()
           
Distribution(DB db, boolean dotransactions, Workload workload, int threadid, int threadcount, java.util.Properties props, int opcount, double targetperthreadperms, boolean warmup, double lambda, long maxexecutiontime, long warmupTime, int distributionType)
          Constructor.
 
Method Summary
 int getActsDone()
           
 int getOpsDone()
           
 boolean initThread()
           
 void run()
           
 
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, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

granularity

public static double granularity

queue

public static java.util.ArrayList<Request> queue

QS

public static java.util.concurrent.Semaphore QS

requestStats

public static java.util.HashMap<java.lang.Integer,Times> requestStats

flag

public static java.util.concurrent.atomic.AtomicBoolean flag
Constructor Detail

Distribution

public Distribution(DB db,
                    boolean dotransactions,
                    Workload workload,
                    int threadid,
                    int threadcount,
                    java.util.Properties props,
                    int opcount,
                    double targetperthreadperms,
                    boolean warmup,
                    double lambda,
                    long maxexecutiontime,
                    long warmupTime,
                    int distributionType)
Constructor.

Parameters:
db - The DB implementation to use.
dotransactions - True to do transactions, false to insert data or create schema.
workload - The workload to use.
threadid - The id of this thread.
threadcount - The total number of threads.
props - The properties defining the experiment.
opcount - The number of operations (transactions or inserts) to do.
targetperthreadperms - Target number of operations per thread per ms.
warmup - Identifies if its the warmup phase so update requests would not be issued.

Distribution

public Distribution()
Method Detail

getOpsDone

public int getOpsDone()

getActsDone

public int getActsDone()

initThread

public boolean initThread()

run

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