RSS Feed Feed your read!

Bookmark and Share







Tag Cloud

ASP.NET Generic, Best Practices, Business Intelligence, Freeware Releases, InfoPath, Infrastructure, jQuery, Lunch & Learn Events, Project Server, Random, Reporting Services, Search, SharePoint Administration, SharePoint Business Analysis and Project Management, SharePoint Development, Silverlight, Social Networking, Speaking Events, White Paper Releases, Workflow Foundation,

Archives

June 2007 (3)
August 2007 (1)
November 2007 (2)
February 2008 (2)
April 2008 (5)
May 2008 (7)
June 2008 (8)
July 2008 (7)
August 2008 (3)
September 2008 (7)
October 2008 (1)
November 2008 (3)
December 2008 (3)
January 2009 (7)
February 2009 (5)
March 2009 (10)
April 2009 (2)
May 2009 (6)
June 2009 (3)
July 2009 (4)
August 2009 (6)
September 2009 (3)
October 2009 (9)
November 2009 (10)
December 2009 (1)
January 2010 (1)
February 2010 (3)
March 2010 (6)
April 2010 (2)
May 2010 (3)
June 2010 (4)
July 2010 (3)

How to Enable the Developer Dashboard in SharePoint 2010 

Tags:

What is the developer dashboard you may say? Well – the developer dashboard in SharePoint gives developers the ability to monitor how well their code base is performing – on a page by page basis. For instance – when enabled, at the bottom of every page you'll see a report of all the custom code that has ran on that page, as well as how long it took to run. This becomes very valuable information especially when querying SharePoint content. You may have several web parts on one page all querying information from across your Farm, and the SharePoint developer dashboard helps you know how well each performs, which can help you identify if one is becoming a bottle neck for your whole page.

 

Notice this example (the report always shows at the bottom of the master page):

 

 

The report shows the following information:

 

  1. What controls loaded and how long each took to load
  2. What specific database queries executed and the execution time of each
  3. Events that were fired during the page load
  4. Order of the page lifecycle and time during each stage

 

How to Programmatically Activate the SharePoint Developer Dashboard

 

 

Via Command Prompt

 

  1. Create a new console application visual studio project, and in Program.cs, add the following code:


    SPPerformanceMonitor perfmon = SPFarm.Local.PerformanceMonitor;

    perfmon.DeveloperDashboardLevel = SPPerformanceMonitoringLevel.On;

    perfmon.Update();

  2. Ensure that .NET version 3.5 is specified (SP 2010 is not yet .NET 4.0 compatible)




  3. Also – in project properties Build tab, ensure "Any CPU" is specified (defaults to x86, but SharePoint 2010 is x64 only)




  4. Build, Execute, and Enjoy!

 

 

Via Power Shell

 

$snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
if ($snapin -eq $null) {

Write-Host "Loading SharePoint Powershell Snapin"
Add-PSSnapin "Microsoft.SharePoint.Powershell"

}
$farm = Get-SPFarm
$perfmon = $farm.PerformanceMonitor
$level = [Microsoft.SharePoint.Administration.SPPerformanceMonitoringLevel]::On
$perfmon.DeveloperDashboardLevel = $level
$perfmon.Update();
Write-Host "Sucess"

 

 

Cheers!

 

Phil

 
Posted by BENDER\pwicklund on 19-Oct-09
4  Comments  |  Trackback Url  | 0  Link to this post | Bookmark this post with:        
 
Failed to render control: Value does not fall within the expected range.

Comments


doodmangucommented onTuesday, 9-Mar-2010


Nurkoonsdazcommented onFriday, 2-Jul-2010


Lordcommented onWednesday, 14-Jul-2010


#SatelliteOLliUTcommented onSunday, 25-Jul-2010

Bookmark and Share

Note: Facebook no longer sends notifications for comments, so it may be a number of days before I see your post. For urgent matters, click "Contact Me" on the top nav. More info: Click Here.