diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2012-10-14 12:19:35 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2012-10-14 12:19:35 +1100 |
commit | 84e230b1d2cf29abdff357cc11e3a52eb15b9cf7 (patch) | |
tree | b8c7672830bee522a5ac3d2ebae54c5b6a2a0aa0 /examples | |
parent | b29765d3b14b45b3d5e8604524357b92dd149054 (diff) | |
download | mongo-84e230b1d2cf29abdff357cc11e3a52eb15b9cf7.tar.gz |
Increase accuracy of LSM cache statistics.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/c/ex_test_perf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/c/ex_test_perf.c b/examples/c/ex_test_perf.c index 61392c20a6c..27554c88e38 100644 --- a/examples/c/ex_test_perf.c +++ b/examples/c/ex_test_perf.c @@ -250,7 +250,6 @@ stat_worker(void *arg) "stat:lsm:%s=%s\n", desc, pvalue); cursor->close(cursor); } - fflush(cfg->logf); } err: session->close(session, NULL); if (lsm_uri != NULL) @@ -363,6 +362,8 @@ int setup_log_file(CONFIG *cfg) fprintf(stderr, "Statistics failed to open log file.\n"); return (EINVAL); } + /* Turn off buffering for the log file. */ + (void)setvbuf(cfg->logf, NULL, _IONBF, 0); if (fname != NULL) free(fname); return (0); |