Skip to content

feat(routing): Add native solution tracing#1

Merged
erickreutz merged 1 commit into
masterfrom
eric/record-routing-solution-trace
Jul 26, 2026
Merged

feat(routing): Add native solution tracing#1
erickreutz merged 1 commit into
masterfrom
eric/record-routing-solution-trace

Conversation

@erickreutz

@erickreutz erickreutz commented Jul 26, 2026

Copy link
Copy Markdown
Member

Adds bounded native solution-progress tracing for RoutingModel solves.

enable_solution_trace records first, best, and latest objectives and timing, solution and improvement counts, total improvement, and bucketed samples. Every cold or warm solve resets the trace. Reusing the same configuration is idempotent.

The callbacks capture shared native state only. Search runs keep the existing no-GVL behavior; Ruby objects are built only by to_h under the GVL. The trace is mutex-protected for concurrent reads and explicitly armed only around the two solve entry points.

Validated with the full suite (107 tests, 371 assertions), Rice 4.8.0 on Ruby 3.3.10, and current Rice 4.12.0. A 60-solve interleaved benchmark measured 796.87ms untraced versus 797.06ms traced median wall time (0.02% overhead).

No gem release or downstream dependency change.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@erickreutz
erickreutz force-pushed the eric/record-routing-solution-trace branch from a7fa9bd to c579b7f Compare July 26, 2026 14:52
@erickreutz erickreutz closed this Jul 26, 2026
@erickreutz erickreutz reopened this Jul 26, 2026
@erickreutz
erickreutz force-pushed the eric/record-routing-solution-trace branch from c579b7f to d3a7010 Compare July 26, 2026 15:14
@erickreutz
erickreutz force-pushed the eric/record-routing-solution-trace branch from d3a7010 to b1ff7f2 Compare July 26, 2026 15:31
@erickreutz
erickreutz merged commit d720641 into master Jul 26, 2026
6 checks passed
@erickreutz
erickreutz deleted the eric/record-routing-solution-trace branch July 26, 2026 15:42
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