The developer dashboard is a new feature in SharePoint 2010
this will help developers by giving additional performance and tracing
information that can be used to debug and troubleshoot issues with page
rendering time. It will give somewhat similar functionality of fiddler tool.
The dashboard is turned off by default, but can be enabled via the object model
or stsadm. Once enabled it will allow the following.
- Tracking infinite loops inside code within web parts
- Find out if pages are loading slowly.
ON
STSADM -o setproperty -pn developer-dashboard -pv on
OFF
STSADM -o setproperty -pn developer-dashboard -pv off
ON DEMAND
This is very nice feature if you enable this mode you can
make the dashboard enabled from SharePoint site itself whenever you need that
STSADM -o setproperty -pn developer-dashboard -pv ondemand
Note: We can also log the performance of the custom code by wrapping the block of code in the using clause as below.
protected
override
void
CreateChildControls()
{
using
(new
SPMonitoredScope("My
code block (WebPart1)"))
{
Thread.Sleep(50);
}
}
The above code will log the message in the Developer Dashboard.
No comments:
Post a Comment