Changeset: bffce76f2348 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bffce76f2348
Modified Files:
        clients/mapiclient/tomograph.c
        configure.ag
        testing/Mtest.py.in
Branch: geo
Log Message:

Merge with default branch.


diffs (235 lines):

diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -362,6 +362,7 @@ base_colors[NUM_COLORS] = {
 /*     2 */    { 0, 0, "calc", "bit", 0 },
 /*     2 */    { 0, 0, "calc", "*", 0 },
 /*     2 */    { 0, 0, "algebra", "thetajoin", 0 },
+/*     2 */    { 0, 0, "algebra", "subthetajoin", 0 },
 /*     1 */    { 0, 0, "sql", "dec_round", 0 },
 /*     1 */    { 0, 0, "pqueue", "topn_min", 0 },
 /*     1 */    { 0, 0, "mtime", "date_sub_msec_interval", 0 },
@@ -377,6 +378,20 @@ base_colors[NUM_COLORS] = {
 /*     1 */    { 0, 0, "aggr", "max", 0 },
 /*     ? */    { 0, 0, "aggr", "avg", 0 },
 /*     ? */    { 0, 0, "aggr", "subavg", 0 },
+/*     ? */    { 0, 0, "aggr", "submedian", 0 },
+/*     ? */    { 0, 0, "aggr", "subquantile", 0 },
+/*     ? */    { 0, 0, "aggr", "substdev", 0 },
+/*     ? */    { 0, 0, "batcalc", "floor", 0 },
+/*     ? */    { 0, 0, "batcalc", "identity", 0 },
+/*    ? */     { 0, 0, "batmkey", "hash", 0 },
+/*    ? */     { 0, 0, "calc", "hge", 0 },
+/*    ? */     { 0, 0, "batcalc", "hge", 0 },
+/*    ? */     { 0, 0, "algebra", "firstn", 0 },
+/*    ? */     { 0, 0, "sql", "single", 0 },
+/*    ? */     { 0, 0, "algebra", "crossproduct", 0 },
+/*    ? */     { 0, 0, "profiler", "wait", 0 },
+/*    ? */     { 0, 0, "querylog", "define", 0 },
+/*    ? */     { 0, 0, "*", "*", 0 },
 /*     0 */    { 0, 0, 0, 0, 0 }
 };
 
@@ -963,6 +978,14 @@ showcolormap(char *filename, int all)
        lng totfreq = 0, tottime = 0;
        Color *clrs = colors, *_clrs_ = NULL;
        char *c;
+       time_t tm;
+       char *date;
+
+       tm = time(0);
+       date = ctime(&tm);
+       if (strchr(date, '\n'))
+               *strchr(date, '\n') = 0;
+
 
        // count size of query text
        for (nl=0, c= currentquery; c && *c; c++)
@@ -1055,23 +1078,25 @@ showcolormap(char *filename, int all)
        fprintf(f, "\" at 0,%d\n", h - 70);
        // show complete query text
        if( currentquery ){
-               h = h1-30;
+               h = h1-40;
                //fprintf(gnudata, "set object %d rectangle from %d.0, 250.0 to 
%d.0,%d.0\n", object++, 3 * w, 5 *w , h -5);
                fprintf(f, "set label %d \"", object++);
                k=0;
                for (c= currentquery; *c; c++){
-                       if (*c == '"') fprintf(gnudata,"\\"); else
-                       if (*c == '\t') fprintf(gnudata,"  "); else
-                       if (*c == '\n') { fprintf(gnudata,"\\n"); k=0; 
continue;} else
+                       if (*c == '"') fprintf(f,"\\"); else
+                       if (*c == '\t') fprintf(f,"  "); else
+                       if (*c == '\n') { fprintf(f,"\\n"); k=0; continue;} else
                        if( ++k >60 && (*c == ' ' || *c =='\t')){
-                               fprintf(gnudata,"\\n");
+                               fprintf(f,"\\n");
                                k = 1;
                        }
-                       fputc(*c,gnudata);
+                       fputc(*c,f);
                }
                fprintf(f, "\" at %d,%d\n", (int) ( 3 * w ), h - 17);
                h-= 17;
        }
+       fprintf(f, "set label %d \"%d\" at 1750.0, 100.00\n", object++, 
atlaspage + 1);
+       fprintf(f, "set label %d \"%s\" at 0.0, 100.00\n", object++, date);
        fprintf(f, "plot 0 notitle with lines linecolor rgb \"white\"\n");
        if (all) {
                fclose(f);
@@ -1079,21 +1104,25 @@ showcolormap(char *filename, int all)
 }
 
 static void
-updmap(int idx)
+updatecolormap(int idx)
 {
        char *mod, *fcn, buf[BUFSIZ], *call = buf;
        int i, fnd = 0;
 
        if( box[idx].fcn == 0)
                return;
+       
        snprintf(buf, sizeof(buf), "%s", box[idx].fcn);
        mod = call;
        fcn = strchr(call, '.');
        if (fcn) {
                *fcn = 0;
                fcn++;
-       } else
+       } else{
                fcn = "*";
+       }
+       if( strncmp(call,"end",3) == 0)
+               mod ="*";
        /* find "mod.fcn" */
        for (i = 1; i < NUM_COLORS && colors[i].mod; i++)
                if (strcmp(mod, colors[i].mod) == 0 &&
@@ -1106,8 +1135,8 @@ updmap(int idx)
                fnd = i;
                colors[fnd].mod = mod?strdup(mod): 0;
                colors[fnd].fcn = strdup(fcn);
-               if( debug)
-                       printf("added function #%d: %s.%s\n", fnd, 
(mod?mod:""), fcn);
+               if( debug) 
+                       fprintf(stderr,"-- Added function #%d: %s.%s\n", fnd, 
(mod?mod:""), fcn);
        }
 
        colors[fnd].freq++;
@@ -1121,28 +1150,25 @@ static int height = 160;
 static void
 gnuplotheader(char *filename)
 {
-       time_t tm;
-       char *date, *c,ch;
+       char *c,ch;
        int i=0;
 
        fprintf(gnudata, "set terminal pdfcairo noenhanced font 'verdana,10' 
color solid size 8.3,11.7\n");
        fprintf(gnudata, "set output \"%s.pdf\"\n", filename);
        fprintf(gnudata, "set size 1,1\n");
        fprintf(gnudata, "set tics front\n");
-       tm = time(0);
-       date = ctime(&tm);
-       if (strchr(date, '\n'))
-               *strchr(date, '\n') = 0;
+
        if( title){
                for (c = title; c && *c && i <100; c++, i++)
                        if (*c == '_')// for gnuplot
                                *c = '-';
                ch= *c; *c =0;
-               fprintf(gnudata, "set title \"%s\t%s%s\"\n", date, title, *c? 
"...":"");
+               fprintf(gnudata, "set title \"%s%s\"\n", title, (*c? "...":""));
                *c =ch;
        }  else
-               fprintf(gnudata, "set title \"%s\tMonetDB %s tomogram\"\n", 
date, dbname);
+               fprintf(gnudata, "set title \"MonetDB tomogram for database 
%s\"\n", dbname);
        fprintf(gnudata, "set multiplot\n");
+
 }
 
 static void
@@ -1170,6 +1196,7 @@ createTomogram(void)
        if( strchr(buf,'.'))
                *strchr(buf, '.') = 0;
        gnuplotheader(buf);
+       object=1;
        dumpboxes();
        showio(); //DISABLED due to access permissions
        showmemory();
@@ -1196,12 +1223,12 @@ createTomogram(void)
                                rows[top++] = box[i].thread;
                        }
                        if( box[i].state != MDB_WAIT)
-                               updmap(i);
+                               updatecolormap(i);
                }
        }
 
 
