Skip to content

Commit

Permalink
Replace code actions with lenses in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
wz1000 committed Aug 12, 2022
1 parent 250db49 commit eec0222
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ghcide/bench/lib/Experiments.hs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ experiments =
not . null <$> getCompletions doc (fromJust identifierP),
---------------------------------------------------------------------------------------
benchWithSetup
"code actions"
"code lens"
( \docs -> do
unless (any (isJust . identifierP) docs) $
error "None of the example modules is suitable for this experiment"
Expand All @@ -134,13 +134,12 @@ experiments =
waitForProgressStart
waitForProgressDone
)
( \docs -> not . null . catMaybes <$> forM docs (\DocumentPositions{..} ->
forM identifierP $ \p ->
getCodeActions doc (Range p p))
( \docs -> not . null <$> forM docs (\DocumentPositions{..} ->
getCodeLenses doc)
),
---------------------------------------------------------------------------------------
benchWithSetup
"code actions after edit"
"code lens after edit"
( \docs -> do
unless (any (isJust . identifierP) docs) $
error "None of the example modules is suitable for this experiment"
Expand All @@ -152,9 +151,8 @@ experiments =
changeDoc doc [charEdit stringLiteralP]
waitForProgressStart
waitForProgressDone
not . null . catMaybes <$> forM docs (\DocumentPositions{..} -> do
forM identifierP $ \p ->
getCodeActions doc (Range p p))
not . null <$> forM docs (\DocumentPositions{..} -> do
getCodeLenses doc)
),
---------------------------------------------------------------------------------------
benchWithSetup
Expand Down

0 comments on commit eec0222

Please sign in to comment.