Patrick Bahr avatar Patrick Bahr committed 6096303

we now use the benchmark interface of cabal

Comments (0)

Files changed (3)

benchmark/Benchmark.hs

 
 standardBenchmarks :: (PExpr, SugarExpr, String) -> Benchmark
 standardBenchmarks  (sExpr,aExpr,n) = rnf aExpr `seq` rnf sExpr `seq` getBench (sExpr, aExpr,n)
-    where getBench (sExpr, aExpr,n) = bgroup n evalBenchmarks
+    where getBench (sExpr, aExpr,n) = bgroup n paperBenchmarks
           -- these are the benchmarks for evaluation
           evalBenchmarks = [
                  bench "evalDesug" (nf A.desugEval2 aExpr),
                  bench "evalDirectM" (nf A.evalDirectE aExpr),
                  bench "eval[Direct]M (comparison)" (nf S.evalSugar sExpr),
                  bench "contVar" (nf (A.contVar' 10) aExpr),
-                 bench "contVar (comparison)" (nf (S.contVar 10) sExpr),
                  bench "contVarG" (nf (A.contVarGen 10) aExpr),
                  bench "contVarU" (nf (S.contVarGen 10) sExpr),
-                 bench "freeVars[GU]" (nf A.freeVars' aExpr),
+                 bench "contVar (comparison)" (nf (S.contVar 10) sExpr),
+                 bench "freeVars" (nf A.freeVars' aExpr),
                  bench "freeVarsG" (nf A.freeVarsGen aExpr),
                  bench "freeVarsU" (nf S.freeVarsGen sExpr),
-                 bench "freeVars[GU] (comparison)" (nf S.freeVars sExpr)]
+                 bench "freeVars (comparison)" (nf S.freeVars sExpr)]
           -- these are all the benchmarks
           allBenchmarks = [
                  bench "Comp.desug" (nf A.desugExpr aExpr),
   hs-source-dirs:	src testsuite/tests examples
   Build-Depends:        base == 4.*, template-haskell, containers, mtl, QuickCheck >= 2, HUnit, test-framework, test-framework-hunit, test-framework-quickcheck2, derive, th-expand-syns, deepseq, transformers
 
-Executable benchmark
+Benchmark algebra
+  Type:                 exitcode-stdio-1.0
   Main-is:		Benchmark.hs
   hs-source-dirs:	src benchmark
   ghc-options:          -W -O2
   -- Disable short-cut fusion rules in order to compare optimised and unoptimised code.
   cpp-options:          -DNO_RULES
-  if !flag(benchmark)
-    buildable:          False
-  else
-    Build-Depends:      base == 4.*, template-haskell, containers, mtl, QuickCheck >= 2, derive, deepseq, criterion, random, uniplate, th-expand-syns, transformers
+  Build-Depends:        base == 4.*, template-haskell, containers, mtl, QuickCheck >= 2, derive, deepseq, criterion, random, uniplate, th-expand-syns, transformers
 
 source-repository head
   type:     hg
 #!/bin/sh
-./dist/build/benchmark/benchmark --summary=results.csv
+cabal bench --benchmark-option=--summary=benchmark-results/results.csv
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.