{"id":1630,"date":"2011-07-26T13:45:27","date_gmt":"2011-07-26T05:45:27","guid":{"rendered":"http:\/\/www.sharepointboost.com\/blog\/?p=1630"},"modified":"2023-07-31T11:40:54","modified_gmt":"2023-07-31T03:40:54","slug":"using-developer-dashboard-with-spmonitoredscope-class","status":"publish","type":"post","link":"https:\/\/www.boostsolutions.com\/blog\/using-developer-dashboard-with-spmonitoredscope-class\/","title":{"rendered":"Using Developer Dashboard with SPMonitoredScope class"},"content":{"rendered":"<p>The Developer Dashboard is a new feature introduced in SharePoint 2010, it can provides additional performance and tracing information that can be used to debug and troubleshoot issues with page rendering time.<\/p>\n<h5><strong>How to Enable the Developer Dashboard<\/strong><\/h5>\n<p>Open a command window to the %ProgramFiles%\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\BIN directory and enter the following command.<br \/>\nstsadm -o setproperty -pn developer-dashboard -pv on<\/p>\n<p>When the dashboard is turned on you will find performance and tracing information appears at the bottom of the page. You can use the following command to disable the Developer Dashboard.<br \/>\nstsadm -o setproperty -pn developer-dashboard -pv off<\/p>\n<h5><strong>Using Developer Dashboard with SPMonitoredScope class<\/strong><\/h5>\n<p>In order to get the execution information of your code included in the developer dashboard output, you need to wrap the section of code with SPMonitoredScope.<br \/>\nHere is an example.<br \/>\nusing (SPMonitoredScope scope = new SPMonitoredScope (&#8220;My Monitored Scope&#8221;))<br \/>\n{<br \/>\n\/\/ put code to monitor performance on here<br \/>\n}<\/p>\n<p>As you can see, the name I used &#8220;My Monitored Scope&#8221; appear in the developer dashboard output.<\/p>\n<p><a href=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/07\/monitoredscope.bmp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1639\" src=\"http:\/\/www.BoostSolutions.com\/blog\/wp-content\/uploads\/2011\/07\/monitoredscope.bmp\" alt=\"\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Developer Dashboard is a new feature introduced in SharePoint 2010, it can provides additional performance and tracing information that can be used to debug and troubleshoot issues with page rendering time. How to Enable the Developer Dashboard Open a command window to the %ProgramFiles%\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\BIN directory and enter the following command. [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[125],"tags":[175,13,174],"_links":{"self":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1630"}],"collection":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=1630"}],"version-history":[{"count":14,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1630\/revisions"}],"predecessor-version":[{"id":1643,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1630\/revisions\/1643"}],"wp:attachment":[{"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boostsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}