Skip to content

Commit

Permalink
Add new benchmarks to config
Browse files Browse the repository at this point in the history
  • Loading branch information
wz1000 committed Jul 24, 2023
1 parent 88f184c commit 75469a4
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
34 changes: 34 additions & 0 deletions bench/MultiLayerModules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Generate $DEPTH layers of modules with $WIDTH modules on each layer
# Every module on layer N imports all the modules on layer N-1
# MultiLayerModules.hs imports all the modules from the last layer
DEPTH=15
WIDTH=40
cat >hie.yaml << EOF
cradle:
direct:
arguments:
EOF
for i in $(seq -w 1 $WIDTH); do
echo "module DummyLevel0M$i where" > DummyLevel0M$i.hs;
echo " - DummyLevel0M$i.hs" >> hie.yaml;
done
for l in $(seq 1 $DEPTH); do
for i in $(seq -w 1 $WIDTH); do
echo "module DummyLevel${l}M$i where" > DummyLevel${l}M$i.hs;
echo " - DummyLevel${l}M$i.hs" >> hie.yaml;
for j in $(seq -w 1 $WIDTH); do
echo "import DummyLevel$((l-1))M$j" >> DummyLevel${l}M$i.hs;
done
done
done
case "$1" in
'--th')
echo "{-# LANGUAGE TemplateHaskell #-}" > MultiLayerModules.hs
;;
esac
echo "module MultiLayerModules where" >> MultiLayerModules.hs
echo " - MultiLayerModules.hs" >> hie.yaml;
for j in $(seq -w 1 $WIDTH); do
echo "import DummyLevel${DEPTH}M$j" >> MultiLayerModules.hs;
done
45 changes: 45 additions & 0 deletions bench/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,50 @@ examples:
modules:
- src/Language/LSP/Types/WatchedFiles.hs
- src/Language/LSP/Types/CallHierarchy.hs

- name: MultiLayerModules
path: bench/MultiLayerModules.sh
script: True
script-args: ["--th"]
modules:
- MultiLayerModules.hs
- DummyLevel0M01.hs
- DummyLevel1M01.hs
- name: MultiLayerModulesNoTH
path: bench/MultiLayerModules.sh
script: True
script-args: []
modules:
- MultiLayerModules.hs
- DummyLevel0M01.hs
- DummyLevel1M01.hs

- name: DummyLevel0M01
path: bench/MultiLayerModules.sh
script: True
script-args: ["--th"]
modules:
- DummyLevel0M01.hs
- name: DummyLevel0M01NoTH
path: bench/MultiLayerModules.sh
script: True
script-args: []
modules:
- DummyLevel0M01.hs

- name: DummyLevel1M01
path: bench/MultiLayerModules.sh
script: True
script-args: ["--th"]
modules:
- DummyLevel1M01.hs
- name: DummyLevel1M01NoTH
path: bench/MultiLayerModules.sh
script: True
script-args: []
modules:
- DummyLevel1M01.hs

# Small but heavily multi-component example
# Disabled as it is far to slow. hie-bios >0.7.2 should help
# - name: HLS
Expand All @@ -47,6 +91,7 @@ examples:

# The set of experiments to execute
experiments:
- "edit-header"
- "edit"
- "hover"
- "hover after edit"
Expand Down

0 comments on commit 75469a4

Please sign in to comment.