Repository navigation
chore: Move locks into batcher subclasses - #8325
alexander-alderman-webb wants to merge 4 commits into
Conversation
Coverage Results 📊✅ 59241 passed | ⏭️ 3047 skipped | Total: 62288 | Pass Rate: 95.11% | Execution Time: 176m 50s 📊 Comparison with Base Branch
✨ Test counts unchanged from base. All tests are passing successfully. ✅ Patch coverage is 82.03% (105 of 128 changed executable lines covered; target 80%). Changed files with executable lines (4)
Coverage diff@@ Coverage Diff @@
## master #8325 +/-##
==========================================
- Coverage 90.11% 90.05% -0.06%
==========================================
Files 200 200 —
Tracked lines 22098 22178 +80
Branches 7746 7770 +24
==========================================
+ Hits 19913 19971 +58
- Misses 2185 2207 +22
- Partials 1277 1282 +5Generated by Coverage Action |
sentrivana
left a comment
There was a problem hiding this comment.
I didn't check line-by-line but I assume there are no actual changes in the code, it was just moved? If that's not the case lmk and I'll take a closer look
| with capture_internal_exceptions(): | ||
| self._flush() | ||
|
|
||
| def add(self, item: "T") -> None: |
There was a problem hiding this comment.
Would be good to leave a stub for add() here so that the base class advertises it as part of the batcher "protocol"
|
Yes the code was just copied into the subclasses, there shouldn't be any behavior change. |
|
Why do this in the first place? 👀 I just had a look at the other PRs. I'd thought you wanted to use the new base class in them, but it looks like the new metrics batcher doesn't inherit from |
|
Good shout, I did it without inheritance at first to make iterating easier, and forgot to wire the superclass in 😞. |
Move everything that relies on
Batcher._lockinto subclasses to enable writing a lock-free metrics batcher.