#include <StatisticEngine.h>
Public Member Functions | |
StatisticEngine (void) | |
~StatisticEngine (void) | |
void | openMeasureFile (string file) |
void | closeMeasureFile () |
void | start () |
void | stop () |
string | toString () |
void | createPlot () |
void | addPackets (int _packets=1) |
void | addBytes (int _bytes) |
void | addSkipped (int _skipped=1) |
void | addProtocol (Packet::PROTOCOL proto) |
void | resetBytes () |
Private Types | |
typedef struct StatisticEngine::_MEASURE_MARK | MEASURE_MARK |
typedef struct StatisticEngine::_MEASURE_MARK * | PMEASURE_MARK |
typedef pair< Packet::PROTOCOL, unsigned long long > | PROTOCOL_DISTRIBUTION_PAIR |
typedef map< Packet::PROTOCOL, unsigned long long > | PROTOCOL_DISTRIBUTION_MAP |
Private Member Functions | |
void | dumpMeasureMark (PMEASURE_MARK current, PMEASURE_MARK last) |
void | dumpString (string str) |
string | getStatistics () |
Static Private Member Functions | |
static void | timerhandler (void *userdata) |
Private Attributes | |
Timer | timer |
time_t | starttime |
time_t | endtime |
unsigned long long | packets |
unsigned long long | skipped |
unsigned long long | bytes |
ofstream | outfile |
string | measurefilename |
pthread_mutex_t | measuremutex |
MEASURE_MARK | lastmark |
PROTOCOL_DISTRIBUTION_MAP | protocolmap |
Classes | |
struct | _MEASURE_MARK |
typedef struct StatisticEngine::_MEASURE_MARK StatisticEngine::MEASURE_MARK [private] |
typedef struct StatisticEngine::_MEASURE_MARK * StatisticEngine::PMEASURE_MARK [private] |
typedef pair<Packet::PROTOCOL, unsigned long long> StatisticEngine::PROTOCOL_DISTRIBUTION_PAIR [private] |
typedef map<Packet::PROTOCOL, unsigned long long> StatisticEngine::PROTOCOL_DISTRIBUTION_MAP [private] |
StatisticEngine::StatisticEngine | ( | void | ) |
StatisticEngine::~StatisticEngine | ( | void | ) |
void StatisticEngine::openMeasureFile | ( | string | file | ) |
void StatisticEngine::closeMeasureFile | ( | ) |
void StatisticEngine::start | ( | ) |
void StatisticEngine::stop | ( | ) |
string StatisticEngine::toString | ( | ) |
void StatisticEngine::createPlot | ( | ) |
void StatisticEngine::addPackets | ( | int | _packets = 1 |
) |
void StatisticEngine::addBytes | ( | int | _bytes | ) |
void StatisticEngine::addSkipped | ( | int | _skipped = 1 |
) |
void StatisticEngine::addProtocol | ( | Packet::PROTOCOL | proto | ) |
void StatisticEngine::resetBytes | ( | ) |
void StatisticEngine::timerhandler | ( | void * | userdata | ) | [static, private] |
void StatisticEngine::dumpMeasureMark | ( | PMEASURE_MARK | current, | |
PMEASURE_MARK | last | |||
) | [private] |
void StatisticEngine::dumpString | ( | string | str | ) | [private] |
string StatisticEngine::getStatistics | ( | ) | [private] |
Timer StatisticEngine::timer [private] |
time_t StatisticEngine::starttime [private] |
time_t StatisticEngine::endtime [private] |
unsigned long long StatisticEngine::packets [private] |
unsigned long long StatisticEngine::skipped [private] |
unsigned long long StatisticEngine::bytes [private] |
ofstream StatisticEngine::outfile [private] |
string StatisticEngine::measurefilename [private] |
pthread_mutex_t StatisticEngine::measuremutex [private] |
MEASURE_MARK StatisticEngine::lastmark [private] |