[Glass] Profiling beyond ExecBlock >> valueWithPossibleArguments: ?
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Wed Feb 3 12:12:45 PST 2016
I just ran your test using tODE (`pf start` and `pf view`) which uses
ProfMonitor in GemStone 3.2.9 and I got an answer that makes sense:
aTDProfMonitor
--------------------
TALLYING: execTime
elapsed CPU time: 1710 ms
total ms % class and method name
---------- ---------- ----- ---------------------
1645 1710.0 100.0 GsNMethod class >> _gsReturnToC
1069 1111.2 65.0 STONWriter >> nextPut:
990 1029.1 60.2 ExecBlock >>
value:value:value:value:value:
989 1028.1 60.1 block in TDClientSourceElementBuilder >>
menuActionBlock
988 1027.0 60.1 TDWindowBuilder >>
handleMenuActions:listElement:actionArg:
988 1027.0 60.1 TDClientSourceElementBuilder >>
doItMenuAction:selectedText:
988 1027.0 60.1 TDClientSourceElementBuilder >> evaluateString:
988 1027.0 60.1 CharacterCollection >>
evaluateIn:symbolList:literalVars:
988 1027.0 60.1 executed code
988 1027.0 60.1 ExecBlock >>
valueWithPossibleArguments:
988 1027.0 60.1 block in executed code
843 876.3 51.2 STONWriter >> with:do:
758 788.0 46.1 STONWriter >> indentedDo:
746 775.5 45.3 TranscriptProxy class >> show:
718 746.4 43.6 Object class >> new
698 725.6 42.4 ObjectLogEntry class >> transcript:object:
695 722.5 42.2 SequenceableCollection >> stonOn:
694 721.4 42.2 ObjectLogEntry >> initialize
691 718.3 42.0 STONWriter >> writeList:
I'll see what I find out using ProfMonitorTree...
Dale
On 02/03/2016 04:08 AM, Mariano Martinez Peck via Glass wrote:
> Hi guys,
>
> In Quuve we have a huge "rule engine" in which user defined "rules"
> are evaluated over 10k companies or whatever in order to filter/screen
> the companies that meet certain conditions. The rules are the very end
> have a Smalltalk closure that gets evaluated.
>
> I am trying to profile some things and what happens is that I can
> never see what happens inside the "ExecBlock >>
> valueWithPossibleArguments:". All the profiling stops at this method.
> For example, say the ProfMonitor tells me that "ExecBlock >>
> valueWithPossibleArguments:" took 50% of the time, then the tree stops
> there. I have NO CLUE what took the time inside the closure.
>
> I do get the difference between profiling closures (different
> instances) vs profiling methods. And I also know that
> #valueWithPossibleArguments: ends up in a primitive. But still, there
> may exist a workaround.
>
> Just to illustrate the issue, try profiling this:
>
>
> | profMon |
> profMon := ProfMonitorTree new.
> profMon interval: 10.
> profMon startMonitoring.
>
> *[1000 timesRepeat: [Transcript show: 'hola']]
> valueWithPossibleArguments: #().*
>
> profMon
> stopMonitoring;
> gatherResults.
>
> (FileStream
> forceNewFileNamed:
> '/Users/mariano/gemstone'
> , DateAndTime now printString faAsFilename)
> nextPutAll: (profMon reportDownTo: 10);
> cr
> You will see that in the resulting file there is NOTHING about the,
> for example, #show: of the Transcript. The Transcript itself does not
> appear at all. All you see are lines like:
> 27.4 5.0 executed code
> 100.0% (1) executed code [UndefinedObject]
>
>
> Thanks for any idea,
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20160203/c39eed55/attachment.html>
More information about the Glass
mailing list