15 #include "imstkTimer.h" 33 static constexpr
int SolverTime_ms = 0;
34 static constexpr
int NumConstraints = 1;
35 static constexpr
int AverageC = 2;
42 static constexpr
char const* SolverTime_ms =
"SolverTime_ms";
43 static constexpr
char const* NumConstraints =
"NumConstraints";
44 static constexpr
char const* AverageC =
"AverageC";
52 enum class eDecimalFormat_Type { SystemFormatting = 0, DefaultFloat, FixedMantissa, SignificantDigits };
54 void useTabDelimiter() { m_delimiter =
'\t'; }
55 void useCommaDelimiter() { m_delimiter =
','; }
56 void setFilename(
const std::string& fn) { m_filename = fn; }
68 void probe(
int idx,
double value);
76 int probe(
const std::string& name,
double value);
104 double getValue(
int idx);
105 double getValue(
const std::string& name);
106 std::string getName(
int idx);
118 double value = std::numeric_limits<double>::quiet_NaN();
119 std::streamsize precision = 3;
123 std::string m_filename;
125 std::vector<Element> m_elements;
126 std::ofstream m_file;
127 std::map<int, StopWatch> m_timers;
132 Element& getElement(std::string
const& name);
Header names of the common data values to track.
void streamProbesToFile(double time)
Write the current probe values to a row in the data file.
StopWatch & getStopWatch(int idx)
An available timer for each data item tracked.
Common data values to track.
Stop Watch utility class.
void probe(int idx, double value)
Track a data value associated with a header id.
int configureProbe(const std::string &name, std::streamsize precision=3, eDecimalFormat_Type notation=eDecimalFormat_Type::SystemFormatting)
Create and configure a probe and how it is written to file.
eDecimalFormat_Type
C++ I/O manipulation flags.
Store time based data to write to a file.
void probeElapsedTime_s(int idx)
Track a time duration associated with a header.