getProfilingStatus to replace getProfilingLevel
doc -1 gets current value SERVER-1772
This commit is contained in:
@@ -1518,6 +1518,7 @@ const StringData _jscode_raw_db =
|
||||
"}\n"
|
||||
"\n"
|
||||
"/**\n"
|
||||
"* @deprecated use getProfilingStatus\n"
|
||||
"* Returns the current profiling level of this database\n"
|
||||
"* @return SOMETHING_FIXME or null on error\n"
|
||||
"*/\n"
|
||||
@@ -1526,6 +1527,19 @@ const StringData _jscode_raw_db =
|
||||
"return res ? res.was : null;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"/**\n"
|
||||
"* @return the current profiling status\n"
|
||||
"* example { was : 0, slowms : 100 }\n"
|
||||
"* @return SOMETHING_FIXME or null on error\n"
|
||||
"*/\n"
|
||||
"DB.prototype.getProfilingStatus = function() {\n"
|
||||
"var res = this._dbCommand( { profile: -1 } );\n"
|
||||
"if ( ! res.ok )\n"
|
||||
"throw \"profile command failed: \" + tojson( res );\n"
|
||||
"delete res.ok\n"
|
||||
"return res;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"/**\n"
|
||||
"Erase the entire database. (!)\n"
|
||||
|
||||
Reference in New Issue
Block a user