Hi Jared,<br><br>First off, thanks for all the hard work on this. I checked out your branch and made a run, I noticed at the end it had<br><br>Framework failures:<br>   .  ./perf/compiler/all.T [] (unexpected indent (<string>, line 298))<br><br>so I assume none of the perf tests were run?<br><br>Though I do see a .git/refs/notes/perf, so I assume your ref is is perf?<br><br>Doing a git notes --ref perf show I see somethings were collected at some point<br><br>local   T3924   normal  bytes allocated 47064<br>local   haddock.base    normal  bytes allocated 18427047160<br>local   haddock.Cabal   normal  bytes allocated 15863910848<br>local   haddock.compiler        normal  bytes allocated 50656428952<br><br>which brings me up to my first question, I'm guessing the number here is the number of bytes allocated for the test? Is there a way for me to see<br>what the maximum deviation the test allows is and how far I am from it? Do I just get the information like before only when a test fails? How does that look like? Same as before?<br><br>It's also not entirely clear to be what perf_notes.py can be used, is it just an infrastructure tool? or is it something you foresee as useful for a developer?<br><br>lastly, how often do you update notes? It's probably too late for this now, but git, especially msys git can be especially slow, so I would have liked the notes to be updated in batches to not slow down the testsuite run on Windows.<br><br>Which brings me to my next question, how resilient are you to failures updating git? some IDE/environments like vscode automatically issue git operations in the background. so git may be busy when you try to update and the operation would fail saying the repo is locked. Does your new system recover from such failures?<br><br>Also how do you deal with platform discrepancies? We've had in the past tests that behave radically different on different platforms, so we've also historically had the ability to record a platform specific value. <br><br>Thanks,<br>Tamar<br><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 1, 2017, 05:01 Jared Weakly <<a href="mailto:jweakly@pdx.edu">jweakly@pdx.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey y'all,<br>
<br>
A quick ToC before I dive right in:<br>
<br>
* What my HSOC project is on<br>
* My progress so far<br>
* Feedback welcome<br>
* What I have left to do<br>
* Theoretical potential improvements<br>
<br>
-----------<br>
<br>
My HSOC project was on bringing sanity to the GHC performance test-suite.<br>
My blog post on this is here:<br>
<a href="https://jaredweakly.com/blog/haskell-summer-of-code/" rel="noreferrer" target="_blank">https://jaredweakly.com/blog/haskell-summer-of-code/</a><br>
The Trac ticket that corresponds to this is here:<br>
<a href="https://ghc.haskell.org/trac/ghc/ticket/12758" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/ghc/ticket/12758</a><br>
The Phabricator ticket for this patch: <a href="https://phabricator.haskell.org/D3758" rel="noreferrer" target="_blank">https://phabricator.haskell.org/D3758</a><br>
<br>
The tl;dr of my HSOC project is that GHC's performance tests currently<br>
require the programmer to add in expected numbers manually, updated<br>
them, handhold the testsuite, etc. This is a bit absurd and my<br>
project's overall aim is to reduce the effort required of the<br>
programmer to as close to zero as possible while simultaneously<br>
increasing the potential ability of the testsuite to catch regressions<br>
as much as possible.<br>
<br>
------------<br>
<br>
My progress so far:<br>
 - I have a few comparison tools in perf_notes.py. These allow people<br>
to compare performance numbers of tests across commits<br>
 - I have all the performance numbers generated by running the tests<br>
automatically stored in git notes and referenced by both the<br>
comparison tool and the testsuite<br>
 - I have refactored the testsuite to use my new code that pulls<br>
expected numbers automatically from git notes (trivially passing if<br>
the note does not yet exist for that test), then it compares that<br>
expected number with the number that was gotten from running the<br>
testsuite on the latest commit. The comparison passes if it's within a<br>
certain deviation (20% by default, but can be customized by the<br>
programmer).<br>
 - I have refactored all of the all.T files to use the new comparison<br>
functions for the performance tests and ensured that this doesn't<br>
break any existing tests.<br>
<br>
------------<br>
<br>
<br>
Anyone who wants to checkout the wip/perf-testsuite and try this out<br>
is more than welcome. Feedback on anything is welcome; comments are<br>
appreciated; discussion is welcome, etc.<br>
<br>
-------------<br>
<br>
<br>
What I have left to do is:<br>
<br>
1. Finish writing up the documentation<br>
2. Update the wiki in all the relevant places concerning<br>
additions/modifications to the testsuite and test driver<br>
3. Make sure everyone is happy with the change (and make small changes<br>
as necessary)<br>
<br>
--------------<br>
<br>
Possible features and improvements I am thinking about adding in:<br>
* As a stopgap to full integration with performance tracking tools<br>
(such as Gipedia), optionally emitting a test warning with the test<br>
summary if there is any regression detected whatsoever (even if the<br>
number falls within the allowed deviation)<br>
* Some tests, such as T7702, have a somewhat nonsensical regression<br>
percentage. Ideally the testsuite could handle those better. I could<br>
potentially build in multiple ways to determine a regression<br>
(percentage, 'above a certain value', 'taking longer than X amount of<br>
time', as potential examples)<br>
* Currently some tests require installing some Haskell packages; they<br>
are skipped if the packages are not installed. I could try to build in<br>
a way to automatically attempt to install all necessary Haskell<br>
packages if someone attempts to run a test that requires them.<br>
(Perhaps using a command such as 'make test exhaustive')<br>
* The performance metric 'peak_megabytes' is sometimes not accurate<br>
enough; I could see if adding something like `RTS -h -i0.01`<br>
automatically to tests that use 'peak_megabytes' would resolve that.<br>
Currently it is a manual debugging step.<br>
<br>
Any thoughts? Comments? Questions?<br>
<br>
Regards,<br>
Jared Weakly<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>