Commit Graph

5 Commits

Author SHA1 Message Date
Pepe Iborra
ba4bdb2def
Send WorkDoneProgressEnd only when work is done (#649)
* send WorkDoneProgressEnd only when work done

* Progress reporting now spans over multiple overlapping kicks

* Repurpose benchmark experiments as tests

Fixes #650

* use stack to fetch from Hackage

* benchmark tests run with the same lsp-test config as other tests

* Fix stack cradle in benchmark

* Make stack unpack --silent

* Fix issues in "code actions after edit" experiment

- Repeated breaking edits make ghc run out of suggestions

- Diagnostics seem to come and go in-between edits, which leads to a timing
  issue when asking for code actions. The fix is to wait for diagnostics to be
  present before asking for code actions

* Fix stack.yaml generation in example project

* Fix getDefinition in GHC 8.4

Did it break before 0.2.0 or after?

* better naming for the progress event TVar

* stop progress reporting in shakeShut

https://github.com/digital-asset/ghcide/pull/649#discussion_r443408884

* hlint
2020-06-22 12:47:45 +02:00
Pepe Iborra
7e9326be08
Write a cabal.project file in the benchmark example (#640)
* Write a cabal.project file

As suggested in #617. Taken fron #624

* Write a cabal.project.local

Otherwise Cabal still errors out

* Override default hie dir

Otherwise .hi and .hie files end up in different locations, which causes the getDefinition experiment to fail the second time it's run.

This is because we assume in ghcide that .hi and .hie files have the same lifetimes, which is not true when the ..hie files are wiped but the .hi files aren't.
2020-06-15 15:48:21 +02:00
Pepe Iborra
0e96f61d1b
Performance analysis over time (#629)
* benchmark history script

* if HEAD no need to rebuild worktree

* add bench/README.md

* Enable all experiments

* Fix dependency tracking for git branches

* hlints

* Add stack84 extra-deps

* Identify failed experiments in graphs

* Filter our failed benchmarks from aggregate graphs

Otherwise they tend to distort the axis

* Improve graphs (more and easier to see colors)

* update cradles

* customizable output folder

* Cache the config for the duration of the script

Otherwise the script is vulnerable to config edits

* Allow omitting the git: field

* Ignore bench-hist intermediate artifacts

Handy for including bench-hist results in a branch while avoiding the
intermediate artifacts
2020-06-15 13:56:24 +02:00
Pepe Iborra
4e7b2fcdbb
More benchmarks (#625)
* Add a benchmark to track startup times

* Benchmark automation

disable benchmarks easily

save GC stats to file

cradle, rts, filter and samples options

path to ghcide

configurable example

--help

more detailed CSV output

hover after edit

pause for GC

configurable timeout

upgrade extra (required to build bench)

Include max residency in BenchRun

Include all details on output

* reduce threadDelay to avoid upsetting lsp-test

* Fix startup time measurement

* Added new edit experiment

* fix doc comment

* hlints

* Upgrade to lsp-test 0.11.0.2

* Flag failed experiments

* Update ghcide.cabal
2020-06-12 20:46:55 +02:00
Pepe Iborra
5a754e1bb9
Benchmark suite (#590)
* 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
2020-06-03 16:35:08 +02:00