rename
parent
30670ab1a5
commit
6e4d1fa1cc
|
|
@ -107,7 +107,7 @@ void TimingOutline::print(const std::string& outline) const {
|
|||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
void TimingOutline::print_csv_header(bool addLineBreak) const {
|
||||
void TimingOutline::printCsvHeader(bool addLineBreak) const {
|
||||
#ifdef GTSAM_USE_BOOST_FEATURES
|
||||
// Order is (CPU time, number of times, wall time, time + children in seconds,
|
||||
// min time, max time)
|
||||
|
|
@ -116,14 +116,14 @@ void TimingOutline::print_csv_header(bool addLineBreak) const {
|
|||
<< "," << label_ + " min time (s)" << "," << label_ + "max time(s)"
|
||||
<< ",";
|
||||
// Order children
|
||||
typedef FastMap<size_t, std::shared_ptr<TimingOutline> > ChildOrder;
|
||||
typedef FastMap<size_t, std::shared_ptr<TimingOutline>> ChildOrder;
|
||||
ChildOrder childOrder;
|
||||
for (const ChildMap::value_type& child : children_) {
|
||||
childOrder[child.second->myOrder_] = child.second;
|
||||
}
|
||||
// Print children
|
||||
for (const ChildOrder::value_type& order_child : childOrder) {
|
||||
order_child.second->print_csv_header();
|
||||
order_child.second->printCsvHeader();
|
||||
}
|
||||
if (addLineBreak) {
|
||||
std::cout << std::endl;
|
||||
|
|
@ -133,21 +133,21 @@ void TimingOutline::print_csv_header(bool addLineBreak) const {
|
|||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
void TimingOutline::print_csv(bool addLineBreak) const {
|
||||
void TimingOutline::printCsv(bool addLineBreak) const {
|
||||
#ifdef GTSAM_USE_BOOST_FEATURES
|
||||
// Order is (CPU time, number of times, wall time, time + children in seconds,
|
||||
// min time, max time)
|
||||
std::cout << self() << "," << n_ << "," << wall() << "," << secs() << ","
|
||||
<< min() << "," << max() << ",";
|
||||
// Order children
|
||||
typedef FastMap<size_t, std::shared_ptr<TimingOutline> > ChildOrder;
|
||||
typedef FastMap<size_t, std::shared_ptr<TimingOutline>> ChildOrder;
|
||||
ChildOrder childOrder;
|
||||
for (const ChildMap::value_type& child : children_) {
|
||||
childOrder[child.second->myOrder_] = child.second;
|
||||
}
|
||||
// Print children
|
||||
for (const ChildOrder::value_type& order_child : childOrder) {
|
||||
order_child.second->print_csv(false);
|
||||
order_child.second->printCsv(false);
|
||||
}
|
||||
if (addLineBreak) {
|
||||
std::cout << std::endl;
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ namespace gtsam {
|
|||
* @param addLineBreak Flag indicating if a line break should be added at
|
||||
* the end. Only used at the top-leve.
|
||||
*/
|
||||
GTSAM_EXPORT void print_csv_header(bool addLineBreak = false) const;
|
||||
GTSAM_EXPORT void printCsvHeader(bool addLineBreak = false) const;
|
||||
|
||||
/**
|
||||
* @brief Print the times recursively from parent to child in CSV format.
|
||||
|
|
@ -220,7 +220,7 @@ namespace gtsam {
|
|||
* @param addLineBreak Flag indicating if a line break should be added at
|
||||
* the end. Only used at the top-leve.
|
||||
*/
|
||||
GTSAM_EXPORT void print_csv(bool addLineBreak = false) const;
|
||||
GTSAM_EXPORT void printCsv(bool addLineBreak = false) const;
|
||||
|
||||
GTSAM_EXPORT const std::shared_ptr<TimingOutline>&
|
||||
child(size_t child, const std::string& label, const std::weak_ptr<TimingOutline>& thisPtr);
|
||||
|
|
@ -292,11 +292,11 @@ inline void tictoc_print_() {
|
|||
::gtsam::internal::gTimingRoot->print(); }
|
||||
|
||||
// print timing in CSV format
|
||||
inline void tictoc_print_csv_(bool displayHeader = false) {
|
||||
inline void tictoc_printCsv_(bool displayHeader = false) {
|
||||
if (displayHeader) {
|
||||
::gtsam::internal::gTimingRoot->print_csv_header(true);
|
||||
::gtsam::internal::gTimingRoot->printCsvHeader(true);
|
||||
}
|
||||
::gtsam::internal::gTimingRoot->print_csv(true);
|
||||
::gtsam::internal::gTimingRoot->printCsv(true);
|
||||
}
|
||||
|
||||
// print mean and standard deviation
|
||||
|
|
|
|||
Loading…
Reference in New Issue