13#ifndef ML_PROCESSING_TIME_LINE_H
14#define ML_PROCESSING_TIME_LINE_H
56 int startEntry(
const std::string& info,
int processingScope = 0);
74 const std::vector<Entry>&
getEntries()
const {
return _entries; }
76 const std::string&
name()
const {
return _name; }
81 std::vector<Entry> _entries;
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::vector< Entry > & getEntries() const
double getMaximumTime()
Searches and returns the latest time point 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 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().
void load(const std::string &fileName)
Reads timeline from disk.
void removeTimeLine(TimeLine *timeLine)
Removes the given timeline and deletes it.
TimeLine * getTimeLine(int i) const
Returns the timeline with given index i.
TimeLine * addTimeLine(const std::string &name)
Adds a timeline with the given name. The ownership stays with ProcessingTimeLine.
double getRunningTime()
Returns the current running time in seconds.
double getMaximumTime()
Searches and returns the latest time point measured over all timelines.
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.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.