Friday 4 June 2010

SharePoint 2010 Developer dashboard

Overview: Developer dashboard allows you to see all calls made from a page under the page in the browser. This allows you to identify poorly performing code & bottle necks. You can see the call stack and the time it takes to perform each call.
OOTB the developer dashboard it turned off. Turn it on using an stsadm cmd or powershell cmd.

Developer dashboard can be setup to allow only certain users to view the stats, this means other users don't suffer the additional resource calls but the developer/administrator can view poorly performing code & page statistics.

Stsadm Method:
1.> Open a cmd prompt running as an administrator
2.> go to: c:\program files\common files\microsoft shared\web server extensions\14\bin and
3.> run the following cmd:
stsadm -o setproperty -pn developer-dashboard -pv ondemand
Cmd prompt to turn on the developer dashboard
4.> In the browser click the developer dashboard icon in the top right of the page, as shown below. On the page you can now see the page call information.

Web Services Using the Object Model (Web Serives) Method:
SPWebService cs = SPWebService.ContentService;
cs.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.On;
cs.DeveloperDashboardSettings.Update();
 
Powershell Method:
$db =[Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$db.DisplayLevel = 'On';
$db.TraceEnabled = $true;
$db.Update() 

0 comments:

Post a Comment