OoOJoin  0.0.1
The next generation of out-of-order join operator
OoOJoin::TestBench Class Reference

The test bench class to feed data. More...

Collaboration diagram for OoOJoin::TestBench:

Public Member Functions

void setDataLoader (std::string tag, ConfigMapPtr globalCfg)
 load a dataset according to the tag More...
 
size_t sizeOfS ()
 get the size of loaded s tuple More...
 
size_t sizeOfR ()
 get the size of loaded r tuple More...
 
void setDataSet (std::vector< TrackTuplePtr > _r, std::vector< TrackTuplePtr > _s)
 set the dataset to feed More...
 
bool setOperator (AbstractOperatorPtr op, ConfigMapPtr cfg)
 set the operator to test More...
 
size_t inOrderTest (bool additionalSort)
 test the operator under in order arrival More...
 
size_t OoOTest (bool additionalSort)
 test the operator under OoO arrival More...
 
void logRTuples (bool skipZero=false)
 print the rTuples to logging system More...
 
bool saveRTuplesToFile (string fname, bool skipZero=false)
 save the rTuples to a file More...
 
bool saveSTuplesToFile (string fname, bool skipZero=false)
 save the sTuples to a file More...
 
double getAvgLatency ()
 to compute average latency after run a test More...
 
double getThroughput ()
 to compute the throughput after run a test More...
 
double getLatencyPercentage (double fraction)
 to compute the latency t such that fraction of latency is below t More...
 
ConfigMapPtr getTimeBreakDown ()
 get the break down information of processing time from the join operator tested More...
 

Public Attributes

std::vector< TrackTuplePtrrTuple
 
std::vector< TrackTuplePtrsTuple
 
AbstractOperatorPtr testOp = nullptr
 
ConfigMapPtr opConfig
 
size_t AQPResult = 0
 

Protected Member Functions

void inOrderSort (std::vector< TrackTuplePtr > &arr)
 
void OoOSort (std::vector< TrackTuplePtr > &arr)
 
void inlineTest (void)
 
void forceInOrder (std::vector< TrackTuplePtr > &arr)
 

Protected Attributes

tsType timeStep = 1
 

Detailed Description

The test bench class to feed data.

Note
Require config if used -"timeStep" U64 The simulation time step in us

Member Function Documentation

◆ getAvgLatency()

double OoOJoin::TestBench::getAvgLatency ( )

to compute average latency after run a test

Returns
the latency in us

◆ getLatencyPercentage()

double OoOJoin::TestBench::getLatencyPercentage ( double  fraction)

to compute the latency t such that fraction of latency is below t

Parameters
fractionThe fraction you want to set
Returns
the latency in us

◆ getThroughput()

double OoOJoin::TestBench::getThroughput ( )

to compute the throughput after run a test

Returns
the throughput in tuples/s

◆ getTimeBreakDown()

ConfigMapPtr OoOJoin::TestBench::getTimeBreakDown ( )

get the break down information of processing time from the join operator tested

Warning
should check the nullptr of output
Returns
The ConfigMapPtr which contains breakdown information, null if no breakdown supported

◆ inOrderTest()

size_t OoOJoin::TestBench::inOrderTest ( bool  additionalSort)

test the operator under in order arrival

Parameters
additionalSortwhether or not additionally sort the input
Returns
the joined result

◆ logRTuples()

void OoOJoin::TestBench::logRTuples ( bool  skipZero = false)

print the rTuples to logging system

Parameters
skipZeroWhether skip the tuples whose processed time is zero

◆ OoOTest()

size_t OoOJoin::TestBench::OoOTest ( bool  additionalSort)

test the operator under OoO arrival

Parameters
additionalSortwhether or not additionally sort the input
Returns
the joined result

◆ saveRTuplesToFile()

bool OoOJoin::TestBench::saveRTuplesToFile ( string  fname,
bool  skipZero = false 
)

save the rTuples to a file

Parameters
fnamethe name of file
skipZeroWhether skip the tuples whose processed time is zero
Returns
whether the file is written

◆ saveSTuplesToFile()

bool OoOJoin::TestBench::saveSTuplesToFile ( string  fname,
bool  skipZero = false 
)

save the sTuples to a file

Parameters
fnamethe name of file
skipZeroWhether skip the tuples whose processed time is zero
Returns
whether the file is written

◆ setDataLoader()

void OoOJoin::TestBench::setDataLoader ( std::string  tag,
ConfigMapPtr  globalCfg 
)

load a dataset according to the tag

Parameters
tagthe name tag of DataLoader
globalCfgthe global config file to load dataset

◆ setDataSet()

void OoOJoin::TestBench::setDataSet ( std::vector< TrackTuplePtr _r,
std::vector< TrackTuplePtr _s 
)

set the dataset to feed

Parameters
_rThe r tuples
_sThe s tuples

◆ setOperator()

bool OoOJoin::TestBench::setOperator ( OoOJoin::AbstractOperatorPtr  op,
ConfigMapPtr  cfg 
)

set the operator to test

Parameters
opshared pointer to operator
cfgthe config file to operator
Returns
whether the setting is successful

◆ sizeOfR()

size_t OoOJoin::TestBench::sizeOfR ( )
inline

get the size of loaded r tuple

Returns
the size

◆ sizeOfS()

size_t OoOJoin::TestBench::sizeOfS ( )
inline

get the size of loaded s tuple

Returns
the size

The documentation for this class was generated from the following files: