OoOJoin  0.0.1
The next generation of out-of-order join operator

The top entity to provide perf traces, please use this class only UNLESS you know what you are doing. More...

#include <Utils/ThreadPerf.hpp>

Collaboration diagram for INTELLI::ThreadPerf:

Classes

class  PerfPair
 a record pair of perf events More...
 
class  PerfTool
 

Public Member Functions

 ThreadPerf (int cpu)
 To setup this perf to specific cpu. More...
 
virtual void setPerfList ()
 To set up all your interest perf events.
 
void start ()
 To start perf tracing. More...
 
void end ()
 To end a perf tracing.
 
uint64_t getResultById (size_t idx)
 Get the perf result by its index of PerfPair. More...
 
uint64_t getResultByName (string name)
 Get the perf result by its name of of PerfPair. More...
 
ConfigMapPtr resultToConfigMap ()
 convert the perf result into a ConfigMap More...
 

Protected Types

typedef std::shared_ptr< PerfToolPerfToolPtr
 

Protected Member Functions

std::string getChValueAsString (size_t idx)
 

Protected Attributes

PerfToolPtr myTool
 
std::vector< PerfPairpairs
 To contain all of your interested perf events.
 
struct timeval tstart tend
 
uint64_t latency
 

Detailed Description

The top entity to provide perf traces, please use this class only UNLESS you know what you are doing.

Note
You may overwrite the setPerfList function for your own interested events
Warning
only works in Linux, and make sure you have opened perf in your kernel and have the access
Note
Requires the ConfigMap Util
General set up

Constructor & Destructor Documentation

◆ ThreadPerf()

INTELLI::ThreadPerf::ThreadPerf ( int  cpu)
inline

To setup this perf to specific cpu.

Parameters
cpu>=0 for any specific cpu, =-1 for all cpu that may run this process

Member Function Documentation

◆ getResultById()

uint64_t INTELLI::ThreadPerf::getResultById ( size_t  idx)
inline

Get the perf result by its index of PerfPair.

Parameters
idxThe index
Returns
The value

◆ getResultByName()

uint64_t INTELLI::ThreadPerf::getResultByName ( string  name)
inline

Get the perf result by its name of of PerfPair.

Parameters
idxThe index
Returns
The value

◆ resultToConfigMap()

ConfigMapPtr INTELLI::ThreadPerf::resultToConfigMap ( )
inline

convert the perf result into a ConfigMap

Returns
The key-value store of configMap, in shared pointer
Note
must stop after calling stop

◆ start()

void INTELLI::ThreadPerf::start ( )
inline

To start perf tracing.

Note
call after setPerfList

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