13#ifndef ML_PROCESSING_TIME_LINE_H
14#define ML_PROCESSING_TIME_LINE_H
56 int startEntry(
const std::string& info,
int processingScope = 0);
60 void load(std::ifstream& stream);
62 void save(std::ofstream& stream);
74 const std::vector<Entry>&
getEntries()
const {
return _entries; }
76 const std::string&
name()
const {
return _name; }
81 std::vector<Entry> _entries;
111 void save(
const std::string& fileName);
114 void load(
const std::string& fileName);
120 std::vector<TimeLine*> _timeLines;
Timeline for a single thread.
double getMinimumTime()
searches and returns the smallest time point that was measured
int startEntry(const std::string &info, int processingScope=0)
starts an entry and returns its index
void copyFrom(TimeLine &timeline)
void stopEntry(int entryIndex)
stops the entry at the given index
const std::vector< Entry > & getEntries() const
double getMaximumTime()
searches and returns the highest time point that was measured
const std::string & name() const
TimeLine(ProcessingTimeLine *owner, const std::string &name)
void load(std::ifstream &stream)
void save(std::ofstream &stream)
Stores a processing time line for multiple threads.
double getMinimumTime()
searches and returns the smallest time point that was measured over all time lines
void resetRunningTime()
reset the running time (which affects getRunningTime())
void load(const std::string &fileName)
read timeline from disk
void removeTimeLine(TimeLine *timeLine)
removes the given time line (and deletes it)
TimeLine * getTimeLine(int i) const
get time line with given index
TimeLine * addTimeLine(const std::string &name)
adds a time line with given name, ownership stays with ProcessingTimeLine
double getRunningTime()
get the current running time in seconds
double getMaximumTime()
searches and returns the highest time point that was measured over all time lines
void clear()
clears/removes the timelines
void resetTimeLines()
reset the time lines (without deleting them)
void save(const std::string &fileName)
save timeline to disk
int getNumTimeLines() const
get the number of time lines
void copyFrom(ProcessingTimeLine &timeline)
copy data from given timeline
Class to measure precise time intervals.
#define MLEXPORT
To export symbols from a dll/shared object, we need to mark them with the MLEXPORT symbol.