Stopping a command line profiling of IIS

Code profiling for .NET developers.

Moderator: dom.smith

Stopping a command line profiling of IIS

Postby ksjoberg » Thu Oct 03, 2013 8:59 am

Hi,

As a part of an automated performance test, we want to launch the ANTS Performance Profiler on an IIS site (keeping its original port), hit it with a web capacity test tool, stop the profiling and let it write out the reports and .app8results file.

However, there seems to be no way of stopping the profiling AND write out its results short of the profiled app stopping by itself (which IIS does not) or the profiling timing out (using the /timeout:xxx parameter). Obviously we want to stop the profiling after the web capacity test tool have completed, and in the best of worlds, we want to separate the profiling results into different "segments". For example: app startup, warm app, etc.

I acknowledge that of the above requests, some are relatively easy fixes and hopefully already in the product somewhere only I can't find them, and some are a higher hanging fruit. Nevertheless, they are all extremely valuable.
ksjoberg
 
Posts: 3
Joined: Thu Oct 03, 2013 8:48 am

Postby Chris.Allen » Fri Oct 04, 2013 12:09 pm

Please let me know if I'm summarising this accurately (one feature request at a time):

- you would like the Profile.exe to be able to receive a "signal" from the profiled process such that it stops profiling, writes results- but *does not* stop itself?

And the motivation for this is a more efficient use of time (since at the moment, time is being wasted profiling nothing).

- you would like to see 'marks' in the profiling results which indicated different phases of your application's lifecycle?


Happily- we may have the solution for you already ("user events"):

http://www.red-gate.com/supportcenter/c ... ine#o16339



(chapter entitled- "Adding custom event markers")

please let me know if this may help you here.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby ksjoberg » Sat Oct 05, 2013 3:20 pm

Not quite accurate. Let me explain.
you would like the Profile.exe to be able to receive a "signal" from the profiled process such that it stops profiling, writes results- but *does not* stop itself?


When a profiling of IIS is launched with the command line
Code: Select all
'C:\\Program Files\\Red Gate\\ANTS Performance Profiler 8\\Profile.exe' /timeout:210 /RecordSqlIo /force /data:C:\\PerfTest\\ProfileIIS.app8results /project:".\\iis8profile.app8"

The only way the ProfileIIS.app8results file is written to disk is if the profiling times out (in this case, after 210 seconds). This is because the w3wp.exe process of IIS does not automatically shutdown, and there are no ways to signal the profiler that "we're finished now, please save your data and detach the process!".

As it is currently, the timeout value specified needs to have margins for the load test to complete; even if the test completes in 60 seconds, the profiler will linger until it hits its timeout threshold.

In addition to this, because it takes a while for the IIS app to start up, we connect and start the profiling session too soon because in this instance, the code we want to profile is not the startup code or warmup section of the applications life time -- it's the runtime code, preferably after the application has "warmed up".

Therefore, the profiling data captured during the first few minutes are not of interest, but it is not negligible in its impact of the size of the generated profile data.
ksjoberg
 
Posts: 3
Joined: Thu Oct 03, 2013 8:48 am

Postby Chris.Allen » Mon Oct 07, 2013 1:20 pm

Ok- this certainly is a feature request so I will add it to our list internally, thanks!

Have you tried using the 'attach-to a .NET 4 process' feature?

Conceivably this might give you what you need- some work would need to be done getting the timings correct but when they were correct, you could attach, profile what you need, detach, and write results.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to ANTS Performance Profiler 8

Who is online

Users browsing this forum: No registered users and 0 guests