AllianceDB  0.0.1
AllianceDB is an open-source suite, including benchmarks and libs for evaluating and improving stream operation algorithms on modern hardwares.

The all-in-on perf class for thread. More...

#include <Utils/ThreadPerf.h>

Collaboration diagram for INTELLI::ThreadPerf:

Public Member Functions

 ThreadPerf (int cpu)
 To start perf this thread at specific cpu, with default perf events. More...
 
 ThreadPerf (int cpu, vector< PerfPair > customPair)
 To start perf this thread at specific cpu, with customized perf events. More...
 
void start ()
 start all registered perf More...
 
uint64_t getResultById (int idx)
 Get the perf result by event id. More...
 
uint64_t getResultByName (string name)
 Get the perf result by event tag string. More...
 
void end ()
 end all registered perf More...
 
string headStringPrintf (void)
 get the head string for print a result sheet More...
 
string headStringCsv (void)
 get the head string for csv file of a result sheet More...
 
string resultStringPrintf (void)
 get the result string for print a result sheet More...
 
string resultStringCsv (void)
 get the result string for csv file a result sheet More...
 

Protected Member Functions

string getChValueAsString (size_t idx)
 
uint64_t getRunTime (void)
 

Protected Attributes

PerfToolPtr myTool
 
vector< PerfPairpairs
 
struct timeval ts te
 
uint64_t latency
 

Detailed Description

The all-in-on perf class for thread.

Note
You should enable perf in linux kernel and have root right to access it. For events not supported, the tool will mark an "NA" in string

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