From 8643f97119f04652af23625262a028a4dac82525 Mon Sep 17 00:00:00 2001 From: Clarisse Cheah Date: Sun, 16 Oct 2022 23:44:12 +0000 Subject: Import wiredtiger: eb9ed56c4f703dae010c23cb362ac46483b78e45 from branch mongodb-master ref: 8109d39417..eb9ed56c4f for: 6.2.0-rc0 WT-9975 Log stats for c and format tests (#8359) --- .../wiredtiger/bench/wt2853_perf/main.c | 4 +- src/third_party/wiredtiger/import.data | 2 +- .../wiredtiger/test/checkpoint/test_checkpoint.c | 3 +- .../wiredtiger/test/csuite/incr_backup/main.c | 4 +- .../wiredtiger/test/csuite/random_abort/main.c | 12 +++--- .../wiredtiger/test/csuite/random_directio/main.c | 6 +-- .../wiredtiger/test/csuite/rwlock/main.c | 5 ++- .../wiredtiger/test/csuite/schema_abort/main.c | 12 +++--- .../wiredtiger/test/csuite/scope/main.c | 4 +- .../wiredtiger/test/csuite/tiered_abort/main.c | 7 ++-- .../wiredtiger/test/csuite/timestamp_abort/main.c | 5 ++- .../wiredtiger/test/csuite/truncated_log/main.c | 9 +++-- .../test/csuite/wt1965_col_efficiency/main.c | 2 +- .../test/csuite/wt2246_col_append/main.c | 8 ++-- .../test/csuite/wt2323_join_visibility/main.c | 4 +- .../test/csuite/wt2403_lsm_workload/main.c | 5 ++- .../test/csuite/wt2447_join_main_table/main.c | 7 ++-- .../test/csuite/wt2535_insert_race/main.c | 4 +- .../test/csuite/wt2592_join_schema/main.c | 5 ++- .../wiredtiger/test/csuite/wt2695_checksum/main.c | 3 +- .../wiredtiger/test/csuite/wt2719_reconfig/main.c | 3 +- .../test/csuite/wt2834_join_bloom_fix/main.c | 5 ++- .../test/csuite/wt2909_checkpoint_integrity/main.c | 7 ++-- .../wiredtiger/test/csuite/wt3120_filesys/main.c | 7 +++- .../test/csuite/wt3135_search_near_collator/main.c | 3 +- .../test/csuite/wt3184_dup_index_collator/main.c | 3 +- .../test/csuite/wt3338_partial_update/main.c | 3 +- .../test/csuite/wt3363_checkpoint_op_races/main.c | 3 +- .../test/csuite/wt3874_pad_byte_collator/main.c | 4 +- .../test/csuite/wt4105_large_doc_small_upd/main.c | 4 +- .../test/csuite/wt4156_metadata_salvage/main.c | 14 ++++--- .../test/csuite/wt4333_handle_locks/main.c | 3 +- .../wiredtiger/test/csuite/wt4699_json/main.c | 3 +- .../test/csuite/wt4803_history_store_abort/main.c | 4 +- .../csuite/wt4891_meta_ckptlist_get_alloc/main.c | 3 +- .../wiredtiger/test/csuite/wt6185_modify_ts/main.c | 6 ++- .../test/csuite/wt6616_checkpoint_oldest_ts/main.c | 5 ++- .../test/csuite/wt7989_compact_checkpoint/main.c | 3 +- .../test/csuite/wt8057_compact_stress/main.c | 3 +- .../wt8246_compact_rts_data_correctness/main.c | 5 ++- .../wt8659_reconstruct_database_from_logs/main.c | 3 +- .../test/csuite/wt8963_insert_stress/main.c | 3 +- .../wiredtiger/test/cursor_order/cursor_order.c | 6 +-- src/third_party/wiredtiger/test/fops/t.c | 4 +- src/third_party/wiredtiger/test/format/config.h | 47 +++++++++++----------- src/third_party/wiredtiger/test/format/config.sh | 2 - .../wiredtiger/test/format/config_def.c | 3 -- .../test/format/failure_configs/CONFIG.WT-5637 | 1 - .../test/format/failure_configs/CONFIG.WT-6568 | 1 - .../test/format/failure_configs/CONFIG.WT-6725 | 1 - .../test/format/failure_configs/CONFIG.WT-6727 | 1 - .../test/format/failure_configs/CONFIG.WT-8234 | 1 - .../test/format/failure_configs/CONFIG.WT-9477 | 1 - .../test/format/failure_configs/CONFIG.WT-9751 | 1 - .../test/format/failure_configs/CONFIG.WT-9772 | 1 - .../test/format/failure_configs/CONFIG.WT-9777 | 1 - .../test/format/failure_configs/CONFIG.WT-9792 | 1 - .../test/format/failure_configs/CONFIG.WT-9805 | 1 - .../test/format/failure_configs/CONFIG.WT-9830 | 2 - src/third_party/wiredtiger/test/format/trace.c | 3 +- src/third_party/wiredtiger/test/format/wts.c | 19 ++++----- src/third_party/wiredtiger/test/fuzz/fuzz_util.c | 5 ++- src/third_party/wiredtiger/test/huge/huge.c | 3 +- src/third_party/wiredtiger/test/manydbs/manydbs.c | 2 +- .../wiredtiger/test/readonly/readonly.c | 15 ++++--- src/third_party/wiredtiger/test/salvage/salvage.c | 8 ++-- .../wiredtiger/test/syscall/wt2336_base/main.c | 3 +- src/third_party/wiredtiger/test/thread/t.c | 6 +-- 68 files changed, 190 insertions(+), 157 deletions(-) diff --git a/src/third_party/wiredtiger/bench/wt2853_perf/main.c b/src/third_party/wiredtiger/bench/wt2853_perf/main.c index d69cd893702..6ef9d66033d 100644 --- a/src/third_party/wiredtiger/bench/wt2853_perf/main.c +++ b/src/third_party/wiredtiger/bench/wt2853_perf/main.c @@ -107,8 +107,8 @@ main(int argc, char *argv[]) testutil_make_work_dir(opts->home); testutil_progress(opts, "start"); - testutil_check( - wiredtiger_open(opts->home, NULL, "create,cache_size=1G,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,cache_size=1G,statistics=(all),statistics_log=(json,on_close,wait=5)", &opts->conn)); testutil_progress(opts, "wiredtiger_open"); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 9f0f84ec514..a3e595697c0 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "8109d394179d580ec66763becdf2d7eea7405d13" + "commit": "eb9ed56c4f703dae010c23cb362ac46483b78e45" } diff --git a/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c b/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c index 1d91524ba56..bdf8acaf85e 100644 --- a/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c +++ b/src/third_party/wiredtiger/test/checkpoint/test_checkpoint.c @@ -292,7 +292,8 @@ wt_connect(const char *config_open) /* Set up the basic configuration string first. */ testutil_check(__wt_snprintf(config, sizeof(config), - "create,cache_cursors=false,statistics=(all),statistics_log=(json,wait=1),log=(enabled)," + "create,cache_cursors=false,statistics=(all),statistics_log=(json,on_close,wait=1),log=(" + "enabled)," "error_prefix=\"%s\",cache_size=1G, eviction_dirty_trigger=%i, " "eviction_dirty_target=%i,%s%s%s", progname, fast_eviction ? 5 : 20, fast_eviction ? 1 : 5, g.debug_mode ? DEBUG_MODE_CFG : "", diff --git a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c index b00a7a28099..39257050116 100644 --- a/src/third_party/wiredtiger/test/csuite/incr_backup/main.c +++ b/src/third_party/wiredtiger/test/csuite/incr_backup/main.c @@ -49,7 +49,9 @@ #define KEY_FORMAT "key-%d-%d" #define TABLE_FORMAT "key_format=S,value_format=u" -#define CONN_CONFIG_COMMON "timing_stress_for_test=[backup_rename],statistics=(all)" +#define CONN_CONFIG_COMMON \ + "timing_stress_for_test=[backup_rename],statistics=(all),statistics_log=(json,on_close,wait=" \ + "1)" #define NUM_ALLOC 5 static const char *alloc_sizes[] = {"512B", "8K", "64K", "1M", "16M"}; diff --git a/src/third_party/wiredtiger/test/csuite/random_abort/main.c b/src/third_party/wiredtiger/test/csuite/random_abort/main.c index 8bc3c2b9daa..a3a4e35f997 100644 --- a/src/third_party/wiredtiger/test/csuite/random_abort/main.c +++ b/src/third_party/wiredtiger/test/csuite/random_abort/main.c @@ -62,11 +62,13 @@ static bool inmem; #define MAX_RECORD_FILES 3 #define ENV_CONFIG_COMPAT ",compatibility=(release=\"2.9\")" -#define ENV_CONFIG_DEF "create,log=(file_max=10M,enabled),statistics=(all)" -#define ENV_CONFIG_TXNSYNC \ - "create,log=(file_max=10M,enabled)," \ - "transaction_sync=(enabled,method=none),statistics=(all)" -#define ENV_CONFIG_REC "log=(recover=on),statistics=(all)" +#define ENV_CONFIG_DEF \ + "create,log=(file_max=10M,enabled),statistics=(all),statistics_log=(json,on_close,wait=1)" +#define ENV_CONFIG_TXNSYNC \ + "create,log=(file_max=10M,enabled)," \ + "transaction_sync=(enabled,method=none),statistics=(all),statistics_log=(json,on_close,wait=" \ + "1)" +#define ENV_CONFIG_REC "log=(recover=on),statistics=(all),statistics_log=(json,on_close,wait=1)" /* * A minimum width of 10, along with zero filling, means that all the keys sort according to their diff --git a/src/third_party/wiredtiger/test/csuite/random_directio/main.c b/src/third_party/wiredtiger/test/csuite/random_directio/main.c index 5ee6c14b169..25b968d35fe 100644 --- a/src/third_party/wiredtiger/test/csuite/random_directio/main.c +++ b/src/third_party/wiredtiger/test/csuite/random_directio/main.c @@ -99,15 +99,15 @@ static const char *const uri_rev = "table:rev"; #define KEY_SEP "_" /* Must be one char string */ -#define ENV_CONFIG \ - "create,log=(file_max=10M,enabled),statistics=(all)," \ +#define ENV_CONFIG \ + "create,log=(file_max=10M,enabled),statistics=(all),statistics_log=(json,on_close,wait=1)," \ "transaction_sync=(enabled,method=%s)" #define ENV_CONFIG_TIER \ ",tiered_storage=(bucket=./bucket,bucket_prefix=pfx-,local_retention=2,name=dir_store)" #define ENV_CONFIG_TIER_EXT \ ",extensions=(%s../../../ext/storage_sources/dir_store/" \ "libwiredtiger_dir_store.so=(early_load=true))" -#define ENV_CONFIG_REC "log=(recover=on),statistics=(all)" +#define ENV_CONFIG_REC "log=(recover=on),statistics=(all),statistics_log=(json,on_close,wait=1)" /* 64 spaces */ #define SPACES " " diff --git a/src/third_party/wiredtiger/test/csuite/rwlock/main.c b/src/third_party/wiredtiger/test/csuite/rwlock/main.c index 2c606e2697f..43e4b308ccc 100644 --- a/src/third_party/wiredtiger/test/csuite/rwlock/main.c +++ b/src/third_party/wiredtiger/test/csuite/rwlock/main.c @@ -66,8 +66,9 @@ main(int argc, char *argv[]) running = true; testutil_make_work_dir(opts->home); - testutil_check( - wiredtiger_open(opts->home, NULL, "create,session_max=1000,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,session_max=1000,statistics=(all),statistics_log=(json,on_close,wait=1)", + &opts->conn)); testutil_check(__wt_rwlock_init(NULL, &rwlock)); testutil_check(pthread_rwlock_init(&p_rwlock, NULL)); diff --git a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c index 1ffe3ca692a..90aab3a072c 100644 --- a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c +++ b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c @@ -87,10 +87,11 @@ typedef struct { static volatile THREAD_TS th_ts[MAX_TH]; #define ENV_CONFIG_COMPAT ",compatibility=(release=\"2.9\")" -#define ENV_CONFIG_DEF \ - "create," \ - "eviction_updates_trigger=95,eviction_updates_target=80," \ - "log=(enabled,file_max=10M,remove=false),statistics=(all)" +#define ENV_CONFIG_DEF \ + "create," \ + "eviction_updates_trigger=95,eviction_updates_target=80," \ + "log=(enabled,file_max=10M,remove=false),statistics=(all),statistics_log=(json,on_close,wait=" \ + "1)" #define ENV_CONFIG_TIER \ ",tiered_storage=(bucket=./" \ "bucket,bucket_prefix=pfx-,local_retention=2,name=dir_store)" @@ -100,7 +101,8 @@ static volatile THREAD_TS th_ts[MAX_TH]; #define ENV_CONFIG_TXNSYNC \ ENV_CONFIG_DEF \ ",transaction_sync=(enabled,method=none)" -#define ENV_CONFIG_REC "log=(recover=on,remove=false),statistics=(all)" +#define ENV_CONFIG_REC \ + "log=(recover=on,remove=false),statistics=(all),statistics_log=(json,on_close,wait=1)" /* * A minimum width of 10, along with zero filling, means that all the keys sort according to their diff --git a/src/third_party/wiredtiger/test/csuite/scope/main.c b/src/third_party/wiredtiger/test/csuite/scope/main.c index 78b9694ac9f..4d494401fa1 100644 --- a/src/third_party/wiredtiger/test/csuite/scope/main.c +++ b/src/third_party/wiredtiger/test/csuite/scope/main.c @@ -374,8 +374,8 @@ main(int argc, char *argv[]) testutil_check(testutil_parse_opts(argc, argv, opts)); testutil_make_work_dir(opts->home); - testutil_check( - wiredtiger_open(opts->home, &event_handler, "create,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, &event_handler, + "create,statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); run(opts->conn, "file:file.SS", "key_format=S,value_format=S"); run(opts->conn, "file:file.Su", "key_format=S,value_format=u"); diff --git a/src/third_party/wiredtiger/test/csuite/tiered_abort/main.c b/src/third_party/wiredtiger/test/csuite/tiered_abort/main.c index 478d01ad99d..c188603f513 100644 --- a/src/third_party/wiredtiger/test/csuite/tiered_abort/main.c +++ b/src/third_party/wiredtiger/test/csuite/tiered_abort/main.c @@ -101,7 +101,7 @@ static uint32_t flush_calls = 1; "debug_mode=(table_logging=true,checkpoint_retention=5)," \ "eviction_updates_target=20,eviction_updates_trigger=90," \ "log=(enabled,file_max=10M,remove=true),session_max=%d," \ - "statistics=(all),statistics_log=(wait=1,json=true)," \ + "statistics=(all),statistics_log=(json,on_close,wait=1)," \ "tiered_storage=(bucket=%s,bucket_prefix=%s," \ "local_retention=%d,interval=%d,name=dir_store)" #define ENV_CONFIG_TXNSYNC \ @@ -109,8 +109,9 @@ static uint32_t flush_calls = 1; ",eviction_dirty_target=20,eviction_dirty_trigger=90" \ ",transaction_sync=(enabled,method=none)" /* Set the flush_checkpoint debug mode so that the parent can call flush_tier alone. */ -#define ENV_CONFIG_REC \ - "log=(recover=on,remove=false),debug_mode=(flush_checkpoint),statistics=(all)" +#define ENV_CONFIG_REC \ + "log=(recover=on,remove=false),debug_mode=(flush_checkpoint),statistics=(all),statistics_log=" \ + "(json,on_close,wait=1)" /* * A minimum width of 10, along with zero filling, means that all the keys sort according to their diff --git a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c index 1eaffd02955..4c68871b04c 100644 --- a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c +++ b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c @@ -101,11 +101,12 @@ static uint64_t global_ts = 1; "debug_mode=(table_logging=true,checkpoint_retention=5)," \ "eviction_updates_target=20,eviction_updates_trigger=90," \ "log=(enabled,file_max=10M,remove=true),session_max=%d," \ - "statistics=(all),statistics_log=(wait=%d,json=true)" + "statistics=(all),statistics_log=(wait=%d,json,on_close)" #define ENV_CONFIG_TXNSYNC \ ENV_CONFIG_DEF \ ",transaction_sync=(enabled,method=none)" -#define ENV_CONFIG_REC "log=(recover=on,remove=false),statistics=(all)" +#define ENV_CONFIG_REC \ + "log=(recover=on,remove=false),statistics=(all),statistics_log=(json,on_close,wait=1)" /* * A minimum width of 10, along with zero filling, means that all the keys sort according to their diff --git a/src/third_party/wiredtiger/test/csuite/truncated_log/main.c b/src/third_party/wiredtiger/test/csuite/truncated_log/main.c index 85241ff8a46..568c7ba0f0a 100644 --- a/src/third_party/wiredtiger/test/csuite/truncated_log/main.c +++ b/src/third_party/wiredtiger/test/csuite/truncated_log/main.c @@ -36,10 +36,11 @@ static bool use_columns = false; #define RECORDS_FILE "records" -#define ENV_CONFIG \ - "create,log=(enabled,file_max=100K,remove=false)," \ - "transaction_sync=(enabled,method=none),statistics=(all)" -#define ENV_CONFIG_REC "log=(recover=on),statistics=(all)" +#define ENV_CONFIG \ + "create,log=(enabled,file_max=100K,remove=false)," \ + "transaction_sync=(enabled,method=none),statistics=(all),statistics_log=(json,on_close,wait=" \ + "1)" +#define ENV_CONFIG_REC "log=(recover=on),statistics=(all),statistics_log=(json,on_close,wait=1)" #define LOG_FILE_1 "WiredTigerLog.0000000001" diff --git a/src/third_party/wiredtiger/test/csuite/wt1965_col_efficiency/main.c b/src/third_party/wiredtiger/test/csuite/wt1965_col_efficiency/main.c index c3d289374d1..e54cb7ca813 100644 --- a/src/third_party/wiredtiger/test/csuite/wt1965_col_efficiency/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt1965_col_efficiency/main.c @@ -121,7 +121,7 @@ main(int argc, char *argv[]) testutil_check(wiredtiger_open(opts->home, NULL, "create,cache_size=1G,checkpoint=(wait=30),eviction_trigger=80,eviction_target=64,eviction_" "dirty_target=65,eviction_dirty_trigger=80,log=(enabled,file_max=10M),transaction_sync=(" - "enabled=true,method=none),statistics=(all)", + "enabled=true,method=none),statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); diff --git a/src/third_party/wiredtiger/test/csuite/wt2246_col_append/main.c b/src/third_party/wiredtiger/test/csuite/wt2246_col_append/main.c index 768e7c375aa..d3a16858691 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2246_col_append/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2246_col_append/main.c @@ -104,7 +104,7 @@ main(int argc, char *argv[]) wt_thread_t idlist[100]; clock_t ce, cs; uint64_t i, id; - char buf[100]; + char buf[256]; opts = &_opts; memset(opts, 0, sizeof(*opts)); @@ -115,7 +115,8 @@ main(int argc, char *argv[]) testutil_make_work_dir(opts->home); testutil_check(__wt_snprintf(buf, sizeof(buf), - "create,cache_size=%s,eviction=(threads_max=5),statistics=(all)", + "create,cache_size=%s,eviction=(threads_max=5),statistics=(all)," + "statistics_log=(json,on_close,wait=1)", opts->table_type == TABLE_FIX ? "500MB" : "2GB")); testutil_check(wiredtiger_open(opts->home, NULL, buf, &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); @@ -129,7 +130,8 @@ main(int argc, char *argv[]) /* Force to disk and re-open. */ testutil_check(opts->conn->close(opts->conn, NULL)); - testutil_check(wiredtiger_open(opts->home, NULL, "statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open( + opts->home, NULL, "statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); (void)signal(SIGINT, onsig); diff --git a/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c b/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c index ce8e2a0842e..340c7c7672d 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2323_join_visibility/main.c @@ -116,8 +116,8 @@ main(int argc, char *argv[]) testutil_check( __wt_snprintf(sharedopts->joinuri, sizeof(sharedopts->joinuri), "join:%s", opts->uri)); - testutil_check( - wiredtiger_open(opts->home, NULL, "create,cache_size=1G,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,cache_size=1G,statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); test_join(opts, sharedopts, true, true); test_join(opts, sharedopts, true, false); diff --git a/src/third_party/wiredtiger/test/csuite/wt2403_lsm_workload/main.c b/src/third_party/wiredtiger/test/csuite/wt2403_lsm_workload/main.c index 6d817dbfa5e..1ff40ed754f 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2403_lsm_workload/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2403_lsm_workload/main.c @@ -120,8 +120,9 @@ main(int argc, char *argv[]) memset(opts, 0, sizeof(*opts)); testutil_check(testutil_parse_opts(argc, argv, opts)); testutil_make_work_dir(opts->home); - testutil_check( - wiredtiger_open(opts->home, NULL, "create,cache_size=200M,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,cache_size=200M,statistics=(all),statistics_log=(json,on_close,wait=1)", + &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session2)); diff --git a/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/main.c b/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/main.c index a80dc7c8ad4..a5724680703 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2447_join_main_table/main.c @@ -126,7 +126,8 @@ main(int argc, char *argv[]) testutil_check(__wt_snprintf(index2uri, sizeof(index2uri), "index:%s:index2", tablename)); testutil_check(__wt_snprintf(joinuri, sizeof(joinuri), "join:%s", opts->uri)); - testutil_check(wiredtiger_open(opts->home, NULL, "statistics=(all),create", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "statistics=(all),statistics_log=(json,on_close,wait=1),create", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_check(__wt_snprintf(table_cfg, sizeof(table_cfg), @@ -151,8 +152,8 @@ main(int argc, char *argv[]) free((void *)d.data); testutil_check(opts->conn->close(opts->conn, NULL)); - testutil_check( - wiredtiger_open(opts->home, NULL, "statistics=(all),create,cache_size=1GB", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "statistics=(all),statistics_log=(json,on_close,wait=1),create,cache_size=1GB", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_check(session->open_cursor(session, index1uri, NULL, NULL, &cursor1)); diff --git a/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/main.c b/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/main.c index 43186d5ce4d..3baa220b79d 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2535_insert_race/main.c @@ -105,7 +105,9 @@ main(int argc, char *argv[]) testutil_make_work_dir(opts->home); testutil_check(wiredtiger_open(opts->home, NULL, - "create,cache_size=2G,eviction=(threads_max=5),statistics=(all)", &opts->conn)); + "create,cache_size=2G,eviction=(threads_max=5),statistics=(all),statistics_log=(json,on_" + "close,wait=1)", + &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_check(__wt_snprintf(tableconf, sizeof(tableconf), "key_format=%s,value_format=%s,leaf_page_max=32k,", opts->table_type == TABLE_ROW ? "Q" : "r", diff --git a/src/third_party/wiredtiger/test/csuite/wt2592_join_schema/main.c b/src/third_party/wiredtiger/test/csuite/wt2592_join_schema/main.c index 4d6049a1f34..a33d1f4ebe4 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2592_join_schema/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2592_join_schema/main.c @@ -76,8 +76,9 @@ main(int argc, char *argv[]) testutil_check(__wt_snprintf(yearuri, sizeof(yearuri), "index:%s:year", tablename)); testutil_check(__wt_snprintf(joinuri, sizeof(joinuri), "join:%s", opts->uri)); - testutil_check( - wiredtiger_open(opts->home, NULL, "create,cache_size=200M,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,cache_size=200M,statistics=(all),statistics_log=(json,on_close,wait=1)", + &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_check(session->create( session, opts->uri, "key_format=r,value_format=5sHQ,columns=(id,country,year,population)")); diff --git a/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c b/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c index 9aa3d6d38fa..ec82fca3a69 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2695_checksum/main.c @@ -62,7 +62,8 @@ main(int argc, char *argv[]) memset(opts, 0, sizeof(*opts)); testutil_check(testutil_parse_opts(argc, argv, opts)); testutil_make_work_dir(opts->home); - testutil_check(wiredtiger_open(opts->home, NULL, "create,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); /* Initialize the RNG. */ __wt_random_init_seed(NULL, &rnd); diff --git a/src/third_party/wiredtiger/test/csuite/wt2719_reconfig/main.c b/src/third_party/wiredtiger/test/csuite/wt2719_reconfig/main.c index 610913e227d..640f029263f 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2719_reconfig/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2719_reconfig/main.c @@ -177,8 +177,7 @@ main(int argc, char *argv[]) testutil_check(testutil_parse_opts(argc, argv, opts)); testutil_make_work_dir(opts->home); - testutil_check( - wiredtiger_open(opts->home, &event_handler, "create,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, &event_handler, "create", &opts->conn)); /* Open an LSM file so the LSM reconfiguration options make sense. */ testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); diff --git a/src/third_party/wiredtiger/test/csuite/wt2834_join_bloom_fix/main.c b/src/third_party/wiredtiger/test/csuite/wt2834_join_bloom_fix/main.c index 50e4b9e1e56..6099644bf78 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2834_join_bloom_fix/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2834_join_bloom_fix/main.c @@ -69,8 +69,9 @@ main(int argc, char *argv[]) testutil_make_work_dir(opts->home); testutil_progress(opts, "start"); - testutil_check( - wiredtiger_open(opts->home, NULL, "create,cache_size=250M,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,cache_size=250M,statistics=(all),statistics_log=(json,on_close,wait=1)", + &opts->conn)); testutil_progress(opts, "wiredtiger_open"); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_progress(opts, "sessions opened"); diff --git a/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/main.c b/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/main.c index abff8420eed..3a9c02ee1a8 100644 --- a/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt2909_checkpoint_integrity/main.c @@ -111,8 +111,8 @@ check_results(TEST_OPTS *opts, uint64_t *foundp) testutil_check(create_big_string(&bigref)); nrecords = opts->nrecords; - testutil_check( - wiredtiger_open(opts->home, NULL, "create,log=(enabled),statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,log=(enabled),statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_check(session->open_cursor(session, "table:subtest", NULL, NULL, &maincur)); @@ -523,7 +523,8 @@ subtest_main(int argc, char *argv[], bool close_test) testutil_build_dir(opts, buf, 1024); testutil_check(__wt_snprintf(config, sizeof(config), "create,cache_size=250M,log=(enabled),transaction_sync=(enabled,method=none),extensions=(%s/" - "%s=(early_load,config={environment=true,verbose=true})),statistics=(all)", + "%s=(early_load,config={environment=true,verbose=true})),statistics=(all),statistics_log=(" + "json,on_close,wait=1)", buf, WT_FAIL_FS_LIB)); testutil_check(wiredtiger_open(opts->home, &event_handler, config, &opts->conn)); diff --git a/src/third_party/wiredtiger/test/csuite/wt3120_filesys/main.c b/src/third_party/wiredtiger/test/csuite/wt3120_filesys/main.c index b7bf3ea992f..54703a097b0 100644 --- a/src/third_party/wiredtiger/test/csuite/wt3120_filesys/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt3120_filesys/main.c @@ -55,7 +55,9 @@ main(int argc, char *argv[]) #endif testutil_build_dir(opts, buf, 1024); testutil_check(__wt_snprintf(config, sizeof(config), - "create,extensions=(%s/%s=(early_load=true)),statistics=(all)", buf, WT_FAIL_FS_LIB)); + "create,extensions=(%s/" + "%s=(early_load=true)),statistics=(all),statistics_log=(json,on_close,wait=1)", + buf, WT_FAIL_FS_LIB)); testutil_check(wiredtiger_open(opts->home, NULL, config, &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_check(session->create(session, opts->uri, "key_format=S,value_format=S")); @@ -72,7 +74,8 @@ main(int argc, char *argv[]) /* Force to disk and re-open. */ testutil_check(opts->conn->close(opts->conn, NULL)); - testutil_check(wiredtiger_open(opts->home, NULL, "statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open( + opts->home, NULL, "statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_check(session->open_cursor(session, opts->uri, NULL, NULL, &cursor)); diff --git a/src/third_party/wiredtiger/test/csuite/wt3135_search_near_collator/main.c b/src/third_party/wiredtiger/test/csuite/wt3135_search_near_collator/main.c index 7de9c44e43f..c86db245d9f 100644 --- a/src/third_party/wiredtiger/test/csuite/wt3135_search_near_collator/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt3135_search_near_collator/main.c @@ -347,7 +347,8 @@ main(int argc, char *argv[]) testutil_check(testutil_parse_opts(argc, argv, opts)); testutil_make_work_dir(opts->home); - testutil_check(wiredtiger_open(opts->home, NULL, "create,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); /* Add any collators and extractors used by tests */ diff --git a/src/third_party/wiredtiger/test/csuite/wt3184_dup_index_collator/main.c b/src/third_party/wiredtiger/test/csuite/wt3184_dup_index_collator/main.c index 248793ce564..588ed06d43f 100644 --- a/src/third_party/wiredtiger/test/csuite/wt3184_dup_index_collator/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt3184_dup_index_collator/main.c @@ -146,7 +146,8 @@ main(int argc, char *argv[]) testutil_check(testutil_parse_opts(argc, argv, opts)); testutil_make_work_dir(opts->home); - testutil_check(wiredtiger_open(opts->home, NULL, "create,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_check(opts->conn->add_collator(opts->conn, "index_coll", &index_coll, NULL)); diff --git a/src/third_party/wiredtiger/test/csuite/wt3338_partial_update/main.c b/src/third_party/wiredtiger/test/csuite/wt3338_partial_update/main.c index cfd2010c6c9..9317379ce64 100644 --- a/src/third_party/wiredtiger/test/csuite/wt3338_partial_update/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt3338_partial_update/main.c @@ -251,7 +251,8 @@ main(int argc, char *argv[]) memset(opts, 0, sizeof(*opts)); testutil_check(testutil_parse_opts(argc, argv, opts)); testutil_make_work_dir(opts->home); - testutil_check(wiredtiger_open(opts->home, NULL, "create,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &opts->session)); /* Run the test. */ diff --git a/src/third_party/wiredtiger/test/csuite/wt3363_checkpoint_op_races/main.c b/src/third_party/wiredtiger/test/csuite/wt3363_checkpoint_op_races/main.c index 24db947628b..e5c0fb2aab8 100644 --- a/src/third_party/wiredtiger/test/csuite/wt3363_checkpoint_op_races/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt3363_checkpoint_op_races/main.c @@ -94,7 +94,8 @@ main(int argc, char *argv[]) testutil_make_work_dir(opts->home); testutil_check(wiredtiger_open(opts->home, &event_handler, - "create,cache_size=1G,timing_stress_for_test=[checkpoint_slow],statistics=(all)", + "create,cache_size=1G,timing_stress_for_test=[checkpoint_slow],statistics=(all),statistics_" + "log=(json,on_close,wait=1)", &opts->conn)); testutil_check(pthread_create(&ckpt_thread, NULL, do_checkpoints, opts)); diff --git a/src/third_party/wiredtiger/test/csuite/wt3874_pad_byte_collator/main.c b/src/third_party/wiredtiger/test/csuite/wt3874_pad_byte_collator/main.c index a5a35358a45..69be919f4b6 100644 --- a/src/third_party/wiredtiger/test/csuite/wt3874_pad_byte_collator/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt3874_pad_byte_collator/main.c @@ -77,8 +77,8 @@ main(int argc, char *argv[]) testutil_check(testutil_parse_opts(argc, argv, opts)); testutil_make_work_dir(opts->home); - testutil_check( - wiredtiger_open(opts->home, NULL, "create,log=(enabled),statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,log=(enabled),statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); conn = opts->conn; testutil_check(conn->add_collator(conn, "my_coll", &my_coll, NULL)); testutil_check(conn->open_session(opts->conn, NULL, NULL, &session)); diff --git a/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/main.c b/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/main.c index cab313f515d..2e4fda01cd3 100644 --- a/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt4105_large_doc_small_upd/main.c @@ -98,7 +98,9 @@ main(int argc, char *argv[]) testutil_make_work_dir(opts->home); testutil_check(wiredtiger_open(opts->home, &event_handler, - "create,cache_size=1G,statistics_log=(json,wait=1),statistics=(all)", &opts->conn)); + "create,cache_size=1G,statistics_log=(json,wait=1),statistics=(all),statistics_log=(json,on_" + "close,wait=1)", + &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); testutil_check(__wt_snprintf(tableconf, sizeof(tableconf), diff --git a/src/third_party/wiredtiger/test/csuite/wt4156_metadata_salvage/main.c b/src/third_party/wiredtiger/test/csuite/wt4156_metadata_salvage/main.c index e8879bbcad6..5531c23bb55 100644 --- a/src/third_party/wiredtiger/test/csuite/wt4156_metadata_salvage/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt4156_metadata_salvage/main.c @@ -362,8 +362,9 @@ open_with_corruption(const char *sfx) testutil_check(__wt_snprintf(buf, sizeof(buf), "%s", home)); /* Don't abort in the diagnostic builds on detecting corruption. */ - ret = wiredtiger_open( - buf, &event_handler, "debug_mode=(corruption_abort=false),statistics=(all)", &conn); + ret = wiredtiger_open(buf, &event_handler, + "debug_mode=(corruption_abort=false),statistics=(all),statistics_log=(json,on_close,wait=1)", + &conn); /* * Not all out of sync combinations lead to corruption. We keep the previous checkpoint in the @@ -397,7 +398,8 @@ open_with_salvage(const char *sfx, TABLE_INFO *table_data) testutil_check(__wt_snprintf(buf, sizeof(buf), "%s.%s", home, sfx)); else testutil_check(__wt_snprintf(buf, sizeof(buf), "%s", home)); - testutil_check(wiredtiger_open(buf, &event_handler, "salvage=true,statistics=(all)", &conn)); + testutil_check(wiredtiger_open(buf, &event_handler, + "salvage=true,statistics=(all),statistics_log=(json,on_close,wait=1)", &conn)); testutil_assert(conn != NULL); if (sfx != NULL) testutil_check(__wt_snprintf(buf, sizeof(buf), "%s.%s/%s", home, sfx, WT_METAFILE_SLVG)); @@ -428,7 +430,8 @@ open_normal(const char *sfx, TABLE_INFO *table_data) testutil_check(__wt_snprintf(buf, sizeof(buf), "%s.%s", home, sfx)); else testutil_check(__wt_snprintf(buf, sizeof(buf), "%s", home)); - testutil_check(wiredtiger_open(buf, &event_handler, "statistics=(all)", &conn)); + testutil_check(wiredtiger_open( + buf, &event_handler, "statistics=(all),statistics_log=(json,on_close,wait=1)", &conn)); verify_metadata(conn, &table_data[0]); testutil_check(conn->close(conn, NULL)); } @@ -485,7 +488,8 @@ main(int argc, char *argv[]) home = opts->home; testutil_make_work_dir(home); - testutil_check(wiredtiger_open(home, &event_handler, "create,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(home, &event_handler, + "create,statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &wt_session)); /* diff --git a/src/third_party/wiredtiger/test/csuite/wt4333_handle_locks/main.c b/src/third_party/wiredtiger/test/csuite/wt4333_handle_locks/main.c index c60e7140bf0..f30ba212104 100644 --- a/src/third_party/wiredtiger/test/csuite/wt4333_handle_locks/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt4333_handle_locks/main.c @@ -294,7 +294,8 @@ runone(bool config_cache) "close_handle_minimum=1,close_idle_time=1,close_scan_interval=1)" ", mmap=true" ", session_max=%u" - ", statistics=(all)", + ", statistics=(all)" + ", statistics_log=(json,on_close,wait=1)", config_cache ? "true" : "false", workers + 100)); testutil_check(wiredtiger_open(home, NULL, buf, &conn)); diff --git a/src/third_party/wiredtiger/test/csuite/wt4699_json/main.c b/src/third_party/wiredtiger/test/csuite/wt4699_json/main.c index 17f927d23f7..b9e2137746c 100644 --- a/src/third_party/wiredtiger/test/csuite/wt4699_json/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt4699_json/main.c @@ -51,7 +51,8 @@ main(int argc, char *argv[]) testutil_check(testutil_parse_opts(argc, argv, opts)); testutil_make_work_dir(opts->home); - testutil_check(wiredtiger_open(opts->home, NULL, "create,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); /* Create a single record in a table with two fields in its value. */ diff --git a/src/third_party/wiredtiger/test/csuite/wt4803_history_store_abort/main.c b/src/third_party/wiredtiger/test/csuite/wt4803_history_store_abort/main.c index 963f6527b9e..88b62a5994d 100644 --- a/src/third_party/wiredtiger/test/csuite/wt4803_history_store_abort/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt4803_history_store_abort/main.c @@ -97,7 +97,9 @@ hs_workload(TEST_OPTS *opts, const char *hs_file_max) testutil_make_work_dir(opts->home); testutil_check(__wt_snprintf(open_config, sizeof(open_config), - "create,cache_size=50MB,history_store=(file_max=%s),statistics=(all)", hs_file_max)); + "create,cache_size=50MB,history_store=(file_max=%s),statistics=(all),statistics_log=(json,on_" + "close,wait=1)", + hs_file_max)); testutil_check(wiredtiger_open(opts->home, &event_handler, open_config, &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); diff --git a/src/third_party/wiredtiger/test/csuite/wt4891_meta_ckptlist_get_alloc/main.c b/src/third_party/wiredtiger/test/csuite/wt4891_meta_ckptlist_get_alloc/main.c index 2542892a163..506f7c02884 100644 --- a/src/third_party/wiredtiger/test/csuite/wt4891_meta_ckptlist_get_alloc/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt4891_meta_ckptlist_get_alloc/main.c @@ -52,7 +52,8 @@ main(int argc, char *argv[]) testutil_make_work_dir(opts->home); - testutil_check(wiredtiger_open(opts->home, NULL, "create,statistics=(all)", &opts->conn)); + testutil_check(wiredtiger_open(opts->home, NULL, + "create,statistics=(all),statistics_log=(json,on_close,wait=1)", &opts->conn)); testutil_check(opts->conn->open_session(opts->conn, NULL, NULL, &session)); diff --git a/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/main.c b/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/main.c index 4c2d68955f2..1c2c5d3222a 100644 --- a/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/main.c @@ -367,7 +367,8 @@ main(int argc, char *argv[]) table_config, sizeof(table_config), "key_format=%s,value_format=S", use_columns ? "r" : "S")); /* Load 100 records. */ - testutil_check(wiredtiger_open(path, NULL, "create,statistics=(all)", &conn)); + testutil_check(wiredtiger_open( + path, NULL, "create,statistics=(all),statistics_log=(json,on_close,wait=1)", &conn)); testutil_check(conn->open_session(conn, NULL, NULL, &session)); testutil_check(session->create(session, "file:xxx", table_config)); testutil_check(session->open_cursor(session, "file:xxx", NULL, NULL, &c)); @@ -381,7 +382,8 @@ main(int argc, char *argv[]) /* Flush, reopen and verify a record. */ testutil_check(conn->close(conn, NULL)); - testutil_check(wiredtiger_open(path, NULL, "statistics=(all)", &conn)); + testutil_check( + wiredtiger_open(path, NULL, "statistics=(all),statistics_log=(json,on_close,wait=1)", &conn)); testutil_check(conn->open_session(conn, NULL, NULL, &session)); testutil_check(session->create(session, "file:xxx", NULL)); testutil_check(session->open_cursor(session, "file:xxx", NULL, NULL, &c)); diff --git a/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c b/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c index eb69d852498..129ccd3f022 100644 --- a/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c @@ -65,10 +65,11 @@ static const char *const ckpt_file = "checkpoint_done"; "create," \ "eviction_updates_target=20,eviction_updates_trigger=90," \ "log=(enabled,file_max=10M,remove=true)," \ - "statistics=(all),statistics_log=(wait=1,json=true)," \ + "statistics=(all),statistics_log=(json,on_close,wait=1)," \ "timing_stress_for_test=[checkpoint_slow]" -#define ENV_CONFIG_REC "log=(recover=on,remove=false),statistics=(all)" +#define ENV_CONFIG_REC \ + "log=(recover=on,remove=false),statistics=(all),statistics_log=(json,on_close,wait=1)" static void handler(int) WT_GCC_FUNC_DECL_ATTRIBUTE((noreturn)); static void usage(void) WT_GCC_FUNC_DECL_ATTRIBUTE((noreturn)); diff --git a/src/third_party/wiredtiger/test/csuite/wt7989_compact_checkpoint/main.c b/src/third_party/wiredtiger/test/csuite/wt7989_compact_checkpoint/main.c index 868cc59649e..75d5011063b 100644 --- a/src/third_party/wiredtiger/test/csuite/wt7989_compact_checkpoint/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt7989_compact_checkpoint/main.c @@ -45,7 +45,8 @@ * You may want to add "verbose=[compact,compact_progress]" to the connection config string to get * better view on what is happening. */ -static const char conn_config[] = "create,cache_size=2GB,statistics=(all)"; +static const char conn_config[] = + "create,cache_size=2GB,statistics=(all),statistics_log=(json,on_close,wait=1)"; static const char table_config_row[] = "allocation_size=4KB,leaf_page_max=4KB,key_format=Q,value_format=QQQS"; static const char table_config_col[] = diff --git a/src/third_party/wiredtiger/test/csuite/wt8057_compact_stress/main.c b/src/third_party/wiredtiger/test/csuite/wt8057_compact_stress/main.c index e52e4c25fcc..79716d00090 100644 --- a/src/third_party/wiredtiger/test/csuite/wt8057_compact_stress/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt8057_compact_stress/main.c @@ -48,7 +48,8 @@ static uint64_t compact_event; * You may want to add "verbose=[compact,compact_progress]" to the connection config string to get * better view on what is happening. */ -static const char conn_config[] = "create,cache_size=2GB,statistics=(all)"; +static const char conn_config[] = + "create,cache_size=2GB,statistics=(all),statistics_log=(json,on_close,wait=1)"; static const char table_config_row[] = "allocation_size=4KB,leaf_page_max=4KB,key_format=Q,value_format=" WT_UNCHECKED_STRING(QS); static const char table_config_col[] = diff --git a/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c b/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c index 13c4833a8c2..64f9270b370 100644 --- a/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt8246_compact_rts_data_correctness/main.c @@ -33,7 +33,8 @@ #define NUM_RECORDS 800000 -#define ENV_CONFIG_REC "log=(recover=on,remove=false),statistics=(all)" +#define ENV_CONFIG_REC \ + "log=(recover=on,remove=false),statistics=(all),statistics_log=(json,on_close,wait=1)" /* Constants and variables declaration. */ /* * You may want to add "verbose=[compact,compact_progress]" to the connection config string to get @@ -41,7 +42,7 @@ */ static const char conn_config[] = "create,cache_size=1GB,timing_stress_for_test=[compact_slow],statistics=(all),statistics_log=(" - "wait=1,json=true,on_close=true)"; + "json,on_close,wait=1)"; static const char table_config_row[] = "allocation_size=4KB,leaf_page_max=4KB,key_format=Q,value_format=QQQS"; static const char table_config_col[] = diff --git a/src/third_party/wiredtiger/test/csuite/wt8659_reconstruct_database_from_logs/main.c b/src/third_party/wiredtiger/test/csuite/wt8659_reconstruct_database_from_logs/main.c index d49a0128391..8bd0a7e5cb8 100644 --- a/src/third_party/wiredtiger/test/csuite/wt8659_reconstruct_database_from_logs/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt8659_reconstruct_database_from_logs/main.c @@ -30,7 +30,8 @@ #define MAX_KEYS 100000 static const char *const conn_config = - "create,cache_size=100MB,log=(archive=false,enabled=true,file_max=100K),statistics=(all)"; + "create,cache_size=100MB,log=(archive=false,enabled=true,file_max=100K),statistics=(all)," + "statistics_log=(json,on_close,wait=1)"; static const char *const table_config = "key_format=S,value_format=S"; static const char *const full_out = "backup_full"; diff --git a/src/third_party/wiredtiger/test/csuite/wt8963_insert_stress/main.c b/src/third_party/wiredtiger/test/csuite/wt8963_insert_stress/main.c index 846702d12a9..be6bdbff3b4 100644 --- a/src/third_party/wiredtiger/test/csuite/wt8963_insert_stress/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt8963_insert_stress/main.c @@ -40,7 +40,8 @@ #define KEY_MAX UINT32_MAX #define TABLE_CONFIG_FMT "key_format=%s,value_format=%s,memory_page_image_max=50MB" -static const char *const conn_config = "create,cache_size=4G,statistics=(all)"; +static const char *const conn_config = + "create,cache_size=4G,statistics=(all),statistics_log=(json,on_close,wait=1)"; static uint64_t ready_counter; diff --git a/src/third_party/wiredtiger/test/cursor_order/cursor_order.c b/src/third_party/wiredtiger/test/cursor_order/cursor_order.c index 2b4c1bc20e4..f9bd69b9acd 100644 --- a/src/third_party/wiredtiger/test/cursor_order/cursor_order.c +++ b/src/third_party/wiredtiger/test/cursor_order/cursor_order.c @@ -174,9 +174,9 @@ wt_connect(SHARED_CONFIG *cfg, char *config_open) testutil_clean_work_dir(home); testutil_make_work_dir(home); - testutil_check( - __wt_snprintf(config, sizeof(config), "create,statistics=(all),error_prefix=\"%s\",%s%s", - progname, config_open == NULL ? "" : ",", config_open == NULL ? "" : config_open)); + testutil_check(__wt_snprintf(config, sizeof(config), + "create,statistics=(all),statistics_log=(json,on_close,wait=1),error_prefix=\"%s\",%s%s", + progname, config_open == NULL ? "" : ",", config_open == NULL ? "" : config_open)); testutil_check(wiredtiger_open(home, &event_handler, config, &cfg->conn)); } diff --git a/src/third_party/wiredtiger/test/fops/t.c b/src/third_party/wiredtiger/test/fops/t.c index 92de1f37e01..6fff4b43a64 100644 --- a/src/third_party/wiredtiger/test/fops/t.c +++ b/src/third_party/wiredtiger/test/fops/t.c @@ -148,13 +148,13 @@ static void wt_startup(char *config_open) { static WT_EVENT_HANDLER event_handler = {handle_error, handle_message, NULL, NULL, NULL}; - char config_buf[128]; + char config_buf[512]; testutil_make_work_dir(home); testutil_check(__wt_snprintf(config_buf, sizeof(config_buf), "create,error_prefix=\"%s\",cache_size=5MB%s%s,operation_tracking=(enabled=false),statistics=" - "(all)", + "(all),statistics_log=(json,on_close,wait=1)", progname, config_open == NULL ? "" : ",", config_open == NULL ? "" : config_open)); testutil_check(wiredtiger_open(home, &event_handler, config_buf, &conn)); } diff --git a/src/third_party/wiredtiger/test/format/config.h b/src/third_party/wiredtiger/test/format/config.h index 38b7adc3aac..cd70111022c 100644 --- a/src/third_party/wiredtiger/test/format/config.h +++ b/src/third_party/wiredtiger/test/format/config.h @@ -112,28 +112,27 @@ typedef struct { #define V_GLOBAL_RUNS_TIMER 80 #define V_TABLE_RUNS_TYPE 81 #define V_GLOBAL_RUNS_VERIFY_FAILURE_DUMP 82 -#define V_GLOBAL_STATISTICS_SERVER 83 -#define V_GLOBAL_STRESS_AGGRESSIVE_SWEEP 84 -#define V_GLOBAL_STRESS_CHECKPOINT 85 -#define V_GLOBAL_STRESS_CHECKPOINT_EVICT_PAGE 86 -#define V_GLOBAL_STRESS_CHECKPOINT_PREPARE 87 -#define V_GLOBAL_STRESS_EVICT_REPOSITION 88 -#define V_GLOBAL_STRESS_FAILPOINT_EVICTION_FAIL_AFTER_RECONCILIATION 89 -#define V_GLOBAL_STRESS_FAILPOINT_HS_DELETE_KEY_FROM_TS 90 -#define V_GLOBAL_STRESS_HS_CHECKPOINT_DELAY 91 -#define V_GLOBAL_STRESS_HS_SEARCH 92 -#define V_GLOBAL_STRESS_HS_SWEEP 93 -#define V_GLOBAL_STRESS_SPLIT_1 94 -#define V_GLOBAL_STRESS_SPLIT_2 95 -#define V_GLOBAL_STRESS_SPLIT_3 96 -#define V_GLOBAL_STRESS_SPLIT_4 97 -#define V_GLOBAL_STRESS_SPLIT_5 98 -#define V_GLOBAL_STRESS_SPLIT_6 99 -#define V_GLOBAL_STRESS_SPLIT_7 100 -#define V_GLOBAL_TRANSACTION_IMPLICIT 101 -#define V_GLOBAL_TRANSACTION_TIMESTAMPS 102 -#define V_GLOBAL_WIREDTIGER_CONFIG 103 -#define V_GLOBAL_WIREDTIGER_RWLOCK 104 -#define V_GLOBAL_WIREDTIGER_LEAK_MEMORY 105 +#define V_GLOBAL_STRESS_AGGRESSIVE_SWEEP 83 +#define V_GLOBAL_STRESS_CHECKPOINT 84 +#define V_GLOBAL_STRESS_CHECKPOINT_EVICT_PAGE 85 +#define V_GLOBAL_STRESS_CHECKPOINT_PREPARE 86 +#define V_GLOBAL_STRESS_EVICT_REPOSITION 87 +#define V_GLOBAL_STRESS_FAILPOINT_EVICTION_FAIL_AFTER_RECONCILIATION 88 +#define V_GLOBAL_STRESS_FAILPOINT_HS_DELETE_KEY_FROM_TS 89 +#define V_GLOBAL_STRESS_HS_CHECKPOINT_DELAY 90 +#define V_GLOBAL_STRESS_HS_SEARCH 91 +#define V_GLOBAL_STRESS_HS_SWEEP 92 +#define V_GLOBAL_STRESS_SPLIT_1 93 +#define V_GLOBAL_STRESS_SPLIT_2 94 +#define V_GLOBAL_STRESS_SPLIT_3 95 +#define V_GLOBAL_STRESS_SPLIT_4 96 +#define V_GLOBAL_STRESS_SPLIT_5 97 +#define V_GLOBAL_STRESS_SPLIT_6 98 +#define V_GLOBAL_STRESS_SPLIT_7 99 +#define V_GLOBAL_TRANSACTION_IMPLICIT 100 +#define V_GLOBAL_TRANSACTION_TIMESTAMPS 101 +#define V_GLOBAL_WIREDTIGER_CONFIG 102 +#define V_GLOBAL_WIREDTIGER_RWLOCK 103 +#define V_GLOBAL_WIREDTIGER_LEAK_MEMORY 104 -#define V_ELEMENT_COUNT 106 +#define V_ELEMENT_COUNT 105 diff --git a/src/third_party/wiredtiger/test/format/config.sh b/src/third_party/wiredtiger/test/format/config.sh index 4d6622a9060..b17c9c97959 100755 --- a/src/third_party/wiredtiger/test/format/config.sh +++ b/src/third_party/wiredtiger/test/format/config.sh @@ -242,8 +242,6 @@ CONFIG configuration_list[] = { {"runs.verify_failure_dump", "configure page dump on repeatable read error", C_BOOL | C_IGNORE, 0, 0, 1} -{"statistics.server", "configure statistics server thread", C_BOOL, 5, 0, 0} - {"stress.aggressive_sweep", "stress aggressive sweep", C_BOOL, 2, 0, 0} {"stress.checkpoint", "stress checkpoints", C_BOOL, 2, 0, 0} diff --git a/src/third_party/wiredtiger/test/format/config_def.c b/src/third_party/wiredtiger/test/format/config_def.c index 539ba902299..414edf22620 100644 --- a/src/third_party/wiredtiger/test/format/config_def.c +++ b/src/third_party/wiredtiger/test/format/config_def.c @@ -257,9 +257,6 @@ CONFIG configuration_list[] = { {"runs.verify_failure_dump", "configure page dump on repeatable read error", C_BOOL | C_IGNORE, 0, 0, 1, V_GLOBAL_RUNS_VERIFY_FAILURE_DUMP}, - {"statistics.server", "configure statistics server thread", - C_BOOL, 5, 0, 0, V_GLOBAL_STATISTICS_SERVER}, - {"stress.aggressive_sweep", "stress aggressive sweep", C_BOOL, 2, 0, 0, V_GLOBAL_STRESS_AGGRESSIVE_SWEEP}, diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-5637 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-5637 index 64f0321ff6f..eea22e30a41 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-5637 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-5637 @@ -77,7 +77,6 @@ runs.threads=5 runs.timer=360 runs.type=row-store runs.verify_failure_dump=0 -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_prepare=0 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6568 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6568 index 293f0d4d7c3..0c5f75a20eb 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6568 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6568 @@ -76,7 +76,6 @@ runs.threads=32 runs.timer=6 runs.type=row-store runs.verify_failure_dump=0 -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_prepare=0 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6725 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6725 index 938606204c6..d7ada0016c7 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6725 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6725 @@ -76,7 +76,6 @@ runs.threads=6 runs.timer=4 runs.type=row-store runs.verify_failure_dump=0 -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_prepare=0 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6727 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6727 index 97ddaa3c267..ca7ce62be7f 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6727 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-6727 @@ -75,7 +75,6 @@ runs.source=table runs.threads=16 runs.timer=4 runs.type=row-store -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.hs_sweep=0 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-8234 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-8234 index a18a053a496..2f59ffdcedb 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-8234 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-8234 @@ -75,7 +75,6 @@ runs.threads=4 runs.timer=11 runs.type=row-store runs.verify_failure_dump=0 -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_prepare=0 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9477 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9477 index b8360d5bbbd..57fb678c747 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9477 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9477 @@ -46,7 +46,6 @@ runs.threads=15 runs.timer=8 runs.type=variable-length column-store runs.verify_failure_dump=0 -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_evict_page=1 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9751 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9751 index 68f8457ec9b..b8e9e5a827f 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9751 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9751 @@ -48,7 +48,6 @@ runs.threads=6 runs.timer=1 runs.type=variable-length column-store runs.verify_failure_dump=0 -statistics.server=1 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_evict_page=0 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9772 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9772 index 39a8f6416cc..a96e4da5b86 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9772 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9772 @@ -45,7 +45,6 @@ runs.tables=5 runs.threads=28 runs.timer=6 runs.verify_failure_dump=0 -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_evict_page=0 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9777 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9777 index f4f29b06879..a5899baab36 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9777 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9777 @@ -46,7 +46,6 @@ runs.threads=4 runs.timer=16 runs.verify_failure_dump=0 statistics=1 -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_evict_page=0 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 index 4ff174cdb9e..23ac064b258 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9792 @@ -45,7 +45,6 @@ runs.tables=3 runs.threads=16 runs.timer=6 runs.verify_failure_dump=0 -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_evict_page=0 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9805 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9805 index 293e55be470..99821d21258 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9805 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9805 @@ -45,7 +45,6 @@ runs.tables=5 runs.threads=32 runs.timer=26 runs.verify_failure_dump=0 -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_evict_page=0 diff --git a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9830 b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9830 index fd5f33a0ddf..c586d3846eb 100644 --- a/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9830 +++ b/src/third_party/wiredtiger/test/format/failure_configs/CONFIG.WT-9830 @@ -45,8 +45,6 @@ runs.tables=3 runs.threads=10 runs.timer=6 runs.verify_failure_dump=0 -statistics=1 -statistics.server=0 stress.aggressive_sweep=0 stress.checkpoint=0 stress.checkpoint_evict_page=0 diff --git a/src/third_party/wiredtiger/test/format/trace.c b/src/third_party/wiredtiger/test/format/trace.c index 27c91068443..e5b64d93701 100644 --- a/src/third_party/wiredtiger/test/format/trace.c +++ b/src/third_party/wiredtiger/test/format/trace.c @@ -99,7 +99,8 @@ trace_init(void) /* Configure logging with automatic removal, and keep the last N log files. */ testutil_check(__wt_snprintf(config, sizeof(config), - "create,log=(enabled=true,remove=true),debug_mode=(log_retention=%d),statistics=(all)", + "create,log=(enabled=true,remove=true),debug_mode=(log_retention=%d),statistics=(all)," + "statistics_log=(json,on_close,wait=5)", retain)); testutil_check(__wt_snprintf(tracedir, sizeof(tracedir), "%s/%s", g.home, TRACE_DIR)); testutil_checkfmt( diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c index 27ca5e0ca3b..87b861a69b5 100644 --- a/src/third_party/wiredtiger/test/format/wts.c +++ b/src/third_party/wiredtiger/test/format/wts.c @@ -216,7 +216,8 @@ create_database(const char *home, WT_CONNECTION **connp) ",checkpoint_sync=false" ",error_prefix=\"%s\"" ",operation_timeout_ms=2000" - ",statistics=(all)", + ",statistics=(all)" + ",statistics_log=(json,on_close,wait=5)", GV(CACHE), progname); /* In-memory configuration. */ @@ -284,16 +285,9 @@ create_database(const char *home, WT_CONNECTION **connp) CONFIG_APPEND(p, ",debug_mode=(realloc_malloc=true)"); } - /* - * Run the statistics server and/or maintain statistics in the engine. Sometimes specify a set - * of sources just to exercise that code. - */ - if (GV(STATISTICS_SERVER)) { - if (mmrand(NULL, 0, 20) == 1) - CONFIG_APPEND(p, ",statistics_log=(json,on_close,wait=5,sources=(\"file:\"))"); - else - CONFIG_APPEND(p, ",statistics_log=(json,on_close,wait=5)"); - } + /* Sometimes specify a set of sources just to exercise that code. */ + if (mmrand(NULL, 0, 20) == 1) + CONFIG_APPEND(p, ",statistics_log=(sources=(\"file:\"))"); /* Optional timing stress. */ configure_timing_stress(&p, max); @@ -491,7 +485,8 @@ wts_open(const char *home, WT_CONNECTION **connp, bool verify_metadata) if (enc != NULL) CONFIG_APPEND(p, ",encryption=(name=%s)", enc); - CONFIG_APPEND(p, ",error_prefix=\"%s\",statistics=(all)", progname); + CONFIG_APPEND( + p, ",error_prefix=\"%s\",statistics=(all),statistics_log=(json,on_close,wait=5)", progname); /* Optional timing stress. */ configure_timing_stress(&p, max); diff --git a/src/third_party/wiredtiger/test/fuzz/fuzz_util.c b/src/third_party/wiredtiger/test/fuzz/fuzz_util.c index da9c1196ff4..7456fb8bf15 100644 --- a/src/third_party/wiredtiger/test/fuzz/fuzz_util.c +++ b/src/third_party/wiredtiger/test/fuzz/fuzz_util.c @@ -67,8 +67,9 @@ fuzzutil_setup(void) WT_CLEAR(home); fuzzutil_generate_home_name(home); testutil_make_work_dir(home); - testutil_check( - wiredtiger_open(home, NULL, "create,cache_size=5MB,statistics=(all)", &fuzz_state.conn)); + testutil_check(wiredtiger_open(home, NULL, + "create,cache_size=5MB,statistics=(all),statistics_log=(json,on_close,wait=1)", + &fuzz_state.conn)); testutil_check(fuzz_state.conn->open_session(fuzz_state.conn, NULL, NULL, &fuzz_state.session)); } diff --git a/src/third_party/wiredtiger/test/huge/huge.c b/src/third_party/wiredtiger/test/huge/huge.c index 172c1d32bae..3781f5a3e2e 100644 --- a/src/third_party/wiredtiger/test/huge/huge.c +++ b/src/third_party/wiredtiger/test/huge/huge.c @@ -107,7 +107,8 @@ run(CONFIG *cp, int bigkey, size_t bytes) * Open/create the database, connection, session and cursor; set the cache size large, we don't * want to try and evict anything. */ - testutil_check(wiredtiger_open(home, NULL, "create,cache_size=10GB,statistics=(all)", &conn)); + testutil_check(wiredtiger_open(home, NULL, + "create,cache_size=10GB,statistics=(all),statistics_log=(json,on_close,wait=1)", &conn)); testutil_check(conn->open_session(conn, NULL, NULL, &session)); testutil_check(session->create(session, cp->uri, cp->config)); testutil_check(session->open_cursor(session, cp->uri, NULL, NULL, &cursor)); diff --git a/src/third_party/wiredtiger/test/manydbs/manydbs.c b/src/third_party/wiredtiger/test/manydbs/manydbs.c index 552c648af99..18759dd853d 100644 --- a/src/third_party/wiredtiger/test/manydbs/manydbs.c +++ b/src/third_party/wiredtiger/test/manydbs/manydbs.c @@ -36,7 +36,7 @@ static const char *const uri = "table:main"; #define WTOPEN_CFG_COMMON \ "create,log=(enabled,file_max=10M,remove=false)," \ - "statistics=(all),statistics_log=(wait=5)," + "statistics=(all),statistics_log=(json,on_close,wait=5)," #define WT_CONFIG0 \ WTOPEN_CFG_COMMON \ "transaction_sync=(enabled=false)" diff --git a/src/third_party/wiredtiger/test/readonly/readonly.c b/src/third_party/wiredtiger/test/readonly/readonly.c index bb53629f34e..9564ef08477 100644 --- a/src/third_party/wiredtiger/test/readonly/readonly.c +++ b/src/third_party/wiredtiger/test/readonly/readonly.c @@ -42,11 +42,16 @@ static char home_rd2[HOME_SIZE + sizeof(HOME_RD2_SUFFIX)]; static const char *saved_argv0; /* Program command */ static const char *const uri = "table:main"; -#define ENV_CONFIG \ - "create,log=(enabled,file_max=10M,remove=false)," \ - "operation_tracking=(enabled=false),transaction_sync=(enabled,method=none),statistics=(all)" -#define ENV_CONFIG_RD "operation_tracking=(enabled=false),readonly=true,statistics=(all)" -#define ENV_CONFIG_WR "operation_tracking=(enabled=false),readonly=false,statistics=(all)" +#define ENV_CONFIG \ + "create,log=(enabled,file_max=10M,remove=false)," \ + "operation_tracking=(enabled=false),transaction_sync=(enabled,method=none),statistics=(all)," \ + "statistics_log=(json,on_close,wait=1)" +#define ENV_CONFIG_RD \ + "operation_tracking=(enabled=false),readonly=true,statistics=(all),statistics_log=(json,on_" \ + "close,wait=1)" +#define ENV_CONFIG_WR \ + "operation_tracking=(enabled=false),readonly=false,statistics=(all),statistics_log=(json,on_" \ + "close,wait=1)" #define MAX_VAL 4096 #define MAX_KV 10000 diff --git a/src/third_party/wiredtiger/test/salvage/salvage.c b/src/third_party/wiredtiger/test/salvage/salvage.c index 8b0f8557c3b..757e29878c3 100644 --- a/src/third_party/wiredtiger/test/salvage/salvage.c +++ b/src/third_party/wiredtiger/test/salvage/salvage.c @@ -519,8 +519,8 @@ build(int ikey, int ivalue, int cnt) /* * Disable logging: we're modifying files directly, we don't want to run recovery. */ - testutil_check( - wiredtiger_open(HOME, NULL, "create,log=(enabled=false),statistics=(all)", &conn)); + testutil_check(wiredtiger_open(HOME, NULL, + "create,log=(enabled=false),statistics=(all),statistics_log=(json,on_close,wait=1)", &conn)); testutil_check(conn->open_session(conn, NULL, NULL, &session)); testutil_check(session->drop(session, LOAD_URI, "force")); @@ -703,7 +703,9 @@ process(void) config[0] = '\0'; if (verbose) testutil_check(__wt_snprintf(config, sizeof(config), - "error_prefix=\"%s\",verbose=[salvage,verify],statistics=(all),", progname)); + "error_prefix=\"%s\",verbose=[salvage,verify],statistics=(all),statistics_log=(json,on_" + "close,wait=1),", + progname)); strcat(config, "log=(enabled=false),"); testutil_check(wiredtiger_open(HOME, NULL, config, &conn)); diff --git a/src/third_party/wiredtiger/test/syscall/wt2336_base/main.c b/src/third_party/wiredtiger/test/syscall/wt2336_base/main.c index f72561f916f..56d75dc835e 100644 --- a/src/third_party/wiredtiger/test/syscall/wt2336_base/main.c +++ b/src/third_party/wiredtiger/test/syscall/wt2336_base/main.c @@ -61,7 +61,8 @@ main(int argc, char *argv[]) (void)argc; (void)argv; fprintf(stderr, SEPARATOR "wiredtiger_open\n"); - if ((ret = wiredtiger_open(".", NULL, "create,statistics=(all)", &conn)) != 0) + if ((ret = wiredtiger_open( + ".", NULL, "create,statistics=(all),statistics_log=(json,on_close,wait=1)", &conn)) != 0) fail(ret); usleep(100); diff --git a/src/third_party/wiredtiger/test/thread/t.c b/src/third_party/wiredtiger/test/thread/t.c index ab6d0b3e92c..7c8a9693f8e 100644 --- a/src/third_party/wiredtiger/test/thread/t.c +++ b/src/third_party/wiredtiger/test/thread/t.c @@ -180,9 +180,9 @@ wt_connect(char *config_open) testutil_clean_work_dir(home); testutil_make_work_dir(home); - testutil_check( - __wt_snprintf(config, sizeof(config), "create,statistics=(all),error_prefix=\"%s\",%s%s", - progname, config_open == NULL ? "" : ",", config_open == NULL ? "" : config_open)); + testutil_check(__wt_snprintf(config, sizeof(config), + "create,statistics=(all),statistics_log=(json,on_close,wait=1),error_prefix=\"%s\",%s%s", + progname, config_open == NULL ? "" : ",", config_open == NULL ? "" : config_open)); testutil_check(wiredtiger_open(home, &event_handler, config, &conn)); } -- cgit v1.2.1