-
-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HLS benchmarks #3117
HLS benchmarks #3117
Conversation
@@ -366,13 +360,12 @@ common brittany | |||
build-depends: hls-brittany-plugin ^>= 1.0 | |||
cpp-options: -Dhls_brittany | |||
|
|||
executable haskell-language-server | |||
library plugins |
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 might make it impossible to use stack for loading HLS into HLS. I.e. HLS needs to be configured to use cabal for development with this change due to commercialhaskell/stack#4564
Not a biggie, just fyi
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.
Finally time to drop the stack descriptors and the Circle CI
3ca8f60
to
bc907e9
Compare
Great! Is there a reason not to delete the |
I am actively deleting it. But maybe I missed some code. |
78ffc49
to
b664c0b
Compare
This is ready for review. CI is setup to run benchmarks for the plugin configurations defined in
haskell-language-server/bench/config.yaml Lines 83 to 161 in 78ffc49
The results show that hls-hlint-plugin is, unsurprisingly, the most expensive plugin, followed closely by Tactics. There is certainly margin for improvement:
|
17baae3
to
228d6a4
Compare
Excellent. There are still some files in |
The ghcide test suite references them, so a bit more work is required to move them. To be more precise, we have:
Both things could be moved to |
I took a look and
Part 1 is a bit scary, I don't know how much work it will be. |
6ce2ae4
to
80e8622
Compare
Yeah, step 1 looks scary, especially because then the ghcide tests would depend on hls-test-utils which depends on ghcide? Not sure if that would work. Would we need to do step 2? Wouldn't we just fold it into the HLS benchmark suite? |
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.
Haven't looked at the actual benchmarking code, I trust you on that, just superficial comments.
|
||
basicTests :: TestTree |
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.
seems marginally useful, are we just losing this?
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.
We are losing the example plugins. There's hardly any point when we have a nice tutorial and 25? existing plugins that can serve as example
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.
👍 Might as well delete their source too then?
Looks like you're going ahead with a |
Yeah, but I avoided the scary step 1 by duplicating some things from the ghcide test suite. Can be deleted when/if they are extracted to a helper package |
The main goal here is to move the Plugins module into an internal library so that it can be reused from the benchmark suite. In order to make that easier, and since they hardly serve a purpose in a repository with 25 plugins, I delete the Example and Example2 plugin descriptors and their dependencies.
Port the ghcide benchmark suite to HLS and benchmark plugin "configurations" independently. This includes the following changes to the ghcide benchmark suite and HLS: - Support for "configurations" which are defined as sets of plugin ids. The benchmark will be run with only these plugins enabled and all others disabled - Support for configurable concurrency. This relies on RTS -ol and -po flags to place the RTS traces in the target location rather than in the cwd This change requires two commits, the next one places ghcide/bench/hist/Main.hs into its final location to help 'git' recognize the change as a file move
Goal is to display the formatted CSV (via column) one row per line
We parse maxResidency and allocatedBytes from the RTS -S output, but runSessionWithHandles kills the server without waiting for it to exit and these stats don't get logged. The solution is to use runSessionWithHandles', but unfortunately it is internal and not exposed. I have raised a PR to expose it and in the meantime we need a source repo package.
80e8622
to
5005793
Compare
* extract ghcide:experiments-types * extract haskell-language-server:plugins and let go of examples The main goal here is to move the Plugins module into an internal library so that it can be reused from the benchmark suite. In order to make that easier, and since they hardly serve a purpose in a repository with 25 plugins, I delete the Example and Example2 plugin descriptors and their dependencies. * HLS benchmark suite Port the ghcide benchmark suite to HLS and benchmark plugin "configurations" independently. This includes the following changes to the ghcide benchmark suite and HLS: - Support for "configurations" which are defined as sets of plugin ids. The benchmark will be run with only these plugins enabled and all others disabled - Support for configurable concurrency. This relies on RTS -ol and -po flags to place the RTS traces in the target location rather than in the cwd This change requires two commits, the next one places ghcide/bench/hist/Main.hs into its final location to help 'git' recognize the change as a file move * ghcide/bench/hist/Main.hs -> bench/Main.hs * CI - fix artifact names for uniqueness * disable shorten HLS step * Do not store eventlogs to avoid out of disk space * render durations up to milliseconds * shorten titles Goal is to display the formatted CSV (via column) one row per line * exclude formatting plugin configurations * Extract ghcide-bench to a standalone package * ghcide-bench: fix stderr capturing * Fix mem stats We parse maxResidency and allocatedBytes from the RTS -S output, but runSessionWithHandles kills the server without waiting for it to exit and these stats don't get logged. The solution is to use runSessionWithHandles', but unfortunately it is internal and not exposed. I have raised a PR to expose it and in the meantime we need a source repo package. * feedbacks * delete Example plugins
PR seems to have removed the example plugins, an accident? edit: i see, not an accident |
Port the ghcide benchmark suite to HLS, adding support to benchmark plugin "configurations" independently.
This includes the following changes to the ghcide benchmark suite:
The benchmark will be run with only these plugins enabled and all others disabled