Command line profiling of IIS website

Hi,

We are trying to automate the process of profiling a website using Performance profiler from command line.
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

Comments

  • Hi,

    To use command line profiling, you need to use Profile.exe, not RedGate.Profiler.UI.exe
    Dominic Smith,
    Project Manager,
    Redgate.
  • 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 ↔▬♣.?▬♣.☺▲♣()
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
Sign In or Register to comment.