Skip to content

Commit 32e6a0f

Browse files
committed
separate the logs of runtime for building an initial tree and seeking a better root
1 parent 8bf3c3e commit 32e6a0f

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

tree/tree.cpp

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,14 @@ void cmaple::Tree::doPlacementTemplate(std::ostream& out_stream) {
758758
// resize the annotations to match the number of nodes
759759
annotations.resize(nodes.size());
760760

761+
// show the runtime for building an initial tree
762+
auto end = getRealTime();
763+
if (cmaple::verbose_mode >= cmaple::VB_MAX) {
764+
cout << " - Time spent on building an initial tree: "
765+
<< std::setprecision(3) << end - start << endl;
766+
}
767+
start = getRealTime();
768+
761769
// don't keep the rooting position if users don't supply an input tree
762770
if (!from_input_tree && !params->allow_rerooting)
763771
{
@@ -838,14 +846,14 @@ void cmaple::Tree::doPlacementTemplate(std::ostream& out_stream) {
838846
}
839847
}
840848
}
849+
850+
// show the runtime for building an initial tree
851+
end = getRealTime();
852+
if (cmaple::verbose_mode >= cmaple::VB_MAX) {
853+
cout << " - Time spent on seeking a better root: "
854+
<< std::setprecision(3) << end - start << endl;
855+
}
841856
}
842-
843-
// show the runtime for building an initial tree
844-
auto end = getRealTime();
845-
if (cmaple::verbose_mode >= cmaple::VB_MAX) {
846-
cout << " - Time spent on building an initial tree: "
847-
<< std::setprecision(3) << end - start << endl;
848-
}
849857

850858

851859
// output log-likelihood of the tree

0 commit comments

Comments
 (0)