Use performance counter in self host web application
Asked Answered
C

1

8

I would like to stress test my Web Api self host application. This application is hosted on a Azure Worker Role.

I know how to get the performance counter from my Worker Role to my storage (for analytics) but because my web api are self hosted using Microsoft.Owin.Host.HttpListener,I don't know if there is some existing perf counters on which I can plug.

I've tried several counters perfmon :

  • AspNet Application
  • Web Service (this only allow me to select Web Application defined in IIS)

When I select the Process, I don't have the interesting counter like req/sec etc...

Is there a way to activate some counters for a Self Hosted Owin Application ?

only using configuration that I don't made? using an other self host? using additional components and modify my code? (adding attributes ..., I've seen something like that https://github.com/aliostad/PerfIt )

Thanks a lot.

Cissy answered 1/5, 2014 at 22:44 Comment(1)
Did you ever find the answer to this?Ricebird
D
1

I see you mentioned diagnostics, these are what I used in diagnostics:

<PerformanceCounterConfiguration counterSpecifier="\Asp.net\Request Execution Time" sampleRate="PT1M" />
                <PerformanceCounterConfiguration counterSpecifier="\ASP.net\Requests Rejected" sampleRate="PT1M" />
                <PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\Current Connections" sampleRate="PT1M" />
                <PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\Connection Attempts/sec" sampleRate="PT1M" />

What I did, was go into perfmon and right clicked "add counter" on my dev machine and then typed the names of what looked intersesting to me into cmd prompt like this:

typeperf "\Web Service(_Total)\Connection Attempts/sec"

I was able to test many out to see what was useful.

hope it helps,

=Devon

Diazotize answered 16/1, 2015 at 4:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.