-       height = top * 20;
+       height = (top < cpus? cpus : top) * 20;
        fprintf(gnudata, "set yrange [0:%d]\n", height);
        fprintf(gnudata, "set ylabel \"threads\"\n");
        fprintf(gnudata, "set key right \n");
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1183,6 +1183,10 @@ fi
 AC_SUBST(PERL)
 AM_CONDITIONAL(HAVE_PERL, test x"$have_perl" != xno)
 AC_SUBST(PERL_LIBDIR)
+QPERL_LIBDIR="$PERL_LIBDIR"
+XPERL_LIBDIR="`$translatepath "$QPERL_LIBDIR"`"
+QXPERL_LIBDIR="`echo "$XPERL_LIBDIR" | sed 's/\\\\/\\\\\\\\/g'`"
+AC_SUBST(QXPERL_LIBDIR)
 
 # check major version of python
 # check if python2 and python3 exist
@@ -1306,8 +1310,16 @@ else
 fi
 
 AC_SUBST(PYTHON2)
+QPYTHON2="$PYTHON2"
+XPYTHON2="`$translatepath "$QPYTHON2"`"
+QXPYTHON2="`echo "$XPYTHON2" | sed 's/\\\\/\\\\\\\\/g'`"
+AC_SUBST(QXPYTHON2)
 AM_CONDITIONAL(HAVE_PYTHON2, test x"$have_python2" != xno)
 AC_SUBST(PYTHON2_LIBDIR)
+QPYTHON2_LIBDIR="$PYTHON2_LIBDIR"
+XPYTHON2_LIBDIR="`$translatepath "$QPYTHON2_LIBDIR"`"
+QXPYTHON2_LIBDIR="`echo "$XPYTHON2_LIBDIR" | sed 's/\\\\/\\\\\\\\/g'`"
+AC_SUBST(QXPYTHON2_LIBDIR)
 
 if test "x$have_python3" != xno; then
        if test x$cross_compiling != xyes; then
@@ -1361,8 +1373,16 @@ else
 fi
 
 AC_SUBST(PYTHON3)
+QPYTHON3="$PYTHON3"
+XPYTHON3="`$translatepath "$QPYTHON3"`"
+QXPYTHON3="`echo "$XPYTHON3" | sed 's/\\\\/\\\\\\\\/g'`"
+AC_SUBST(QXPYTHON3)
 AM_CONDITIONAL(HAVE_PYTHON3, test x"$have_python3" != xno)
 AC_SUBST(PYTHON3_LIBDIR)
+QPYTHON3_LIBDIR="$PYTHON3_LIBDIR"
+XPYTHON3_LIBDIR="`$translatepath "$QPYTHON3_LIBDIR"`"
+QXPYTHON3_LIBDIR="`echo "$XPYTHON3_LIBDIR" | sed 's/\\\\/\\\\\\\\/g'`"
+AC_SUBST(QXPYTHON3_LIBDIR)
 
 AM_CONDITIONAL(HAVE_PYTHON, test x"$have_python2" != xno -o x"$have_python3" 
!= xno)
 
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1379,7 +1379,7 @@ def ApproveOutput (env, TST) :
                 list = []
                 if not NOPATCH:
                     for f in os.listdir(dir or os.curdir):
-                        if f.endswith('.rej') or f.endswith('.orig'):
+                        if f.endswith('.rej') or f.endswith('.orig') or 
f.endswith('~'):
                             pass
                         elif f != thefile and test.match(f):
                             remove(os.path.join(dir or os.curdir, f + '.rej'))
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to