49,779 Members
1 added today
332,293 Resources
144 added today

All Devdex   All Gurus  

Instrumentation in .Net - An Introduction
Author: Sandeep Alur
Rating:
Visits: 12164

Discuss in Newsgroups

Page:

Introduction

With the emergence of technology, Software Systems are increasing day by day. How efficiently does the system perform in the real time scenario? How do I know or gauge the performance of any application? How do I troubleshoot for bottlenecks in an application? Questions like these prop up now and then, and it’s extremely important to plug in features, which pave the way for monitoring the application performance. Microsoft has plugged into the .Net framework, a set of gauging techniques, when applied to an application, would turn out to be extremely handy for performance monitoring. These techniques fall under the umbrella called ‘Instrumentation’

 

‘Instrumentation’ as defined by Microsoft ‘refers to an ability to monitor or measure the level of a product’s performance and to diagnose errors’. 

 

This article introduces to the readers, the ways and means of implementing Instrumentation in an application.

 

Instrumentation - Building Blocks

 

Instrumentation as such, translates to an output from an application as an indicative of the events occurring with time. These timely changes can be brought out with the help of Tracing and Performance Counters.

 

Instrumentation helps Administrator monitor the behavior of an application over time.

 

Performance Counters help monitor the progress of an application on a timely basis. There are various system wide performance counters, which one can use to monitor the various processes running in a machine. In short, if one needs to know how many times ‘Method A’ was called, then you can have a performance counter to do this.

 

Performance Counters can be defined for an application and are called custom performance counters. The same is explained in detail, later in the article.

 

Tracing feature in .Net helps debug/troubleshoot an application. They exist in the form of messages and they can get into a text file, event log or output window. Output window can be monitored during development to see the progress of an application. Event Log and Text files are handy resources when an application is deployed in the production environment. To assist Tracing, the framework consists of ‘Trace Listeners’ whose primary responsibility is to receive messages and record against the specified resource. To achieve this feature, the Trace messages are to be placed in the application code.

Ex:

 

Private Sub frmTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

       Trace.Write("Control is in Form Load")

End Sub

 

If there were Trace listeners for Event Log, the above message would be recorded in the event log. Tracing can be logic driven and based on a value. This mechanism is explained in detail, later in the article.

 

Next Page: Implementing Performance Counters


Next Page >>

Visitor Comments

Anonymous User Little more than just re-writing the help file, th...

 

Rate this Article







	
	
	



Credit Card Payment Control
Supports over 25 companies
Managed ASP.NET Solution
Direct Processor Support

ASP ArticlesThis category has been added to your weekly newsletter
ASP Web Sites
ADSI & WSH BooksThis category has been added to your weekly newsletter
FREE ComponentsThis category has been added to your weekly newsletter
ASP EventsThis category has been added to your weekly newsletter
ASP HeadlinesThis category has been added to your weekly newsletter

CSharp ArticlesThis category has been added to your weekly newsletter
C# Web SitesThis category has been added to your weekly newsletter

SQL ArticlesThis category has been added to your weekly newsletter
SQL Events
SQL HeadlinesThis category has been added to your weekly newsletter
SQL Jobs

Jobs in CaliforniaThis category has been added to your weekly newsletter

XML ArticlesThis category has been added to your weekly newsletter
XML BooksThis category has been added to your weekly newsletter
XML Web Sites
XML Tutorials

free asp host

"Alex Homer"This search has been added to your weekly newsletter

Edit My Favorites Edit Profile & Favorites

 




Developersdex Home | ASP | C# | SQL | VB | XML | Gurus
Add Your Link | Add Your Code | FAQ | Advertise | Link To Us | Contact Us |
Copyright © 2010 Developersdex™. All rights reserved.