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 :
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.
Performance counters are bits of code that monitor, count, or measure events in software, which allow us to see patterns from a high-level view. They are registered with the operating system during installation of the software, allowing anyone with the proper permissions to view them.
In the navigation pane, expand Monitoring Tools, and then choose Performance Monitor. In the console pane toolbar, choose the Add button. In the Add Counters window, in the Select counters from computer drop-down list, choose the computer that is running Business Central Server.
When you run a Data Collector Set, the data that is collected for performance counters is stored to a log file (. blg) in the location that was defined when the Data Collector Set was created. In Windows Performance Monitor, you can view log files to see a visual representation of performance counter data.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With