Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix bug in count calculation when merging graphs

  • Loading branch information...
commit 7ce788581143a52b9d621579850104fc23b45a22 1 parent 3f5d500
Steve Gury authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/main/scala/Profiler.scala
3  src/main/scala/Profiler.scala
View
@@ -82,7 +82,8 @@ object Profiler {
case None => (name,node)
}
} ++ (smallest -- biggest.keys) // add node only present in smallest descendant list
- new CallGraph(name, Runnable, count + graph.count, newDescendants )
+ val newCount = newDescendants.values.foldLeft(0){ case (sum,g) => sum + g.count }
+ new CallGraph(name, Runnable, newCount, newDescendants )
}
else // in case of root inequality, return a new node with the two graphs as children
new CallGraph(name + "#" + graph.name, Runnable, count + graph.count, Map(name -> this, graph.name -> graph))
Please sign in to comment.
Something went wrong with that request. Please try again.