Changeset: a5276bc56ebf for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a5276bc56ebf
Modified Files:
        monetdb5/mal/mal_instruction.mx
Branch: default
Log Message:

Extend profiler with proper aggregate counters
Still, the aggregation does not work, because somewhere the
profiler table for cached plans is zapped completely upon each call.


diffs (39 lines):

diff --git a/monetdb5/mal/mal_instruction.mx b/monetdb5/mal/mal_instruction.mx
--- a/monetdb5/mal/mal_instruction.mx
+++ b/monetdb5/mal/mal_instruction.mx
@@ -117,8 +117,9 @@ typedef struct PERF {
 #endif
        struct timeval clock;   /* clock */
        lng clk;                /* microseconds clock */
-       int counter;
        lng ticks;              /* micro seconds spent */
+       int counter;    /* accumulate statistics */
+       lng totalticks; 
        bit trace;              /* facilitate filter-based profiling */
        lng rbytes;             /* bytes read by an instruction */
        lng wbytes;             /* bytes written by an instruction */
@@ -2190,16 +2191,6 @@ The MAL profiler dumps some performance 
 beginning of each line.
 */
 
-@= performanceData
-    if( mb->profiler ){
-               int pc= getPC(mb,p);
-        double avg= (mb->profiler[pc].ticks+0.0)/mb->profiler[pc].counter;
-        snprintf(t,(len-(t-base)),"[%7d, %5.2f] 
",mb->profiler[pc].counter,avg);
-    }
-    advance(t,base,len);
-@
-@c
-
 @= showParam
         tpe= getTypeName(getArgType(mb,p,i));
        if (flg & LIST_MAL_PROPS)
@@ -2382,7 +2373,6 @@ instruction2str(MalBlkPtr mb, MalStkPtr 
                snprintf(t,len-1,"#%3d ",getPC(mb,p));
                advance(t,base,len);
        }
-       /* @:performanceData@ */
        if (p->argc > 0 && isTmpVar(mb, getArg(p, 0))) {
                if (isVarUsed(mb, getDestVar(p))) {
                        snprintf(nmebuf, PATHLENGTH, "%c%d", TMPMARKER, 
getVarTmp(mb, getArg(p, 0)));
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to