Skip to content

Commit e5b077d

Browse files
committed
add distributed timer to multitimer
1 parent 3dd9b31 commit e5b077d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mllib/src/main/scala/org/apache/spark/ml/tree/impl/RandomForest.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ private[spark] object RandomForest extends Logging {
177177
Range(0, numTrees).foreach(treeIndex => nodeQueue.enqueue((treeIndex, topNodes(treeIndex))))
178178
multiTimer.addLocal("findBestSplits")
179179
multiTimer.addLocal("chooseSplits")
180+
multiTimer.addDistributed("binsToBestSplit")
180181

181182
while (nodeQueue.nonEmpty) {
182183
// Collect some nodes to split, and choose features for each node (if subsampling).
@@ -549,8 +550,10 @@ private[spark] object RandomForest extends Logging {
549550
}
550551

551552
// find best split for each node
553+
multiTimer("binsToBestSplit").start()
552554
val (split: Split, stats: ImpurityStats) =
553555
binsToBestSplit(aggStats, splits, featuresForNode, nodes(nodeIndex))
556+
multiTimer("binsToBestSplit").stop()
554557
(nodeIndex, (split, stats))
555558
}.collectAsMap()
556559

0 commit comments

Comments
 (0)