Skip to content

cabal-install: add --build-timings flag#11769

Merged
mergify[bot] merged 1 commit into
haskell:masterfrom
sheaf:build-timings
Jun 28, 2026
Merged

cabal-install: add --build-timings flag#11769
mergify[bot] merged 1 commit into
haskell:masterfrom
sheaf:build-timings

Conversation

@sheaf

@sheaf sheaf commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

This new flag makes cabal-install dump timing information for the various stages of building a package. This allows us to better see how much time is spending in configure/build stages.

I used this to figure out where we were wasting time for PRs #11767 and #11768. I think it makes sense to add it as a flag so that all users can get better observability (a bit like the -dshow-passes GHC flag).


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:

@TeofilC TeofilC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks great to me!

I am currently working on a tool for nicely visualizing module graph build times. I think I could probably be able to use the same tool for visualizing package graph build times.

If this is accepted, then I might make a followup PR to also output this information to a file in dist-newstyle (along with dependency information) and that should work well with my tool

Comment thread cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs Outdated
Comment thread cabal-install/src/Distribution/Client/ProjectBuilding/UnpackedPackage.hs Outdated

@Mikolaj Mikolaj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

Comment thread changelog.d/build-timings.md
@ulysses4ever

Copy link
Copy Markdown
Collaborator

Thanks for the PR!

I don't want to drag this longer than necessary, but I can't stand asking: how about a machine-readable version of this? Basically, spitting a CSV might be nice. But again it's more of food-for-thought kind of quetsion rather than an actual concern.

@sheaf

sheaf commented May 4, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the PR!

I don't want to drag this longer than necessary, but I can't stand asking: how about a machine-readable version of this? Basically, spitting a CSV might be nice. But again it's more of food-for-thought kind of quetsion rather than an actual concern.

Yes, that would be nice as well. I think I will let @TeofilC take care of that, given that he has a direct use case for it. I just put up this PR as it's what I was using to benchmark #11768 and #11767 and I thought it might be generally useful.

@sheaf sheaf force-pushed the build-timings branch 2 times, most recently from 85d962c to e4e4801 Compare May 4, 2026 09:19
@Mikolaj

Mikolaj commented Jun 18, 2026

Copy link
Copy Markdown
Member

@sheaf: do you think this is ready for merging? If so, could you set a label.

@sheaf sheaf added the merge me Tell Mergify Bot to merge label Jun 18, 2026
@mergify mergify Bot added ready and waiting Mergify is waiting out the cooldown period merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days waiting too long automatically set by Mergify to trigger a warning labels Jun 18, 2026
@zlonast

zlonast commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

@sheaf may have missed it too

This new flag makes cabal-install dump timing information for the
various stages of building a package. This allows us to better see how
much time is spending in configure/build stages.
@mergify

mergify Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added the queued label Jun 27, 2026
@mergify

mergify Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 7 hours 31 minutes 28 seconds in the queue, including 1 hour 53 minutes 11 seconds running CI.

Waiting for
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
    • check-success = Doctest Cabal
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Meta checks
    • check-skipped = Meta checks
    • check-success = Meta checks
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Validate post job
    • check-skipped = Validate post job
    • check-success = Validate post job
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
    • check-success = Bootstrap post job
  • any of: [🛡 GitHub branch protection]
    • check-neutral = Changelogs
    • check-skipped = Changelogs
    • check-success = Changelogs
All conditions
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
    • check-success = Doctest Cabal
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Meta checks
    • check-skipped = Meta checks
    • check-success = Meta checks
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Validate post job
    • check-skipped = Validate post job
    • check-success = Validate post job
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
    • check-success = Bootstrap post job
  • any of [🛡 GitHub branch protection]:
    • check-neutral = Changelogs
    • check-skipped = Changelogs
    • check-success = Changelogs
  • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of [🛡 GitHub branch protection]:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of [🛡 GitHub branch protection]:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of [🛡 GitHub branch protection]:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job

Reason

The merge conditions cannot be satisfied due to failing checks

  • docs/readthedocs.org:cabal
  • fourmolu
  • hlint
  • whitespace
  • Check sdist post job
  • Changelogs

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

mergify Bot added a commit that referenced this pull request Jun 27, 2026
@zlonast

zlonast commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

@Mergifyio queue

@mergify

mergify Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 5 hours 31 minutes 36 seconds in the queue, including 3 hours 33 minutes 52 seconds running CI.

Reason

The merge conditions cannot be satisfied due to failing checks

  • Doctest Cabal
  • Meta checks
  • docs/readthedocs.org:cabal
  • Validate post job
  • fourmolu
  • hlint
  • Bootstrap post job
  • whitespace
  • Check sdist post job
  • Changelogs

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

@mergify mergify Bot added queued and removed dequeued labels Jun 28, 2026
mergify Bot added a commit that referenced this pull request Jun 28, 2026
@mergify mergify Bot added dequeued and removed queued labels Jun 28, 2026
@zlonast

zlonast commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

@Mergifyio queue

@mergify

mergify Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 1 hour 59 minutes 52 seconds in the queue, including 1 hour 49 minutes 1 second running CI.

Required conditions to merge
  • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Doctest Cabal
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Meta checks
    • check-neutral = Meta checks
    • check-skipped = Meta checks
  • any of [🛡 GitHub branch protection]:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Validate post job
    • check-neutral = Validate post job
    • check-skipped = Validate post job
  • any of [🛡 GitHub branch protection]:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of [🛡 GitHub branch protection]:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of [🛡 GitHub branch protection]:
    • check-success = Bootstrap post job
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
  • any of [🛡 GitHub branch protection]:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of [🛡 GitHub branch protection]:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job
  • any of [🛡 GitHub branch protection]:
    • check-success = Changelogs
    • check-neutral = Changelogs
    • check-skipped = Changelogs

@mergify mergify Bot added queued and removed dequeued labels Jun 28, 2026
mergify Bot added a commit that referenced this pull request Jun 28, 2026
@mergify mergify Bot merged commit d1fc7dc into haskell:master Jun 28, 2026
79 checks passed
@mergify mergify Bot removed the queued label Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period waiting too long automatically set by Mergify to trigger a warning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants