Skip to content

Commit d09cc33

Browse files
committed
update bench config
1 parent 89a263e commit d09cc33

File tree

2 files changed

+15
-24
lines changed

2 files changed

+15
-24
lines changed

bench/config.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ examples:
2626
# - src/Distribution/Simple.hs
2727
# - src/Distribution/Types/Module.hs
2828
- src/Distribution/Simple/Configure.hs
29+
- src/Distribution/Simple/BuildTarget.hs
2930
extra-args: [] # extra HLS command line args
3031
# Small-sized project with TH
3132
- name: lsp-types
@@ -92,21 +93,21 @@ examples:
9293

9394
# The set of experiments to execute
9495
experiments:
95-
# - "edit-header"
96-
# - "edit"
97-
# - "hover"
96+
- "edit-header"
97+
- "edit"
98+
- "hover"
9899
- "semanticTokens"
99100
# - "hover after edit"
100101
# - "hover after cradle edit"
101-
# - "getDefinition"
102-
# - "getDefinition after edit"
103-
# - "completions"
104-
# - "completions after edit"
105-
# - "code actions"
106-
# - "code actions after edit"
107-
# - "code actions after cradle edit"
108-
# - "documentSymbols after edit"
109-
# - "hole fit suggestions"
102+
- "getDefinition"
103+
- "getDefinition after edit"
104+
- "completions"
105+
- "completions after edit"
106+
- "code actions"
107+
- "code actions after edit"
108+
- "code actions after cradle edit"
109+
- "documentSymbols after edit"
110+
- "hole fit suggestions"
110111

111112
# An ordered list of versions to analyze
112113
versions:

ghcide-bench/src/Experiments.hs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,6 @@ headerEdit =
8282
.+ #rangeLength .== Nothing
8383
.+ #text .== "-- header comment \n"
8484

85-
tailEdit :: UInt -> Text -> TextDocumentContentChangeEvent
86-
tailEdit end i =
87-
TextDocumentContentChangeEvent $ InL $ #range .== Range (Position end 0) (Position end (fromIntegral $ T.length txt))
88-
.+ #rangeLength .== Nothing
89-
.+ #text .== (txt <> "\n")
90-
where
91-
txt :: Text
92-
txt = "x" <> i <> "=" <> i
93-
9485
data DocumentPositions = DocumentPositions {
9586
-- | A position that can be used to generate non null goto-def and completion responses
9687
identifierP :: Maybe Position,
@@ -114,10 +105,9 @@ experiments =
114105
bench "semanticTokens" $ \docs -> do
115106
liftIO $ putStrLn "Starting semanticTokens"
116107
r <- forM (zip [T.pack $ show i | i :: Int <- [0..]] docs) $ \(i, DocumentPositions{..}) -> do
117-
bottom <- fromIntegral . length . T.lines <$> documentContents doc
118-
changeDoc doc [tailEdit bottom i]
119-
-- wait for a fresh build start
108+
changeDoc doc [charEdit stringLiteralP]
120109
waitForProgressStart
110+
waitForProgressDone
121111
tks <- getSemanticTokens doc
122112
case tks ^? LSP._L of
123113
Just _ -> return True

0 commit comments

Comments
 (0)