--- a/ProfileTree.st Wed Mar 19 19:33:25 1997 +0100
+++ b/ProfileTree.st Wed Mar 19 19:33:42 1997 +0100
@@ -144,7 +144,7 @@
addChain:aCallChain
"{ Pragma: +optSpeed }"
- "merge a chain into the receviers tree"
+ "merge a chain into the receivers tree"
|node found subTree chain called|
@@ -166,7 +166,7 @@
].
].
] ifFalse:[
- node called:(OrderedCollection new)
+ node called:(called := OrderedCollection new)
].
found ifFalse:[
subTree := ProfileTree new.
@@ -175,17 +175,15 @@
class:chain methodClass
isBlock:chain isBlock.
- node called add:subTree.
+ called add:subTree.
node := subTree.
chain := chain rest
]
].
- node incrementTotalTally.
- node incrementLeafTally.
+ node incrementTotalAndLeafTally.
- "Modified: 18.5.1996 / 19:02:28 / cg"
!
computePercentage:total
@@ -219,6 +217,27 @@
"Modified: 18.5.1996 / 19:02:59 / cg"
!
+incrementTotalAndLeafTally
+ "{ Pragma: +optSpeed }"
+
+ "count as leaf and total"
+
+ leafTally isNil ifTrue:[
+ leafTally := 1
+ ] ifFalse:[
+ leafTally := leafTally + 1.
+ ].
+
+ totalTally isNil ifTrue:[
+ totalTally := 1
+ ] ifFalse:[
+ totalTally := totalTally + 1.
+ ].
+
+ "Modified: 18.5.1996 / 19:02:59 / cg"
+ "Created: 19.3.1997 / 19:27:27 / cg"
+!
+
incrementTotalTally
"{ Pragma: +optSpeed }"
@@ -493,5 +512,5 @@
!ProfileTree class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/ProfileTree.st,v 1.15 1997-03-19 18:18:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/ProfileTree.st,v 1.16 1997-03-19 18:33:42 cg Exp $'
! !