getProfilingStatus to replace getProfilingLevel

doc -1 gets current value
SERVER-1772
This commit is contained in:
Eliot Horowitz
2010-09-13 13:19:28 -04:00
parent e70006635a
commit 77955627fa
3 changed files with 32 additions and 2 deletions

View File

@@ -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"