Cambridge SMT System
ucam::fsttools::StatsData Struct Reference

Contains data for statistics, i.e. allows timing actions and methods called during execution. More...

#include <data.stats.hpp>

Public Member Functions

 StatsData ()
 
void setTimeStart (const std::string &key)
 Store absolute timing value last thing, just before executing. More...
 
void setTimeEnd (const std::string &key)
 Store absolute timing value right after an execution. More...
 
void write (ucam::util::oszfstream &o)
 Dumps time measurements as a list of pairs key1:time1 key2:time2 ... Each key is expected to be semantically related to the function(s). Time in ms. More...
 

Public Attributes

unsigned lpcount
 local pruning More...
 
unsigned numcats
 number of syntactic categories. More...
 
unordered_map< std::string, std::vector< timeb > > time1
 Stores absolute time for a key prior to executing function. More...
 
unordered_map< std::string, std::vector< timeb > > time2
 Stores absolute time for a key after executing function. More...
 
unordered_map< unsigned, unsigned > rulecounts
 cyk rule counts More...
 
unordered_map< unsigned, unsigned > numstates
 number of states for full and pruned lattices through the cyk grid More...
 
unordered_map< unsigned, unsigned > numprunedstates
 
std::string message
 Any other general stuff appended here – to be printed in stats file. More...
 

Detailed Description

Contains data for statistics, i.e. allows timing actions and methods called during execution.

Remarks
Timing in ms. Each measurement is assigned a specific key. The key is expected to be meaningful to the user. Finally, methods provided to dump a list of pairs: key1:time1 key2:time2 ...

Definition at line 88 of file data.stats.hpp.

Constructor & Destructor Documentation

ucam::fsttools::StatsData::StatsData ( )
inline

Definition at line 90 of file data.stats.hpp.

Member Function Documentation

void ucam::fsttools::StatsData::setTimeEnd ( const std::string &  key)
inline

Store absolute timing value right after an execution.

Definition at line 122 of file data.stats.hpp.

void ucam::fsttools::StatsData::setTimeStart ( const std::string &  key)
inline

Store absolute timing value last thing, just before executing.

Definition at line 116 of file data.stats.hpp.

void ucam::fsttools::StatsData::write ( ucam::util::oszfstream o)
inline

Dumps time measurements as a list of pairs key1:time1 key2:time2 ... Each key is expected to be semantically related to the function(s). Time in ms.

Parameters
oFile or pipe to dump timings

Definition at line 137 of file data.stats.hpp.

Member Data Documentation

unsigned ucam::fsttools::StatsData::lpcount

local pruning

Definition at line 96 of file data.stats.hpp.

std::string ucam::fsttools::StatsData::message

Any other general stuff appended here – to be printed in stats file.

Definition at line 113 of file data.stats.hpp.

unsigned ucam::fsttools::StatsData::numcats

number of syntactic categories.

Definition at line 98 of file data.stats.hpp.

unordered_map<unsigned, unsigned> ucam::fsttools::StatsData::numprunedstates

Definition at line 110 of file data.stats.hpp.

unordered_map<unsigned, unsigned> ucam::fsttools::StatsData::numstates

number of states for full and pruned lattices through the cyk grid

Definition at line 109 of file data.stats.hpp.

unordered_map<unsigned, unsigned> ucam::fsttools::StatsData::rulecounts

cyk rule counts

Definition at line 106 of file data.stats.hpp.

unordered_map<std::string, std::vector<timeb> > ucam::fsttools::StatsData::time1

Stores absolute time for a key prior to executing function.

Definition at line 101 of file data.stats.hpp.

unordered_map<std::string, std::vector<timeb> > ucam::fsttools::StatsData::time2

Stores absolute time for a key after executing function.

Definition at line 103 of file data.stats.hpp.


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