[sv@sv ~/dev/mongodb_repos/SERVER-7774 (master)]$ cat testfile.js
|
db.test.drop();
|
db.test.insert({x:1});
|
db.test.find({x:1});
|
db.test.find({x:1});
|
db.test.find({x:1});
|
printjson(db.adminCommand("top").totals["test.test"].queries);
|
[sv@sv ~/dev/mongodb_repos/SERVER-7774 (master)]$ mongo
|
MongoDB shell version: 2.3.3-pre-
|
connecting to: test
|
Server has startup warnings:
|
Mon Apr 8 13:38:23.719 [initandlisten]
|
Mon Apr 8 13:38:23.719 [initandlisten] ** NOTE: This is a development version (2.5.0-pre-) of MongoDB.
|
Mon Apr 8 13:38:23.719 [initandlisten] ** Not recommended for production.
|
Mon Apr 8 13:38:23.719 [initandlisten]
|
> db.test.drop();
|
true
|
> db.test.insert({x:1});
|
> db.test.find({x:1});
|
{ "_id" : ObjectId("516343b8a4cd2ac566f62971"), "x" : 1 }
|
> db.test.find({x:1});
|
{ "_id" : ObjectId("516343b8a4cd2ac566f62971"), "x" : 1 }
|
> db.test.find({x:1});
|
{ "_id" : ObjectId("516343b8a4cd2ac566f62971"), "x" : 1 }
|
> printjson(db.adminCommand("top").totals["test.test"].queries);
|
{ "time" : 200, "count" : 2 }
|
>
|
bye
|