-
Notifications
You must be signed in to change notification settings - Fork 10
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
Optimize Report merging #867
Conversation
This change tries to optimize the slow `Report.merge` operation. When merging report `B` into an existing report `A`, we can just use `B` in case `A` is empty. Also, the speed of merging depends on the size of the right hand size Report (`B` in this example). By swapping the reports, we can make sure to always merge the smaller Report into the larger one.
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #867 +/- ##
==========================================
- Coverage 97.93% 97.93% -0.01%
==========================================
Files 444 444
Lines 35476 35475 -1
==========================================
- Hits 34744 34743 -1
Misses 732 732
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## main #867 +/- ##
==========================================
- Coverage 97.93% 97.93% -0.01%
==========================================
Files 444 444
Lines 35476 35475 -1
==========================================
- Hits 34744 34743 -1
Misses 732 732
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #867 +/- ##
==========================================
- Coverage 97.93% 97.93% -0.01%
==========================================
Files 444 444
Lines 35476 35475 -1
==========================================
- Hits 34744 34743 -1
Misses 732 732
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #867 +/- ##
==========================================
- Coverage 97.93% 97.93% -0.01%
==========================================
Files 444 444
Lines 35476 35475 -1
==========================================
- Hits 34744 34743 -1
Misses 732 732
Flags with carried forward coverage won't be shown. Click here to find out more.
|
session_mapping[intermediate_report.upload_id] = new_sessionid | ||
|
||
if master_report.is_empty() and old_sessionid == new_sessionid: | ||
# if the master report is empty, we can avoid a costly merge operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happens the very first time there's an upload for a commit right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes exactly, except when using carry-forwards
This change tries to optimize the slow
Report.merge
operation.When merging report
B
into an existing reportA
, we can just useB
in caseA
is empty. Also, the speed of merging depends on the size of the right hand size Report (B
in this example). By swapping the reports, we can make sure to always merge the smaller Report into the larger one.