Skip to content

refactor: calculate search stats more precisely - #533

Open
dkharms wants to merge 1 commit into
mainfrom
0-search-stats
Open

dkharms wants to merge 1 commit into
mainfrom
0-search-stats

Conversation

@dkharms

@dkharms dkharms commented Sep 18, 2026

Copy link
Copy Markdown
Member

Description

I've noticed that we don't account for the time spent waiting on the semaphore. And in general it is impossible to correctly calculate how much time is spent doing nothing -- for example, the previous code miscalculated the waiting time whenever we stalled on the semaphore.

In this pull request I've revisited this code, so that these two cases are much easier to tell apart:

  • We stall while acquiring the semaphore -— mean processing time is small, but semaphore waiting time is large;
  • We wait for a slow fraction in the batch -— max timing is high (while mean is not), and semaphore waiting time is low;

  • I have read and followed all requirements in CONTRIBUTING.md;
  • I used LLM/AI assistance to make this pull request;

If you have used LLM/AI assistance please provide model name and full prompt:

Model: {{model-name}}
Prompt: {{prompt}}

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.07692% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.22%. Comparing base (f580c5b) to head (7fbc902).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
fracmanager/search_stats.go 71.18% 16 Missing and 1 partial ⚠️
fracmanager/searcher.go 75.55% 10 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #533      +/-   ##
==========================================
- Coverage   71.32%   71.22%   -0.10%     
==========================================
  Files         250      251       +1     
  Lines       21779    21814      +35     
==========================================
+ Hits        15533    15538       +5     
- Misses       5093     5121      +28     
- Partials     1153     1155       +2     

☔ View full report in Codecov by Harness.
📢 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.

@eguguchkin eguguchkin added this to the v0.80.0 milestone Sep 21, 2026
@eguguchkin
eguguchkin requested review from cheb0, eguguchkin and forshev and removed request for cheb0 September 21, 2026 08:41
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.

3 participants