Skip to content

Commit d036089

Browse files
committed
Print timing info to logDebug.
1 parent e66f1b1 commit d036089

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ class DecisionTree (private val strategy: Strategy) extends Serializable with Lo
167167

168168
timer.stop("total")
169169

170-
//println(timer) // Print internal timing info.
170+
logDebug("Internal timing for DecisionTree:")
171+
logDebug(s"$timer")
171172

172173
new DecisionTreeModel(topNode, strategy.algo)
173174
}

mllib/src/main/scala/org/apache/spark/mllib/tree/impl/TimeTracker.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ class TimeTracker extends Serializable {
6767
* Print all timing results in seconds.
6868
*/
6969
override def toString: String = {
70-
s"Timing\n" +
71-
totals.map { case (label, elapsed) =>
72-
s" $label: ${elapsed / 1e9}"
73-
}.mkString("\n")
70+
totals.map { case (label, elapsed) =>
71+
s" $label: ${elapsed / 1e9}"
72+
}.mkString("\n")
7473
}
7574
}

0 commit comments

Comments
 (0)