[SERVER-23009] CRUD commands / operations should only produce profiler source object when needed Created: 08/Mar/16  Updated: 05/Apr/17  Resolved: 02/May/16

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 3.3.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: James Wahlin Assignee: James Wahlin
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-23264 Add execStats to profiler output for... Closed
Related
is related to SERVER-17862 Unify stats reporting for log/profile... Closed
Backwards Compatibility: Minor Change
Operating System: ALL
Sprint: Query 14 (05/13/16)
Participants:

 Description   

CRUD commands and operations produce a BSON object with operation metrics when profiling level is > 0. This object is used solely to write a system.profile entry. In the case where the profiler level is 1 and the slowms threshold has not been breached this object is not used. We should change to only generate this object at level 1 when execution time has exceeded the slowms boundary.



 Comments   
Comment by James Wahlin [ 02/May/16 ]

Addressed by SERVER-23264 which adds execStats to the profiler for all relevant CRUD operations. We now call CurOp::shouldDBProfile() to determine whether to produce the execStats BSON object. CurOp::shouldDBProfiler() only returns true if either:

  1. The profiler is set to level 2
  2. The profiler is set to level 1 and the slowms threshold has been reached
Generated at Thu Feb 08 04:02:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.