Hello, @ericdallo! I was checking https://github.com/clojure-lsp/clojure-lsp/issues/2259, and I was wondering if we could use performance-helper, added in https://github.com/clojure-lsp/clojure-lsp/pull/2257/changes/bb565b1d8878bee6b4d47ac8b194c598d5934340 and specifically use performance-helper/execute-multiple, performance-helper/compute-percentile, performance-helper/report-percentiles and then simulate a LSP client using integration.lsp and integration.fixture ?
I'd be more than happy to try to work on a PR 🙂. Thanks!
I'd say absolutely! I don't understand the config well enough to write the tests, and it sounds like you'd be good for it
I'll try my best and work on it later. Thanks!
Not sure what you meant with config but this documents all Clojure-lsp settings: https://github.com/clojure-lsp/clojure-lsp/blob/master/docs%2Fall-available-settings.edn
Is there an existing function or a recommended way to stop the server process and clean up the test client's background threads so I can restart it within the same test execution? Or is the current integration test designed to handle only one server lifecycle per deftest ?
I've been trying to do lsp/notify! [:exit {}]) , but that throws throws a NullPointerException (`Uncaught exception, not in assertion`)
> Or is the current integration test designed to handle only one server lifecycle per deftest ?
Yes, unfortunately this
this has tradeoffs, it's slower but cleaner, as clojure-lsp has its in memory atom, so once you initialized, it saves a lot of stuff there, we would need to think how to clean it in exit probably, a nice improvement for the future I'd say
🤞
I think it should be good for a PR now
Looks promising!
ah yeah for sure we can, those were added by @john.t.richardson.dev recently, I believe they could be used for this kind of perf test yes
after having startup perf test we can start improving performance and measuring it