Changeset: e0c00be04d61 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e0c00be04d61
Modified Files:
clients/src/mapiclient/stethoscope.c
Branch: Oct2010
Log Message:
flush the output at regular intervals so logging to file is sort of reliable
diffs (26 lines):
diff -r 37132179cabd -r e0c00be04d61 clients/src/mapiclient/stethoscope.c
--- a/clients/src/mapiclient/stethoscope.c Wed Oct 20 14:59:23 2010 +0200
+++ b/clients/src/mapiclient/stethoscope.c Wed Oct 20 15:21:22 2010 +0200
@@ -306,7 +306,9 @@
}
printf("-- %sprofiler.start();\n", id);
doQ("profiler.start();");
+ fflush(NULL);
+ i = 0;
while (mnstr_read(wthr->s, buf, 1, BUFSIZ)) {
response = buf;
while ((e = strchr(response, '\n')) != NULL) {
@@ -314,7 +316,12 @@
printf("%s%s\n", id, response);
response = e + 1;
}
+ if (++i % 200) {
+ i = 0;
+ fflush(NULL);
+ }
}
+ fflush(NULL);
stop_cleanup:
doQ("profiler.setNone();");
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list