Changeset: 5c05af09819b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5c05af09819b Modified Files: clients/mapiclient/tomograph.c Branch: Jan2014 Log Message:
Working without atlas control (grafted from 034ca20326203cc32b92b39a45171d651cd30449) diffs (truncated from 971 to 300 lines): diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c --- a/clients/mapiclient/tomograph.c +++ b/clients/mapiclient/tomograph.c @@ -70,7 +70,8 @@ static struct { char *ptag; /* which profiler group counter is needed */ char *name; /* which logical counter is needed */ int status; /* trace it or not */ -} profileCounter[] = { +} +profileCounter[] = { /* 0 */ { 'a', "aggregate", "total count", 0 }, /* 1 */ { 'a', "aggregate", "total ticks", 0 }, /* 2 */ { 'e', "event", "event id", 0 }, @@ -141,17 +142,17 @@ static char *tracefile = 0; static lng startrange = 0, endrange = 0; static char *inputfile = NULL; static char *title = 0; -static int debug = 0; +static int debug = 1; static int colormap = 0; static int fixedmap=1; static int beat = 50; static char *sqlstatement = NULL; -static int batchsize = 1; /* number of queries to combine in one run */ -static int batch = 1; /* number of queries to combine in one run */ +static int batchsize = 1; /* number of queries to combine in one tomogram */ +static int batch = 1; /* number of queries to combine in one tomogram */ static lng maxio = 0; static int cpus = 0; static int atlas= 0; -static int atlaspage = -1; +static int atlaspage = 0; static FILE *gnudata; static int capturing=0; @@ -225,7 +226,7 @@ deactivateBeat(void) } return; - stop_disconnect: +stop_disconnect: ; } @@ -273,7 +274,7 @@ activateBeat(void) wthread *wthr; if (debug) - fprintf(stderr, "Activate beat\n"); + fprintf(stderr, "Activate beat %s\n", filename); if (activated == 1) return; activated = 1; @@ -285,7 +286,7 @@ activateBeat(void) } return; - stop_disconnect: +stop_disconnect: if (wthr) { mapi_disconnect(wthr->dbh); mapi_destroy(wthr->dbh); @@ -296,9 +297,9 @@ activateBeat(void) #define MAXTHREADS 2048 #define MAXBOX 32678 /* should be > MAXTHREADS */ -#define START 0 -#define DONE 1 -#define ACTION 2 +#define START 1 +#define DONE 2 +#define ACTION 3 #define PING 4 #define WAIT 5 #define GCOLLECT 6 @@ -331,8 +332,34 @@ int figures = 0; char *currentfunction= 0; int object = 1; -static void -dumpbox(int i) +static void resetTomograph(void){ + static char buf[128]; + int i; + if(atlas) { + snprintf(buf,128,"%s_%02d",basefilename,++atlaspage); + filename = buf; + } + if (debug) + fprintf(stderr, "RESET tomograph %d\n", atlaspage); + for(i=0; i< MAXTHREADS; i++) + lastclk[i]=0; + topbox =0; + for (i = 0; i < MAXTHREADS; i++) + threads[i] = topbox++; + + startrange = 0, endrange = 0; + maxio = 0; + cpus = 0; + batch = batchsize; + totalclkticks = 0; + totalexecticks = 0; + lastclktick = 0; + figures = 0; + currentfunction = 0; + object = 1; +} + +static void dumpbox(int i) { printf("[%d] row %d color %d ", i, box[i].row, box[i].color); if (box[i].fcn) @@ -355,149 +382,150 @@ typedef struct { int red, green, blue; } RGB; -RGB dictionary[] = { +RGB +dictionary[] = { /* arbitrarily ordered by ascending R+G+B */ - /* 0 */ { "black", "#000000", 0, 0, 0 }, - /* 100 */ { "darkgreen", "#006400", 0, 100, 0 }, - /* 128 */ { "green", "#008000", 0, 128, 0 }, - /* 128 */ { "maroon", "#800000", 128, 0, 0 }, - /* 128 */ { "navy", "#000080", 0, 0, 128 }, - /* 139 */ { "darkblue", "#00008B", 0, 0, 139 }, - /* 139 */ { "darkred", "#8B0000", 139, 0, 0 }, - /* 162 */ { "midnightblue", "#191970", 25, 25, 112 }, - /* 205 */ { "darkslategray", "#2F4F4F", 47, 79, 79 }, - /* 205 */ { "indigo", "#4B0082", 75, 0, 130 }, - /* 205 */ { "mediumblue", "#0000CD", 0, 0, 205 }, - /* 207 */ { "forestgreen", "#228B22", 34, 139, 34 }, - /* 227 */ { "saddlebrown", "#8B4513", 139, 69, 19 }, - /* 239 */ { "darkolivegreen", "#556B2F", 85, 107, 47 }, - /* 246 */ { "firebrick", "#B22222", 178, 34, 34 }, - /* 249 */ { "brown", "#A52A2A", 165, 42, 42 }, - /* 255 */ { "blue", "#0000FF", 0, 0, 255 }, - /* 255 */ { "lime", "#00FF00", 0, 255, 0 }, - /* 255 */ { "red", "#FF0000", 255, 0, 0 }, - /* 256 */ { "olive", "#808000", 128, 128, 0 }, - /* 256 */ { "purple", "#800080", 128, 0, 128 }, - /* 256 */ { "teal", "#008080", 0, 128, 128 }, - /* 272 */ { "darkslateblue", "#483D8B", 72, 61, 139 }, - /* 272 */ { "seagreen", "#2E8B57", 46, 139, 87 }, - /* 278 */ { "darkcyan", "#008B8B", 0, 139, 139 }, - /* 278 */ { "darkmagenta", "#8B008B", 139, 0, 139 }, - /* 284 */ { "olivedrab", "#6B8E23", 107, 142, 35 }, - /* 287 */ { "sienna", "#A0522D", 160, 82, 45 }, - /* 300 */ { "crimson", "#DC143C", 220, 20, 60 }, - /* 305 */ { "limegreen", "#32CD32", 50, 205, 50 }, - /* 315 */ { "dimgray", "#696969", 105, 105, 105 }, - /* 324 */ { "orangered", "#FF4500", 255, 69, 0 }, - /* 329 */ { "darkgoldenrod", "#B8860B", 184, 134, 11 }, - /* 345 */ { "chocolate", "#D2691E", 210, 105, 30 }, - /* 352 */ { "mediumseagreen", "#3CB371", 60, 179, 113 }, - /* 353 */ { "mediumvioletred", "#C71585", 199, 21, 133 }, - /* 359 */ { "darkviolet", "#9400D3", 148, 0, 211 }, - /* 376 */ { "lawngreen", "#7CFC00", 124, 252, 0 }, - /* 380 */ { "lightseagreen", "#20B2AA", 32, 178, 170 }, - /* 380 */ { "steelblue", "#4682B4", 70, 130, 180 }, - /* 381 */ { "gray", "#7F7F7F", 127, 127, 127 }, - /* 382 */ { "chartreuse", "#7FFF00", 127, 255, 0 }, - /* 382 */ { "springgreen", "#00FF7F", 0, 255, 127 }, - /* 384 */ { "slategray", "#708090", 112, 128, 144 }, - /* 389 */ { "indianred", "#CD5C5C", 205, 92, 92 }, - /* 394 */ { "yellowgreen", "#9ACD32", 139, 205, 50 }, - /* 395 */ { "darkorange", "#FF8C00", 255, 140, 0 }, - /* 395 */ { "royalblue", "#4169E1", 65, 105, 225 }, - /* 401 */ { "peru", "#CD853F", 205, 133, 63 }, - /* 401 */ { "slateblue", "#6A5ACD", 106, 90, 205 }, - /* 404 */ { "mediumspringgreen", "#00FA9A", 0, 250, 154 }, - /* 407 */ { "blueviolet", "#8A2BE2", 138, 43, 226 }, - /* 407 */ { "darkorchid", "#9932CC", 153, 50, 204 }, - /* 408 */ { "lightslategray", "#778899", 119, 136, 153 }, - /* 413 */ { "cadetblue", "#5F9EA0", 95, 158, 160 }, - /* 415 */ { "darkturquoise", "#00CED1", 0, 206, 209 }, - /* 415 */ { "goldenrod", "#DAA520", 218, 165, 32 }, - /* 420 */ { "orange", "#FFA500", 255, 165, 0 }, - /* 422 */ { "deeppink", "#FF1493", 255, 20, 147 }, - /* 425 */ { "tomato", "#FF6347", 255, 99, 71 }, - /* 429 */ { "dodgerblue", "#1E90FF", 30, 144, 255 }, - /* 446 */ { "deepskyblue", "#00BFFF", 0, 191, 255 }, - /* 462 */ { "coral", "#FF7F50", 255, 127, 80 }, - /* 465 */ { "mediumslateblue", "#7B68EE", 123, 104, 238 }, - /* 470 */ { "gold", "#FFD700", 255, 215, 0 }, - /* 474 */ { "darkseagreen", "#8FBC8F", 143, 188, 143 }, - /* 474 */ { "rosybrown", "#BC8F8F", 188, 143, 143 }, - /* 475 */ { "greenyellow", "#ADFF2F", 173, 255, 47 }, - /* 477 */ { "mediumaquamarine", "#66CDAA", 102, 205, 170 }, - /* 478 */ { "mediumpurple", "#9370DB", 147, 112, 219 }, - /* 478 */ { "palevioletred", "#DB7093", 219, 112, 147 }, - /* 479 */ { "darkkhaki", "#BDB76B", 189, 183, 107 }, - /* 482 */ { "mediumorchid", "#BA55D3", 186, 85, 211 }, - /* 485 */ { "mediumturquoise", "#48D1CC", 72, 209, 204 }, - /* 486 */ { "cornflowerblue", "#6495ED", 100, 149, 237 }, - /* 492 */ { "salmon", "#FA8072", 250, 128, 114 }, - /* 496 */ { "lightcoral", "#F08080", 240, 128, 128 }, - /* 496 */ { "turquoise", "#40E0D0", 64, 224, 208 }, - /* 504 */ { "sandybrown", "#F4A460", 244, 164, 96 }, - /* 505 */ { "darksalmon", "#E9967A", 233, 150, 122 }, - /* 507 */ { "darkgray", "#A9A9A9", 169, 169, 169 }, - /* 510 */ { "aqua", "#00FFFF", 0, 255, 255 }, - /* 510 */ { "cyan", "#00FFFF", 0, 255, 255 }, - /* 510 */ { "fuchsia", "#FF00FF", 255, 0, 255 }, - /* 510 */ { "magenta", "#FF00FF", 255, 0, 255 }, - /* 510 */ { "yellow", "#FFFF00", 255, 255, 0 }, - /* 526 */ { "lightgreen", "#90EE90", 144, 238, 144 }, - /* 530 */ { "tan", "#D2B48C", 210, 180, 140 }, - /* 537 */ { "lightsalmon", "#FFA07A", 255, 160, 122 }, - /* 540 */ { "hotpink", "#FF69B4", 255, 105, 180 }, - /* 541 */ { "burlywood", "#DEB887", 222, 184, 135 }, - /* 544 */ { "orchid", "#DA70D6", 218, 112, 214 }, - /* 555 */ { "palegreen", "#98FB98", 152, 251, 152 }, - /* 557 */ { "navyblue", "#9FAFDF", 159, 175, 223 }, - /* 576 */ { "silver", "#C0C0C0", 192, 192, 192 }, - /* 576 */ { "skyblue", "#87CEEB", 135, 206, 235 }, - /* 591 */ { "lightskyblue", "#87CEFA", 135, 206, 250 }, - /* 594 */ { "aquamarine", "#7FFFD4", 127, 255, 212 }, - /* 594 */ { "lightsteelblue", "#B0C4DE", 176, 196, 222 }, - /* 602 */ { "plum", "#DDA0DD", 221, 160, 221 }, - /* 606 */ { "violet", "#EE82EE", 238, 130, 238 }, - /* 610 */ { "khaki", "#F0E68C", 240, 230, 140 }, - /* 619 */ { "lightblue", "#ADD8E6", 173, 216, 230 }, - /* 623 */ { "thistle", "#D8BFD8", 216, 191, 216 }, - /* 630 */ { "lightpink", "#FFB6C1", 255, 182, 193 }, - /* 630 */ { "powderblue", "#B0E0E6", 176, 224, 230 }, - /* 633 */ { "lightgrey", "#D3D3D3", 211, 211, 211 }, - /* 640 */ { "palegoldenrod", "#EEE8AA", 238, 232, 170 }, - /* 646 */ { "wheat", "#F5DEB3", 245, 222, 179 }, - /* 650 */ { "navajowhite", "#FFDEAD", 255, 222, 173 }, - /* 650 */ { "pink", "#FFC0CB", 255, 192, 203 }, - /* 651 */ { "paleturquoise", "#AFEEEE", 175, 238, 238 }, - /* 658 */ { "peachpuff", "#FFDAB9", 255, 218, 185 }, - /* 660 */ { "gainsboro", "#DCDCDC", 220, 220, 220 }, - /* 664 */ { "moccasin", "#FFE4B5", 255, 228, 181 }, - /* 679 */ { "bisque", "#FFE4C4", 255, 228, 196 }, - /* 695 */ { "blanchedalmond", "#FFEBCD", 255, 235, 205 }, - /* 700 */ { "antiquewhite", "#FAEBD7", 250, 235, 215 }, - /* 707 */ { "papayawhip", "#FFEFD5", 255, 239, 213 }, - /* 708 */ { "mistyrose", "#FFE4E1", 255, 228, 225 }, - /* 710 */ { "beige", "#F5F5DC", 245, 245, 220 }, - /* 710 */ { "lavender", "#E6E6FA", 230, 230, 250 }, - /* 710 */ { "lemonchiffon", "#FFFACD", 255, 250, 205 }, - /* 710 */ { "lightgoldenrodyellow", "#FAFAD2", 250, 250, 210 }, - /* 720 */ { "linen", "#FAF0E6", 250, 240, 230 }, - /* 723 */ { "cornsilk", "#FFF8DC", 255, 248, 220 }, - /* 728 */ { "oldlace", "#FDF5E6", 253, 245, 230 }, - /* 734 */ { "lightcyan", "#E0FFFF", 224, 255, 255 }, - /* 734 */ { "lightyellow", "#FFFFE0", 255, 255, 224 }, - /* 735 */ { "honeydew", "#F0FFF0", 240, 255, 240 }, - /* 735 */ { "whitesmoke", "#F5F5F5", 245, 245, 245 }, - /* 738 */ { "seashell", "#FFF5EE", 255, 245, 238 }, - /* 740 */ { "lavenderblush", "#FFF0F5", 255, 240, 245 }, - /* 743 */ { "aliceblue", "#F0F8FF", 240, 248, 255 }, - /* 745 */ { "floralwhite", "#FFFAF0", 255, 250, 240 }, - /* 750 */ { "azure", "#F0FFFF", 240, 255, 255 }, - /* 750 */ { "ivory", "#FFFFF0", 255, 255, 240 }, - /* 750 */ { "mintcream", "#F5FFFA", 245, 255, 250 }, - /* 751 */ { "ghostwhite", "#F8F8FF", 248, 248, 255 }, - /* 755 */ { "snow", "#FFFAFA", 255, 250, 250 }, - /* 765 */ { "white", "#FFFFFF", 255, 255, 255 }, +/* 0 */ { "black", "#000000", 0, 0, 0 }, +/* 100 */ { "darkgreen", "#006400", 0, 100, 0 }, +/* 128 */ { "green", "#008000", 0, 128, 0 }, +/* 128 */ { "maroon", "#800000", 128, 0, 0 }, +/* 128 */ { "navy", "#000080", 0, 0, 128 }, +/* 139 */ { "darkblue", "#00008B", 0, 0, 139 }, +/* 139 */ { "darkred", "#8B0000", 139, 0, 0 }, +/* 162 */ { "midnightblue", "#191970", 25, 25, 112 }, +/* 205 */ { "darkslategray", "#2F4F4F", 47, 79, 79 }, +/* 205 */ { "indigo", "#4B0082", 75, 0, 130 }, +/* 205 */ { "mediumblue", "#0000CD", 0, 0, 205 }, +/* 207 */ { "forestgreen", "#228B22", 34, 139, 34 }, +/* 227 */ { "saddlebrown", "#8B4513", 139, 69, 19 }, +/* 239 */ { "darkolivegreen", "#556B2F", 85, 107, 47 }, +/* 246 */ { "firebrick", "#B22222", 178, 34, 34 }, +/* 249 */ { "brown", "#A52A2A", 165, 42, 42 }, +/* 255 */ { "blue", "#0000FF", 0, 0, 255 }, +/* 255 */ { "lime", "#00FF00", 0, 255, 0 }, +/* 255 */ { "red", "#FF0000", 255, 0, 0 }, +/* 256 */ { "olive", "#808000", 128, 128, 0 }, +/* 256 */ { "purple", "#800080", 128, 0, 128 }, +/* 256 */ { "teal", "#008080", 0, 128, 128 }, +/* 272 */ { "darkslateblue", "#483D8B", 72, 61, 139 }, +/* 272 */ { "seagreen", "#2E8B57", 46, 139, 87 }, +/* 278 */ { "darkcyan", "#008B8B", 0, 139, 139 }, +/* 278 */ { "darkmagenta", "#8B008B", 139, 0, 139 }, +/* 284 */ { "olivedrab", "#6B8E23", 107, 142, 35 }, +/* 287 */ { "sienna", "#A0522D", 160, 82, 45 }, +/* 300 */ { "crimson", "#DC143C", 220, 20, 60 }, +/* 305 */ { "limegreen", "#32CD32", 50, 205, 50 }, +/* 315 */ { "dimgray", "#696969", 105, 105, 105 }, +/* 324 */ { "orangered", "#FF4500", 255, 69, 0 }, +/* 329 */ { "darkgoldenrod", "#B8860B", 184, 134, 11 }, +/* 345 */ { "chocolate", "#D2691E", 210, 105, 30 }, +/* 352 */ { "mediumseagreen", "#3CB371", 60, 179, 113 }, +/* 353 */ { "mediumvioletred", "#C71585", 199, 21, 133 }, +/* 359 */ { "darkviolet", "#9400D3", 148, 0, 211 }, +/* 376 */ { "lawngreen", "#7CFC00", 124, 252, 0 }, +/* 380 */ { "lightseagreen", "#20B2AA", 32, 178, 170 }, _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list