Command line profiling of IIS website

Code profiling for .NET Developers

Moderators: Luke Jefferson, StephenC, Alex.Davies, AndrewH, melvyn.harbour, Laura Morley

Command line profiling of IIS website

Postby Narmatha » Mon Jan 31, 2011 9:58 pm

Hi,

We are trying to automate the process of profiling a website using Performance profiler from command line.
Code: Select all
RedGate.Profiler.UI.exe /project:DC-AfterImproments.app6 /verbose /methodLevel /onlyWithSource /force /timeout:60  /htmlreport:NewResults.summary.html


When I execute this, the profiler application opens and does not start profiling immediately. Instead, it waits for the user to provide the url for the website to be profiled and click on the 'profile' button. The project name provided for the /project argument is the project to be profiled.

Can you please let me know how to automate the profile process
Narmatha
 
Posts: 3
Joined: Mon Jan 31, 2011 8:35 pm

Postby dom.smith » Tue Feb 01, 2011 11:06 am

Hi,

To use command line profiling, you need to use Profile.exe, not RedGate.Profiler.UI.exe
Dominic Smith,
Project Manager,
Red Gate Software.
dom.smith
 
Posts: 95
Joined: Thu Jun 03, 2010 5:54 pm
Location: Cambridge, UK

Command line profiling of IIS website

Postby Narmatha » Tue Feb 01, 2011 5:14 pm

Hi,

Thanks for your reply.
But when the profiler is trying to start down, it throws an error. And teh results are not written

C:\\Program Files\\Red Gate\\ANTS Performance Profiler 6>Profile.exe /project:test
app6 /verbose /methodLevel /onlyWithSource /force /timeout:60 /htmlreport:NewR
sults1.summary.html
ANTS Performance Profiler Command Line Utility V6.1.0.119
==============================================================================
Copyright c Red Gate Software Ltd 2010


== Initialising profiler

log4net:WARN XmlHierarchyConfigurator: Unable to set property [securityContext]
on object [log4net.Appender.FileAppender] using value [log4net.Util.NullSecurit
Context.Instance] (with acceptable conversion types)
Using the settings from the project file 'test.app6'
Preparing session
Starting IIS Profiling Host
Initializing ...
Stopping W3SVC ...
Error while starting IIS
Error while starting IIS
Error while trying to launch the application process

Exception
=========

RedGate.Profiler.Engine.Exceptions.CannotStartSessionException:
Could not start IIS.
at ?§♣.↑▬♣.Launch()
at ↓☼♣.¶?☻.►‼(Licence )
at ↓☼♣.¶?☻.??♥(String[] )

Caused by RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException:
Could not start IIS.
at ?§♣.◄↑♣.§↔♣()
at ?§♣.↑▬♣.Launch()

Caused by RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException:
Error stopping W3SVC
at ?→►.↓?►.??♥()
at ?§♣.↑▬♣.??♥(↔←► )
at ?§♣.◄↑♣.§↔♣()

Caused by RedGate.Profiler.Engine.Startup.IIS.IISException:
Error stopping W3SVC
at ↔▬♣.?▬♣.☺▲♣()
at ↔▬♣.?▬♣.StartProfilingIIS(String , String )
at RedGate.Profiler.Engine.Startup.IIS.IISStarter`1.StartProfilingIIS(String
currentUserName, String subprocessVariableValue)
at ?→►.↓?►.??♥()

Caused by RedGate.Profiler.Engine.Startup.IIS.ServiceUtilitiesException:
Timed out starting 'W3SVC'
at ▬↨♣.?↨♣.¶⌂♣(String )
at ↔▬♣.?▬♣.☺▲♣()
Narmatha
 
Posts: 3
Joined: Mon Jan 31, 2011 8:35 pm

Postby Brian Donahue » Wed Feb 02, 2011 10:31 am

From the messages I would say that your project specifies the "profile on original port" option, which causes an IIS restart and doesn't enable you to profile on the original port anyway unless IIS is not running.

On IIS v6 and up, the way that ANTS Profiler starts a worker process requires a TCP port that is not in use.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to ANTS Performance Profiler 6

Who is online

Users browsing this forum: No registered users and 1 guest