Skip to content

Commit

Permalink
Fix benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
wz1000 committed Aug 30, 2022
1 parent e031119 commit fdbc555
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
5 changes: 3 additions & 2 deletions bench/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,13 @@ configurations:
- ghcide-type-lenses
- pragmas
- Ghcide:
- ghcide-completions
- ghcide-type-lenses
- Refactor:
- ghcide-code-actions-bindings
- ghcide-code-actions-fill-holes
- ghcide-code-actions-imports-exports
- ghcide-code-actions-type-signatures
- ghcide-completions
- ghcide-type-lenses
- All:
- alternateNumberFormat
- callHierarchy
Expand Down
14 changes: 8 additions & 6 deletions ghcide-bench/src/Experiments.hs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ experiments =
not . null <$> getCompletions doc (fromJust identifierP),
---------------------------------------------------------------------------------------
benchWithSetup
"code lens"
"code actions"
( \docs -> do
unless (any (isJust . identifierP) docs) $
error "None of the example modules is suitable for this experiment"
Expand All @@ -148,12 +148,13 @@ experiments =
waitForProgressStart
waitForProgressDone
)
( \docs -> not . null <$> forM docs (\DocumentPositions{..} ->
getCodeLenses doc)
( \docs -> not . null . catMaybes <$> forM docs (\DocumentPositions{..} ->
forM identifierP $ \p ->
getCodeActions doc (Range p p))
),
---------------------------------------------------------------------------------------
benchWithSetup
"code lens after edit"
"code actions after edit"
( \docs -> do
unless (any (isJust . identifierP) docs) $
error "None of the example modules is suitable for this experiment"
Expand All @@ -165,8 +166,9 @@ experiments =
changeDoc doc [charEdit stringLiteralP]
waitForProgressStart
waitForProgressDone
not . null <$> forM docs (\DocumentPositions{..} -> do
getCodeLenses doc)
not . null . catMaybes <$> forM docs (\DocumentPositions{..} -> do
forM identifierP $ \p ->
getCodeActions doc (Range p p))
),
---------------------------------------------------------------------------------------
benchWithSetup
Expand Down

0 comments on commit fdbc555

Please sign in to comment.