Skip to content

Commit 455766d

Browse files
committed
Fix benchmarks
1 parent 723d80f commit 455766d

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

bench/config.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,17 @@ configurations:
100100
- callHierarchy
101101
- codeRange
102102
- eval
103-
- ghcide-code-actions-bindings
104-
- ghcide-code-actions-fill-holes
105-
- ghcide-code-actions-imports-exports
106-
- ghcide-code-actions-type-signatures
107103
- ghcide-completions
108104
- ghcide-type-lenses
109105
- pragmas
110106
- Ghcide:
107+
- ghcide-completions
108+
- ghcide-type-lenses
109+
- Refactor:
111110
- ghcide-code-actions-bindings
112111
- ghcide-code-actions-fill-holes
113112
- ghcide-code-actions-imports-exports
114113
- ghcide-code-actions-type-signatures
115-
- ghcide-completions
116-
- ghcide-type-lenses
117114
- All:
118115
- alternateNumberFormat
119116
- callHierarchy

ghcide-bench/src/Experiments.hs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ experiments =
139139
not . null <$> getCompletions doc (fromJust identifierP),
140140
---------------------------------------------------------------------------------------
141141
benchWithSetup
142-
"code lens"
142+
"code actions"
143143
( \docs -> do
144144
unless (any (isJust . identifierP) docs) $
145145
error "None of the example modules is suitable for this experiment"
@@ -148,12 +148,13 @@ experiments =
148148
waitForProgressStart
149149
waitForProgressDone
150150
)
151-
( \docs -> not . null <$> forM docs (\DocumentPositions{..} ->
152-
getCodeLenses doc)
151+
( \docs -> not . null . catMaybes <$> forM docs (\DocumentPositions{..} ->
152+
forM identifierP $ \p ->
153+
getCodeActions doc (Range p p))
153154
),
154155
---------------------------------------------------------------------------------------
155156
benchWithSetup
156-
"code lens after edit"
157+
"code actions after edit"
157158
( \docs -> do
158159
unless (any (isJust . identifierP) docs) $
159160
error "None of the example modules is suitable for this experiment"
@@ -165,8 +166,9 @@ experiments =
165166
changeDoc doc [charEdit stringLiteralP]
166167
waitForProgressStart
167168
waitForProgressDone
168-
not . null <$> forM docs (\DocumentPositions{..} -> do
169-
getCodeLenses doc)
169+
not . null . catMaybes <$> forM docs (\DocumentPositions{..} -> do
170+
forM identifierP $ \p ->
171+
getCodeActions doc (Range p p))
170172
),
171173
---------------------------------------------------------------------------------------
172174
benchWithSetup

0 commit comments

Comments
 (0)