-
Type: Question
-
Resolution: Done
-
Priority: Trivial - P5
-
None
-
Affects Version/s: 3.3.5
-
Component/s: Admin, Index Maintenance, Shell, WiredTiger
-
None
Windows 10
MS VS 2015
MongoDB 3.3.5
MongoDB C++11 Driver 3.0.1
Using WiredTiger
I want the statistic
"btree" { "number of key/value pairs"}
which is equal to "btree_entries" from bt_stat.c. (I recognize this is "really, really expensive").
I run this in mongo:
db.adminCommand({ setParameter: 1, "wiredTigerEngineRuntimeConfig" : "create,statistics=(all)"})
and mongod reports it was successful:
2016-08-17T11:18:00.960-0700 I STORAGE [conn5176] Reconfiguring WiredTiger storage engine with config string: "statistics=(all)"
which, presumably, sets WT_CONN_STAT_ALL so that btree_entries will be collected.
According to the documentation, I have to use the db.adminCommand. "You can only set this parameter using the setParameter command and not using the command line or configuration file option."
But when I then run:
db.employees.stats({'indexDetails':true, 'indexDetailsName': "employeenum_1_check_1"})
I still get:
"number of key/value pairs" : 0,