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

Add "delay" and "delayType" options to secnetperf tool #4807

Merged
merged 34 commits into from
Mar 5, 2025

Conversation

sm-msft
Copy link
Contributor

@sm-msft sm-msft commented Feb 12, 2025

Description

Add the ability to introduce server-side delays into data streams in the secnetperf tool.

  • Default/fixed delay introduces specific microseconds of busy-wait delay
  • Variable delay introduces an exponetially distributed random busy-wait delay.
  • Delays are introduced on a separate background thread right before the server sends a response to the client. This thread is pinned to a specific processor (same processor as the one on which the request was received) for predictable behavior.
  • Documentation/help text updated
  • Minor code reorganization

Testing

This change updates the test tool. Existing tests are all passing with this change.

Documentation

Documentation has been updated.

- Default/fixed delay introduces specific microseconds of inline busy-wait delay when the stream is established
- Variable delay introduces an exponetially distributed random busy-wait delay. This is capped at 1millisecond inline sleep.
- Documentation/help text updated
@sm-msft sm-msft assigned sm-msft and nibanks and unassigned sm-msft Feb 12, 2025
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.11%. Comparing base (da4cbd2) to head (e823f42).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4807      +/-   ##
==========================================
- Coverage   87.08%   86.11%   -0.97%     
==========================================
  Files          56       56              
  Lines       17685    17679       -6     
==========================================
- Hits        15401    15225     -176     
- Misses       2284     2454     +170     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nibanks nibanks changed the title - Add "delay" and "delayType" options to secnetperf tool Add "delay" and "delayType" options to secnetperf tool Feb 12, 2025
…and sending responses from the server.

  - Based on the perflib TCP worker threadpool code
  - 1 worker thread per processor
  - Existing code (QUIC/TCP) queues background work on the current processor only when a server response is due.
  - The existing Quic/TCP connection/stream is assumed to be available till the background operation completes
  - DelayWork thread adds appropriate amount of delay and then sends the response back on the appropriate stream
*Minor code reorganization in PerfServer.h
*Addressed review comments from prior iteration
…etion. This is handled when we eventually close the stream.
…objects to address send-after-close issues

Temp change to handle tcp debug exceptions
@nibanks nibanks merged commit 9af3725 into main Mar 5, 2025
390 of 391 checks passed
@nibanks nibanks deleted the user/sm/perf_with_simulated_delays branch March 5, 2025 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants