Enable ASP. NET application tracing (Performance Testing)

Source: Internet
Author: User
Tags connectionstrings

How to: Enable ASP. NET application tracing

Trace is not enabled in ASP. NET by default. First, add the following node to the configuration file! [If you only need to use Trace on a page, add the Trace to the Page. [<% @ page Language = "C #" Trace = "true" TraceMode = "SortByTime "]

<configuration>      <system.web>        <trace enabled="true" pageOutput="false" requestLimit="40" localOnly="false"/>      </system.web></configuration>

 

Below I wrote two pages, the database uses the Northwind database

<% @ Page Language = "C #" AutoEventWireup = "true" CodeBehind = "datasUseGridView. aspx. cs" Inherits = "testWeb. databing. datasUseGridView"EnableViewState= "False"%> <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<% @ Page Language = "C #" AutoEventWireup = "true" CodeBehind = "datasUseRepeater. aspx. cs "Inherits =" testWeb. databing. datasUseRepeater "EnableViewState =" false "%> <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
How to: Use the tracking viewer to view ASP. NET trace information
Enter http: // localhost: 30194/databing/trace. axd in the address bar. [run trace. axd after the path you run]
 
 
Click 1 to View Details [bind data with GridView]
 
 
Click "2" to View Details [bind data with Repeater]
 

 

0.18248628031112/0.0270457468544523 = 6.747318951596225

Of course, to compare the efficiency of the GridView and Repeater, we need to take the average value for multiple tests. Sometimes I test them very differently and sometimes very small. For example, if we need to compile for the first time, it becomes very slow, it will be faster later! If you are interested, you can test several groups of data!

 

Technorati label: Trace. axd, gridview, repeater
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.