How to collect performance statistics with Cabal

Hécate December 23, 2024 [Cabal] #Performance #Profiling

The Cabal Manual now has a guide on how to collect performance statistics of Haskell applications.

This guide was very generously contributed by Malte Neuss. It describes the various options you can set in your cabal.project file in order to get a time or space profile of your application.

Project Configuration Guide

It is the recommended entry point for newcomers into the world of Haskell performance analysis. As you progress through it, you will be pointed to other resources like the Profiling section of the GHC Users Guide and the Haskell Optimization Handbook, which present you with more in-depth techniques and configuration options.

Moreover, you will be shown how to produce time and space profiles that can be rendered and analysed with third-party tools like Speedscope.

You can read it there: https://cabal.readthedocs.io/en/latest/how-to-enable-profiling.html.

Contribute to the documentation

The manual follows the documentation best practices of the Haddock team, and the Cabal team is eager to receive more contributions to improve the life of our users. Do not hesitate to open a pull request at https://github.com/haskell/cabal.

Cheers!