[DOCS-12377] Document return value of db.setProfilingLevel() Created: 17/Jan/19  Updated: 30/Oct/23  Resolved: 05/Nov/19

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Minor - P4
Reporter: Oleg Pudeyev (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: docs-query
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Related
Participants:
Days since reply: 4 years, 14 weeks, 1 day ago
Epic Link: DOCSP-1769
Story Points: 0.1

 Description   

Description

https://docs.mongodb.com/manual/reference/method/db.setProfilingLevel/ does not specify what the return value is.

I tried:

ruby-driver-rs:PRIMARY> db.setProfilingLevel(2,-1)
{
	"was" : 1,
	"slowms" : 0,
	"sampleRate" : 1,
	"ok" : 1,
	"$clusterTime" : {
		"clusterTime" : Timestamp(1547760253, 1),
		"signature" : {
			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
			"keyId" : NumberLong(0)
		}
	},
	"operationTime" : Timestamp(1547760253, 1)
}

`was:1` makes sense, but `slowms:0` not so much. It appears to be the old value of slowms, but the key name does not indicate that the value returned is the old value.

Scope of changes

At minimum, document that setProfilingLevel returns the previous value of anything modified in the command/method.

 



 Comments   
Comment by Githook User [ 05/Nov/19 ]

Author:

{'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}

Message: DOCS-12377: db.setProfilingLevel reorg
Branch: v4.0
https://github.com/mongodb/docs/commit/e25fbf8548f100b1d94b4e81f949abb7f838b1c1

Comment by Githook User [ 05/Nov/19 ]

Author:

{'username': 'kay-kim', 'email': 'kay.kim@10gen.com', 'name': 'Kay Kim'}

Message: DOCS-12377: db.setProfilingLevel reorg
Branch: master
https://github.com/mongodb/docs/commit/0f596734efc479d9d1581ee72bba7fbbd083821c

Generated at Thu Feb 08 08:05:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.