Thanks Adam for pointing me in the righ direction. I've attempted a MR with some questions in them [1].

However, I have no clue about what this test [2] really does (why are there unused functions called `unusedXX` ?).
If someone could give me a quick overview, that would be great.


Cheers,

[1] MR 6457
[2] https://github.com/zachjs/ghc-issue-20261/blob/main/Parse.y

On Sun, Aug 29, 2021 at 9:56 PM Adam Gundry <adam@well-typed.com> wrote:
Hi Alexis,


On 29/08/2021 17:42, Alexis Praga wrote:
> As a intermediate beginner in Haskell, I want to try to tackle a small
> issue for contributing to GHC.

Welcome! Thanks for trying your hand at contributing to GHC.


> I've looked into https://gitlab.haskell.org/ghc/ghc/-/issues/20261, but
> it's not clear how to integrate a running time in a regression test.
>
> From what I understand, regression tests should be compared against
> sucess/failure or a given output.
> Should there be a hard-coded limit ? If that's the case, how could I
> create such a test ?  I could not find a similar test in the source
> code.

Have a look in testsuite/tests/perf/compiler. That directory contains a
number of compiler performance tests, which work by having the test
runner compare metrics about the compilation run for the current commit
vs. previous commits. The all.T file lists the tests to run and the
metrics to collect.

There's more details on the wiki:
https://gitlab.haskell.org/ghc/ghc/-/wikis/building/running-tests/adding#performance-tests

Hope this helps,

Adam


--
Adam Gundry, Haskell Consultant
Well-Typed LLP, https://www.well-typed.com/

Registered in England & Wales, OC335890
118 Wymering Mansions, Wymering Road, London W9 2NF, England


--

   Alexis Praga