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 earliest time point 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::string & name() const
const std::vector< Entry > & getEntries() const
double getMaximumTime()
Searches and returns the latest time point measured.
TimeLine(ProcessingTimeLine *owner, const std::string &name)
void load(std::ifstream &stream)
void save(std::ofstream &stream)
Stores a processing timeline for multiple threads.
double getMinimumTime()
Searches and returns the earliest time point measured over all timelines.
void resetRunningTime()
Resets the running time, which affects getRunningTime().
TimeLine * addTimeLine(const std::string &name)
Adds a timeline with the given name. The ownership stays with ProcessingTimeLine.
void load(const std::string &fileName)
Reads timeline from disk.
void removeTimeLine(TimeLine *timeLine)
Removes the given timeline and deletes it.
double getRunningTime()
Returns the current running time in seconds.
double getMaximumTime()
Searches and returns the latest time point measured over all timelines.
TimeLine * getTimeLine(int i) const
Returns the timeline with given index i.
void clear()
Clears/removes the timelines.
void resetTimeLines()
Resets the timelines without deleting them.
void save(const std::string &fileName)
Saves timeline to disk.
int getNumTimeLines() const
Returns the number of timelines.
void copyFrom(ProcessingTimeLine &timeline)
Copies 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.