RCBC-551: FIT performer - add support for CounterEq bounds type#238
Merged
Merged
Conversation
DemetrisChr
force-pushed
the
RCBC-551-countereq-bounds
branch
from
July 3, 2026 16:10
e1e17ed to
67243c3
Compare
DemetrisChr
marked this pull request as ready for review
July 3, 2026 16:13
DemetrisChr
force-pushed
the
RCBC-551-countereq-bounds
branch
from
July 7, 2026 16:45
67243c3 to
1e1cea6
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends the FIT performer to support the new counter_eq bounds type (where the driver can signal a workload to stop by mutating a shared counter), introduces performer-global counters, and wires in the new setCounter / clearAllCounters RPCs. It also refactors workload bounds handling into dedicated bounds classes implementing a common #can_execute? interface.
Changes:
- Refactor bounds evaluation into
FIT::Performer::Bounds::*classes and update workloads to loop on@bounds.can_execute?. - Introduce performer-global counters backed by
Concurrent::AtomicFixnum, plussetCounter/clearAllCountersservice endpoints. - Thread executor and workload construction updated to pass a shared counters container into workloads.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| fit-performer/lib/fit/performer/workloads/sdk_workload.rb | Updates execution loop to rely on @bounds.can_execute? and adjusts signatures to accept global counters at init. |
| fit-performer/lib/fit/performer/workloads/base_workload.rb | Creates bounds object during workload initialization (now requires bounds module). |
| fit-performer/lib/fit/performer/workloads.rb | Passes the global counters container through workload construction. |
| fit-performer/lib/fit/performer/service.rb | Adds global counters lifecycle plus set_counter / clear_all_counters RPC implementations. |
| fit-performer/lib/fit/performer/multi_thread_executor.rb | Passes shared counters to workloads and simplifies workload invocation to execute(results). |
| fit-performer/lib/fit/performer/counters.rb | New thread-safe counters container (currently has a deadlock issue in set_counter_value). |
| fit-performer/lib/fit/performer/bounds.rb | New bounds factory (currently incorrectly reads counter_eq using counter). |
| fit-performer/lib/fit/performer/bounds/simple.rb | New “run once through commands” bounds implementation. |
| fit-performer/lib/fit/performer/bounds/for_time.rb | New time-based bounds implementation. |
| fit-performer/lib/fit/performer/bounds/counter.rb | New counter-decrement bounds implementation (minor doc typo). |
| fit-performer/lib/fit/performer/bounds/counter_equality.rb | New counter-equality bounds implementation (baseline semantics likely need alignment with proto initial value). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DemetrisChr
marked this pull request as draft
July 7, 2026 16:59
DemetrisChr
force-pushed
the
RCBC-551-countereq-bounds
branch
from
July 7, 2026 17:08
1e1cea6 to
09b4a40
Compare
DemetrisChr
marked this pull request as ready for review
July 7, 2026 17:08
avsej
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Should be merged after #237
Changes
#can_execute?)Concurrent::AtomicFixnum