Question on running perf profiling in instrumentation.
Hello,
I'm new to performance testing, and I'm trying to grab a performance profile in Instrumentation mode on my ASP.Net application.
I have an ASP.Net project and a C# class library, on August CTP, which contains a custom webcontrol that i would like to study its performance. All the references have been set up under the ASP.Net project and everything runs and compiles perfectly. The ASP.Net project is configured to use local IIS.
However, the profiler while in instrumentation mode doesn't collect data on the methods in my class library assembly (which contains the web control i wish to see some perf data on). I launch the profiling session on an aspx page that contains instances of my web control and run a few postbacks. However, only information on the control's properties and constructor is collected. I would like to see perf data on the Render method for example.
Profiling in sampling mode does not have this problem and it successfully captures the samples that in the control's methods.
I'm under the impression that instrumentation mode will collect data on all the methods that run during a session. I've tried searching for more information on instrumentation but have not found anything to lead me in the right direction. Is this by design or is there some configuration that I'm missing out on?
Many thanks for any guidance.
[1371 byte] By [
Haw] at [2008-3-7]
Haw,
It sounds to me like you are only instrumenting the ASP.net application and not instrumenting the C# class library. In instrumentation mode you need to have all the binaries that you want to collect data on added to the performance session and marked for instrumentation. This would explain why you are not getting data for your C# class library.
To add a binary, right-click on the "Targets" folder in your performance session and choose "Add Target Binary." Then navigate to the C# class library that your ASP.net application is consuming and add it. Then right click on the new Target that you just added and check to make sure that instrumentation is checked.
If you are already adding and instrumenting the C# project, then perhaps you can tell me a little more about your scenario and I can help diagnose why you are not seeing all the data that you want.
~Ian
Hello Ian,
Thanks for your reply. What you've mentioned has led me to identify the source of my problem.
I did have my class library assembly set up as a profiling target and enabled instrumentation on it. I did this via "Add Target Project" and having selected the class library project within the solution. Also, I have my solution on Source control, as such, i have tried using "Add Target Binary" to include the assembly off my sourcesafe working folder which happens to be in the default VS2005 projects folder in "My Documents". Both methods yielded the situation i described in my first post.
My ASP.Net project was created via VS2005's "New web site" dialog where i had it create a new application folder for its use under local IIS. I had wrongly assumed that VS would have configured this application to point to my sourcesafe working folder. I was unaware that VS would build and copy my application files to another folder (within C:\inetput\wwwroot\mywebsite) and run from that location.
VS was able to instrument the aspx files despite being run from c:\inetpub\wwwroot\mywebsite, but not the assembly in the bin folder. As it turns out, my output window had always indicated a successful instrumentation of the class library assembly off my sourcesafe working folder, i thought everything was working the way its supposed to, and hadn't suspected that there were 2 copies of the assembly file, and that the profiler had instrumented the wrong one. Pointing the profiler to the asembly within wwwroot fixes the situation.
Is this behaviour by design? It is rather misleading that using "Add Target Project" would have missed out the correct assembly.
In any case, many thanks, and i appreciate your help.
Haw
P/S : If it matters, I'm running on Windows XP SP2.
Haw at 2007-9-9 >
