Skip to content

feat(pumpkin-core): Add additional (coarse) timing statistics - #554

Draft
EmirDe wants to merge 4 commits into
mainfrom
feature/profiling-time-statistics-coarse
Draft

feat(pumpkin-core): Add additional (coarse) timing statistics#554
EmirDe wants to merge 4 commits into
mainfrom
feature/profiling-time-statistics-coarse

Conversation

@EmirDe

@EmirDe EmirDe commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

In preparation for larger-scale profiling.

Adding measurements so that we can see how much time is being spent in:

  • Fixpoint propagation
  • Conflict analysis, and the two nogood minimisation mechanisms
  • Branching

This should be inexpensive to measure since we only record this once per fixpoint propagation call or conflict analysis.

I will later open a separate PR where we do a bit more detailed statistics per propagator.

Now this is a draft PR to see if there are any issue, overall it seems ready to me, but I have yet to run it on some instances.

@ImkoMarijnissen ImkoMarijnissen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, the current changes look good to me.

I recall that when I was doing fine-grained profiling when we were rewriting the solver that the time spent in measuring could be quite influential on performance, especially when there were many decisions/failures, so it would be good to profile!

We could consider using something like minstant or coarsetime if it turns out to be a bottleneck.

Comment thread pumpkin-crates/core/src/statistics/mod.rs
@ImkoMarijnissen ImkoMarijnissen changed the title Feature/profiling time statistics coarse feature(pumpkin-core): Add additional (coarse) timing statistics Sep 2, 2026
@ImkoMarijnissen ImkoMarijnissen changed the title feature(pumpkin-core): Add additional (coarse) timing statistics feat(pumpkin-core): Add additional (coarse) timing statistics Sep 2, 2026
@EmirDe

EmirDe commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Overall, the current changes look good to me.

I recall that when I was doing fine-grained profiling when we were rewriting the solver that the time spent in measuring could be quite influential on performance, especially when there were many decisions/failures, so it would be good to profile!

We could consider using something like minstant or coarsetime if it turns out to be a bottleneck.

For fine-grained profiling, I made it so that it is not run by default, and instead it is a compile-time flag that needs to be set, similar to how we do it for checking propagations. I want to run some tests to see how often to particular propagators run and how often they propagate (but this is for another PR).

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.

2 participants