[squeak-dev] Re: How to profile a server image?
Andreas Raab
andreas.raab at gmx.de
Wed Mar 4 03:56:25 UTC 2009
Juan Vuletich wrote:
> I understand that for a server having an variable (and big) number of
> processes it is not useful. But for our case, an application with a
> small and fixed set of processes, the first question we want to answer
> is "which is the process using all the cpu?". Please see the message I
> just sent on this thread to see an example of what I want.
Okay, I cracked ;-) Attached you'll find patches for a message tally
version which does per-process reporting if so desired. I've moved this
out of the arguments and into class variables so you get/set either
priority or preference via, e.g.:
MessageTally spyPriority: <new priority>
MessageTally showProcesses: <true/false>
The defaults are such that the priority is TimerPriority-1 and
showProcesses is on. With it, your example gives the result shown below.
Let me know if this works for you (or anyone else). Comments welcome.
Cheers,
- Andreas
- 101 tallies, 101 msec.
**Tree**
--------------------------------
Process: (40) 3420: [] in UndefinedObject>>DoIt {[3.14159 printString.
Processor yield]}
--------------------------------
23.8% {24ms} Float(Number)>>printStringBase:
21.8% {22ms} Float>>printOn:base:
20.8% {21ms} Float>>absPrintOn:base:
6.9% {7ms} False>>|
5.9% {6ms} primitives
3.0% {3ms} WriteStream>>nextPut:
--------------------------------
Process: (40) 1426: [] in UndefinedObject>>DoIt {[30 factorial.
Processor yield]}
--------------------------------
29.7% {30ms} SmallInteger(Integer)>>factorial
26.7% {27ms} SmallInteger(Integer)>>factorial
|24.8% {25ms} SmallInteger(Integer)>>factorial
| 22.8% {23ms} SmallInteger(Integer)>>factorial
| 21.8% {22ms} SmallInteger(Integer)>>factorial
| 20.8% {21ms} SmallInteger(Integer)>>factorial
| 16.8% {17ms} SmallInteger(Integer)>>factorial
| |14.9% {15ms} SmallInteger(Integer)>>factorial
| | 13.9% {14ms} SmallInteger(Integer)>>factorial
| | 10.9% {11ms} SmallInteger(Integer)>>factorial
| | |8.9% {9ms} SmallInteger(Integer)>>factorial
| | | 7.9% {8ms} SmallInteger(Integer)>>factorial
| | | 6.9% {7ms} SmallInteger(Integer)>>factorial
| | | 5.0% {5ms} SmallInteger(Integer)>>factorial
| | | 5.0% {5ms} SmallInteger(Integer)>>factorial
| | | 3.0% {3ms}
SmallInteger(Integer)>>factorial
| | | 3.0% {3ms}
SmallInteger(Integer)>>factorial
| | 3.0% {3ms} SmallInteger>>*
| 4.0% {4ms} SmallInteger>>*
3.0% {3ms} SmallInteger>>*
--------------------------------
Process: (40) 3777: [] in UndefinedObject>>DoIt {[30 factorial.
Processor yield]}
--------------------------------
40.6% {41ms} SmallInteger(Integer)>>factorial
38.6% {39ms} SmallInteger(Integer)>>factorial
37.6% {38ms} SmallInteger(Integer)>>factorial
35.6% {36ms} SmallInteger(Integer)>>factorial
30.7% {31ms} SmallInteger(Integer)>>factorial
|26.7% {27ms} SmallInteger(Integer)>>factorial
| |23.8% {24ms} SmallInteger(Integer)>>factorial
| | |22.8% {23ms} SmallInteger(Integer)>>factorial
| | | 21.8% {22ms} SmallInteger(Integer)>>factorial
| | | 21.8% {22ms} SmallInteger(Integer)>>factorial
| | | 19.8% {20ms} SmallInteger(Integer)>>factorial
| | | 17.8% {18ms} SmallInteger(Integer)>>factorial
| | | 14.9% {15ms} SmallInteger(Integer)>>factorial
| | | |9.9% {10ms} SmallInteger(Integer)>>factorial
| | | | |7.9% {8ms}
SmallInteger(Integer)>>factorial
| | | | | 5.9% {6ms}
SmallInteger(Integer)>>factorial
| | | | | 3.0% {3ms} SmallInteger>>*
| | | | | 3.0% {3ms}
SmallInteger(Integer)>>factorial
| | | |5.0% {5ms} SmallInteger>>*
| | | | 3.0% {3ms} primitives
| | | 3.0% {3ms} SmallInteger>>*
| |3.0% {3ms} SmallInteger>>*
|4.0% {4ms} SmallInteger>>*
5.0% {5ms} SmallInteger>>*
3.0% {3ms} primitives
**Leaves**
51.5% {52ms} SmallInteger>>*
7.9% {8ms} SmallInteger(Number)>>negative
6.9% {7ms} False>>|
5.9% {6ms} Float>>absPrintOn:base:
5.0% {5ms} SmallInteger(Integer)>>*
5.0% {5ms} False(ProtoObject)>>~~
4.0% {4ms} SmallInteger(Integer)>>factorial
**Memory**
old +0 bytes
young -70,492 bytes
used -70,492 bytes
free +70,492 bytes
**GCs**
full 0 totalling 0ms (0.0% uptime)
incr 17 totalling 13ms (13.0% uptime), avg 1.0ms
tenures 0
root table 0 overflows
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MessageTallyEnh-ar.2.cs
Type: text/x-csharp
Size: 8280 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090303/9646508d/MessageTallyEnh-ar.2.bin
More information about the Squeak-dev
mailing list
|