First of all, pay attention:
, .
, mongo. slowms=1 profile=2 , .
:
db.setProfilingLevel(2)
db.testProf.insert({x : 1})
db.testProf.update({x : 1}, {$set : {x : 2}})
db.testProf.find({x : 2})
db.testProf.remove({x : 2})
db.setProfilingLevel(0)
:
db.system.profile.find().pretty()
, . :
"op" : "update",
"ns" : "profDb.testProf",
"query" : {
"x" : 1
},
"updateobj" : {
"$set" : {
"x" : 2
}
},
"nscanned" : 1,
"nupdated" : 1,
"fastmod" : true,
"keyUpdates" : 0,
"numYield" : 0,
"lockStats" : {
"timeLockedMicros" : {
"r" : NumberLong(0),
"w" : NumberLong(1131)
},
"timeAcquiringMicros" : {
"r" : NumberLong(0),
"w" : NumberLong(5)
}
}
query , updateobj , .
, query - , , , .. .
, , . -
EDIT:
diaglog=3. . , , , . .
EDIT:
, , , , . . , , :
mongoexport --db profDb --collection system.profile --out profiler.json
, diaglog , , .
diaglog .
, !