Levente Uzonyi uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ul.244.mcz ==================== Summary ==================== Name: System-ul.244 Author: ul Time: 5 February 2010, 9:55:52.891 pm UUID: 9c866c62-8a84-384d-b122-0fe169b58964 Ancestors: System-nice.243 - don't use asSortedCollection for sorting - minor cleanup - add missing method: PseudoClass >> #selectorsDo: (probably there are more missing methods) =============== Diff against System-nice.243 =============== Item was changed: ----- Method: MessageTally>>leavesPrintExactOn: (in category 'printing') ----- leavesPrintExactOn: aStream | dict | dict := IdentityDictionary new: 100. self leavesInto: dict fromSender: nil. + dict values sort - dict asSortedCollection do: [ :node | node printOn: aStream total: tally totalTime: nil tallyExact: true. node printSenderCountsOn: aStream ]! Item was added: + ----- Method: PseudoClass>>selectorsDo: (in category 'methods') ----- + selectorsDo: aBlock + + ^self sourceCode keysDo: aBlock! Item was changed: ----- Method: MessageTally>>rootPrintOn:total:totalTime:threshold: (in category 'printing') ----- rootPrintOn: aStream total: total totalTime: totalTime threshold: threshold | groups sons | sons := self sonsOver: threshold. groups := sons groupBy: [ :aTally | aTally process] having: [ :g | true]. + groups keysAndValuesDo: [ :p :g | - groups do:[:g| - | p | - p := g anyOne process. (reportOtherProcesses or: [ p notNil ]) ifTrue: [ aStream nextPutAll: '--------------------------------'; cr. aStream nextPutAll: 'Process: ', (p ifNil: [ 'other processes'] ifNotNil: [ p browserPrintString]); cr. aStream nextPutAll: '--------------------------------'; cr. + g sort do:[:aSon | - g asSortedCollection do:[:aSon | aSon treePrintOn: aStream tabs: OrderedCollection new thisTab: '' total: total totalTime: totalTime tallyExact: false orThreshold: threshold]]. ]! Item was changed: ----- Method: MessageTally>>printSenderCountsOn: (in category 'printing') ----- printSenderCountsOn: aStream | mergedSenders | mergedSenders := IdentityDictionary new. senders do: [:node | | mergedNode | mergedNode := mergedSenders at: node method ifAbsent: [nil]. mergedNode == nil ifTrue: [mergedSenders at: node method put: node] ifFalse: [mergedNode bump: node tally]]. + mergedSenders values sort do: - mergedSenders asSortedCollection do: [:node | 10 to: node tally printString size by: -1 do: [:i | aStream space]. node printOn: aStream total: tally totalTime: nil tallyExact: true]! Item was changed: ----- Method: MessageTally>>treePrintOn:tabs:thisTab:total:totalTime:tallyExact:orThreshold: (in category 'printing') ----- treePrintOn: aStream tabs: tabs thisTab: myTab total: total totalTime: totalTime tallyExact: isExact orThreshold: threshold | sons | tabs do: [:tab | aStream nextPutAll: tab]. tabs size > 0 ifTrue: [self printOn: aStream total: total totalTime: totalTime tallyExact: isExact]. sons := isExact ifTrue: [receivers] ifFalse: [self sonsOver: threshold]. sons isEmpty ifFalse: [tabs addLast: myTab. + sons sort. + 1 to: sons size do: [ :i | + | sonTab | + sonTab := i < sons size ifTrue: [' |'] ifFalse: [' ']. + (sons at: i) + treePrintOn: aStream + tabs: (tabs size < self maxTabs + ifTrue: [tabs] + ifFalse: [(tabs select: [:x | x = '[']) copyWith: '[']) + thisTab: sonTab + total: total + totalTime: totalTime + tallyExact: isExact + orThreshold: threshold]. - sons := sons asSortedCollection. - (1 to: sons size) do: - [:i | | sonTab | - sonTab := i < sons size ifTrue: [' |'] ifFalse: [' ']. - (sons at: i) - treePrintOn: aStream - tabs: (tabs size < self maxTabs - ifTrue: [tabs] - ifFalse: [(tabs select: [:x | x = '[']) copyWith: '[']) - thisTab: sonTab - total: total - totalTime: totalTime - tallyExact: isExact - orThreshold: threshold]. tabs removeLast]! Item was changed: ----- Method: MessageTally>>leavesPrintOn:threshold: (in category 'printing') ----- leavesPrintOn: aStream threshold: threshold | dict | dict := IdentityDictionary new: 100. self leavesInto: dict fromSender: nil. + (dict values select: [:node | node tally > threshold]) + sort do: [:node | - (dict asOrderedCollection - select: [:node | node tally > threshold]) - asSortedCollection do: [:node | node printOn: aStream total: tally totalTime: time tallyExact: false ]! |
Free forum by Nabble | Edit this page |