-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
Example output:
|
Looks useful @pepeiborra Once my branch starts getting merged in then some of these tests will become trivial lookups in a HashMap so will probably have to be modified to show anything useful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!
The one feature I'd have liked was the ability to do profiling. That requires installing ghcide
with profiling (a user step), passing +RTS -p
when starting ghcide (easy to change below) and then arranging for ghcide
to kill itself rather than be forcibly terminated by lsp-test, which I didn't have a good sense on how to do. Of course, this feature could definitely come later.
I implemented a nice way of allowing Another issue is that the benchmark invokes ghcide once per experiment, and afaik there is no way to redirect the profiling artifacts to a specific path, so the user would need to select only one experiment (or we change the test suite to run every experiment in a different folder). |
When I tried sending a close to ghcide it didn't exit, merely stopped responding to messages, so worth validating (I could well have screwed it up). Running ghcide on a single benchmark at a time seems what people would want to do, so no problem with that. Note that you might need to roll the stack.yaml files or explicitly override to get the latest version of extra included. |
Maybe you didn't send a
That's right, but then more user steps are needed, because the benchmark suite does not support selecting experiments to run. |
Ah, that would be it - I think I only sent a shutdown. Good to know, and even better that with this benchmark I don't need to know! |
(Neil's review feedback)
Thanks Pepe. I left a few comments but nothing critical to stop the merge imo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
* Initial benchmark suite, reusing ideas from Neil's post https://neilmitchell.blogspot.com/2020/05/fixing-space-leaks-in-ghcide.html * Add an experiment for code actions without edit * formatting * fix code actions bench script * error handling + options + how to run * extract Positions and clean up imports (Neil's review feedback) * replace with Extra.duration * allow ImplicitParams * add bench to the cradle * applied @mpickering review feedback * clean up after benchmark * remove TODO
* Initial benchmark suite, reusing ideas from Neil's post https://neilmitchell.blogspot.com/2020/05/fixing-space-leaks-in-ghcide.html * Add an experiment for code actions without edit * formatting * fix code actions bench script * error handling + options + how to run * extract Positions and clean up imports (Neil's review feedback) * replace with Extra.duration * allow ImplicitParams * add bench to the cradle * applied @mpickering review feedback * clean up after benchmark * remove TODO
* Initial benchmark suite, reusing ideas from Neil's post https://neilmitchell.blogspot.com/2020/05/fixing-space-leaks-in-ghcide.html * Add an experiment for code actions without edit * formatting * fix code actions bench script * error handling + options + how to run * extract Positions and clean up imports (Neil's review feedback) * replace with Extra.duration * allow ImplicitParams * add bench to the cradle * applied @mpickering review feedback * clean up after benchmark * remove TODO
The benchmark suite is designed to be run with
cabal bench
. It does not attempt to compare with past performance, I think that's better tackled as a separate task.The module comment in the benchmark module contains some details on the benchmark methodology and experiments, which currently cover the basics:
I have not made any attempts to integrate with CI since I don't know how consistent the timings would be across runs.
Goes some way towards closing #242