Skip to content

Add routing solution tracing - #86

Open
erickreutz wants to merge 1 commit into
ankane:masterfrom
lugg:eric/upstream-solution-tracing
Open

Add routing solution tracing#86
erickreutz wants to merge 1 commit into
ankane:masterfrom
lugg:eric/upstream-solution-tracing

Conversation

@erickreutz

Copy link
Copy Markdown
Contributor

Long routing searches currently expose only the final assignment, so callers cannot measure when feasible and improved solutions appear. This adds an opt-in, bounded native solution trace for cold and warm routing solves.

The trace records first, best, and latest objectives and timing, aggregate solution counts, and bucketed strict improvements. Callbacks capture mutex-protected native state only; Ruby objects are created by to_h under the GVL, and the existing no-GVL solve paths remain unchanged.

The default trace retains at most 64 samples, allocation is capped at 100,000, and an interleaved benchmark measured 0.02% median overhead.

Expose an opt-in native trace for cold and warm routing solves. Record bounded solution improvements without Ruby callbacks or changing existing no-GVL solve paths.
@erickreutz erickreutz changed the title feat(routing): Add solution tracing Add routing solution tracing Jul 28, 2026
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