Skip to content

Comments

perf: reduce fixed sleeps in test mode#1127

Closed
vringar wants to merge 1 commit intorefactor/storage-interfacefrom
refactor/reduce-sleeps
Closed

perf: reduce fixed sleeps in test mode#1127
vringar wants to merge 1 commit intorefactor/storage-interfacefrom
refactor/reduce-sleeps

Conversation

@vringar
Copy link
Contributor

@vringar vringar commented Feb 19, 2026

Summary

  • Reduce the 2s post-CommandSequence drain sleep to 0.1s when manager_params.testing is True
  • Reduce the 5s FinalizeCommand sleep to 0.1s when manager_params.testing is True
  • Production behavior unchanged

These are stopgap sleeps (documented as support for #135) that add ~7s per visit in tests.

Stacked on #1126.

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.31%. Comparing base (f286084) to head (d8a34a1).

Files with missing lines Patch % Lines
openwpm/browser_manager.py 0.00% 2 Missing ⚠️
openwpm/commands/browser_commands.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           refactor/storage-interface    #1127      +/-   ##
==============================================================
+ Coverage                       40.54%   43.31%   +2.77%     
==============================================================
  Files                              39       39              
  Lines                            3611     3613       +2     
==============================================================
+ Hits                             1464     1565     +101     
+ Misses                           2147     2048      -99     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vringar vringar force-pushed the refactor/reduce-sleeps branch from 182967b to d22e33c Compare February 20, 2026 12:17
@vringar vringar force-pushed the refactor/storage-interface branch from aa79ddd to d333dbf Compare February 20, 2026 12:17
@vringar vringar changed the base branch from refactor/storage-interface to master February 20, 2026 12:21
@vringar vringar changed the base branch from master to refactor/storage-interface February 20, 2026 12:24
Make the 2s CommandSequence drain sleep and 5s FinalizeCommand sleep
configurable based on manager_params.testing. In test mode, use 0.1s
instead, significantly reducing per-visit overhead.
@vringar vringar force-pushed the refactor/reduce-sleeps branch from d22e33c to d8a34a1 Compare February 20, 2026 12:41
@vringar vringar force-pushed the refactor/storage-interface branch from d333dbf to f286084 Compare February 20, 2026 12:41
@vringar
Copy link
Contributor Author

vringar commented Feb 20, 2026

Folded into #1128 — sleep reductions only make sense alongside the event-driven replacement.

@vringar vringar closed this Feb 20, 2026
@vringar vringar deleted the refactor/reduce-sleeps branch February 20, 2026 12:55
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