Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] [Asp.Net Core] Measure req/sec with instrumentation #5138

Conversation

vishweshbankwar
Copy link
Member

@vishweshbankwar vishweshbankwar commented Dec 6, 2023

Measures req/sec impact on a ASP.NET Core app(targeting .NET8.0) with instrumentation enabled using https://github.com/codesenberg/bombardier

Command used:

bombardier-windows-amd64.exe -c 1 -n 1000000 http://localhost:5000/weatherforecast

Results

  1. Trace And Metric Instrumentation
Bombarding http://localhost:5000/weatherforecast with 1000000 request(s) using 1 connection(s)
 1000000 / 1000000 [========================================================================================================================] 100.00% 6002/s 2m46s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec      6005.23     509.48    7084.00
  Latency      165.13us   117.97us   117.31ms
  HTTP codes:
    1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:     3.57MB/s
  1. Trace Instrumentation
Bombarding http://localhost:5000/weatherforecast with 1000000 request(s) using 1 connection(s)
 1000000 / 1000000 [========================================================================================================================] 100.00% 6112/s 2m43s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec      6118.72     507.04    7395.20
  Latency      162.23us    94.47us    92.02ms
  HTTP codes:
    1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:     3.64MB/s
  1. Metric Instrumentation
Bombarding http://localhost:5000/weatherforecast with 1000000 request(s) using 1 connection(s)
 1000000 / 1000000 [========================================================================================================================] 100.00% 6427/s 2m35s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec      6431.07     540.13    7982.89
  Latency      154.04us   109.53us   101.28ms
  HTTP codes:
    1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:     3.83MB/s
  1. No Instrumentation
Bombarding http://localhost:5000/weatherforecast with 1000000 request(s) using 1 connection(s)
 1000000 / 1000000 [========================================================================================================================] 100.00% 6784/s 2m27s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec      6789.88     588.87    7867.86
  Latency      144.79us   104.19us   102.57ms
  HTTP codes:
    1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:     4.04MB/s
  1. Diagnostic Source subscription
Bombarding http://localhost:5000/weatherforecast with 1000000 request(s) using 1 connection(s)
 1000000 / 1000000 [========================================================================================================================] 100.00% 6460/s 2m34s
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec      6461.67     530.93    7783.66
  Latency      153.22us   107.38us   106.49ms
  HTTP codes:
    1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:     3.84MB/s

Summary

  1. In case when both trace and metric instrumentation is enabled, req/sec dropped by ~13%
  2. In case when just trace instrumentation is enabled, req/sec is dropped by ~11%
  3. In case when just metric instrumentation is enabled, req/sec is dropped by ~5.5%
  4. In case when just the diagnostic source subscription is enabled without activity/metric enrichment, req/sec is dropped by ~5%. This test is just to calculate the overhead caused by subscribing to DiagnosticSource events.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Merging #5138 (cd0cb2e) into main (bb3a91a) will increase coverage by 0.19%.
Report is 6 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5138      +/-   ##
==========================================
+ Coverage   82.81%   83.01%   +0.19%     
==========================================
  Files         296      296              
  Lines       12320    12320              
==========================================
+ Hits        10203    10227      +24     
+ Misses       2117     2093      -24     
Flag Coverage Δ
unittests 83.01% <ø> (+0.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 3 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant