WebLens Standard

Monitor Transactions and Locate Bottlenecks

David Mack

October 30, 2009

5 Min Read
ITPro Today logo in a gray background | ITPro Today

asp:review

 

WebLens Standard

Monitor Transactions and Locate Bottlenecks

 

By David Mack

 

If you ve ever tried to find a bottleneck in your code,chances are you wished for a tool like WebLens from Altiras. It allows you tomonitor transactions and determine where the performance issues with your Webapplications are located. WebLens will profile ASP.NET, P/Invoke, COM Interop,and Web services. And because most Web applications have a logical databaselayer associated with them, you can also profile SQL, Active Directory, andODBC calls.

 

The installation isn t that difficult, basically givingyou a choice of installing a server or client. The server-based software willreside on your Web site and collect statistics about your Web application. Theclient-based software will connect to the database used by the server softwareand retrieve and display the information the server has collected. Theinstallation also includes a distribution of the .NET Framework, as well asMSDE. Although it does make for a longer download, it s nice because all therequisite software is there except the OS and IIS.

 

I had a small Web application that I thought had a minorperformance issue. Two things immediately got my attention: I didn t have toregister the Web application as WebLens automatically detected it, and I didn thave to change any code to get a profile of my code.

 

WebLens doesn t automatically profile every transaction;you have to right-click on the target application (see Figure 1) and a filterdialog box is displayed. You are given choices of how you want to monitor thetarget application. I could profile using only transactions within aclass/namespace, an arbitrary number of transactions, or both. I could also simplylet it profile the entire application. Obviously this would result in moreinformation to weed through; but if it s necessary, you can do it. Once I set upmy filter, I executed the code, then went back to the profiler to do someanalysis.

 

WebLens showed the transactions that it captured, as wellas the duration of the transactions. I clicked on the slowest transaction andtook a look at it. Using a toolbar I was able to view a graphicalrepresentation of my transaction, showing me how long the presentation layertook to execute, as well as the Web service proxy, Web service, and database. Becauseit s a chronological graph, you can easily determine which part of thetransaction is the bottleneck. If you continue to drill down into thattransaction, you are given the same information in graphical form and text. Apie chart on the right has all the functions broken down by time-based expense.WebLens refers to this as the Duration Chart . On the left you have all thefunctions displayed in a list with their associated expense. From here you cancontinue to drill down into lower functions or decide if you ve found yourculprit. In my particular case, I was repeatedly opening a database connectionI didn t need. I would ve found this issue eventually, but it was definitelyquicker with WebLens.

 


Figure 1: Right-click the targetapplication to start a WebLens profile.

 

I wanted to verify that WebLens wasn t actually skewingthe results of my target application, so I ran the same IIS code on twodifferent machines: One with WebLens running and the other as a control. I sawvery little difference in the execution times and I attributed that to minordifferences in configuration of IIS. Once I determined it wasn t skewing, Ipointed it toward a transaction and analyzed the results. It did slow it down,but not tremendously and that s the cost of profiling. I like the fact thatmy entire application isn t being hampered unnecessarily. If I configure it tocapture 15 events, it captures up to that amount and then stops profiling, thusremoving any drag on the application.

 

On a larger application I began to experiment with thetransaction filter. Some of the features there included the ability to profiletransactions based on a count, or based on time (x number of seconds). There are quite a few permutations WebLensallows you to create to pinpoint what you want to see. One capability I did useoften was the ability to exclude certain transactions, which cut down on theinformation I had to process. Once I found some interesting points, I couldexport them to XML via the main menu.

 

One behavior I noticed was that if you have caching turnedon in IIS, WebLens doesn t catch those transactions and, consequently, doesn tgive you a profile. It s an easy workaround to disable the caching in a .aspxfile, but be aware of that while you are using the tool. I also noticed thatconstructor calls had the standard notation of .ctor instead of the ClassName. Onceagain, this is not something major, it s just something to be aware of whenreading your results.

 

WebLens is a good product that can immediately paydividends. Ultimately, it will result in a better user experience. It s alsoworthwhile because of the time and frustration that can be saved by a developer;test teams should also consider using this product if they have certainperformance requirements. It s impossible to eliminate all the bottlenecks inyour code, but you should always try to minimize them and WebLens will helpyou do just that.

Rating:

Web Site: http://www.altiris.com

Price: US$400

 

David Mack is asenior software engineer for Northrop Grumman and an independent consultant. Hehas more than 12 years of experience in object-oriented programming. Reach himat mailto:[email protected].

 

 

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like