summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-12-04 21:59:50 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-12-04 21:59:50 +1100
commit2ede92de567a6ce98fe181b4bd8a1b52b0803ad9 (patch)
tree355716ce919bf9be8a8aaaf6cd4484212a936d83 /test
parent2e232281d89dbcbc82bff12d3bfe4a801aa51d9c (diff)
downloadmongo-2ede92de567a6ce98fe181b4bd8a1b52b0803ad9.tar.gz
Output statistics for all data sources from test/format
Diffstat (limited to 'test')
-rw-r--r--test/fops/t.c3
-rw-r--r--test/format/wts.c13
2 files changed, 6 insertions, 10 deletions
diff --git a/test/fops/t.c b/test/fops/t.c
index 538436da652..4650bfd8892 100644
--- a/test/fops/t.c
+++ b/test/fops/t.c
@@ -103,6 +103,9 @@ main(int argc, char *argv[])
if (argc != 0)
return (usage());
+ /* Use line buffering on stdout so status updates aren't buffered. */
+ (void)setvbuf(stdout, NULL, _IOLBF, 0);
+
/* Clean up on signal. */
(void)signal(SIGINT, onint);
diff --git a/test/format/wts.c b/test/format/wts.c
index 102ddac9d9a..ff377964659 100644
--- a/test/format/wts.c
+++ b/test/format/wts.c
@@ -317,15 +317,8 @@ wts_stats(void)
if ((ret = cursor->close(cursor)) != 0)
die(ret, "cursor.close");
- /*
- * XXX
- * WiredTiger only supports file object statistics.
- */
- if (strcmp(g.c_data_source, "file") != 0)
- goto skip;
-
- /* File statistics. */
- fprintf(fp, "\n\n====== File statistics:\n");
+ /* Data source statistics. */
+ fprintf(fp, "\n\n====== Data source statistics:\n");
if ((stat_name =
malloc(strlen("statistics:") + strlen(g.uri) + 1)) == NULL)
syserr("malloc");
@@ -345,7 +338,7 @@ wts_stats(void)
if ((ret = cursor->close(cursor)) != 0)
die(ret, "cursor.close");
-skip: if ((ret = fclose(fp)) != 0)
+ if ((ret = fclose(fp)) != 0)
die(ret, "fclose");
if ((ret = session->close(session, NULL)) != 0)