Skip to content

Commit

Permalink
feat(runtime): add skeleton for benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
symbiont-stevan-andjelkovic committed Jun 29, 2021
1 parent 79c0714 commit 5ed12fe
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 13 deletions.
6 changes: 6 additions & 0 deletions src/runtime-prototype/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,16 @@ not.

#### How to run tests

```bash
cabal configure test \
--test-option='--timeout=10' \
--test-option='--color=always' \
--test-show-details=streaming \
--ghc-options='-threaded -rtsopts -with-rtsopts=-N -fno-ignore-asserts' \
# --test-option='--pattern=/$pattern/
cabal test
```

#### How to run benchmarks

`cabal bench`
8 changes: 8 additions & 0 deletions src/runtime-prototype/bench/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module Main where

import StuntDouble

------------------------------------------------------------------------

main :: IO ()
main = return ()
34 changes: 21 additions & 13 deletions src/runtime-prototype/stunt-double.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ library
StuntDouble.ActorMap
StuntDouble.Datatype
StuntDouble.Envelope
StuntDouble.Transport
StuntDouble.Transport.Http
StuntDouble.Transport.NamedPipe
StuntDouble.Transport.Stm
StuntDouble.FreeMonad
StuntDouble.Histogram
StuntDouble.Frontend.Http
StuntDouble.Log
StuntDouble.Histogram
StuntDouble.IO
StuntDouble.Log
StuntDouble.Message
StuntDouble.Metrics
StuntDouble.Random
StuntDouble.Reference
StuntDouble.Supervisor
StuntDouble.Time
StuntDouble.Metrics
StuntDouble.Transport
StuntDouble.Transport.Http
StuntDouble.Transport.NamedPipe
StuntDouble.Transport.Stm

-- GHC boot library dependencies:
-- (https://gitlab.haskell.org/ghc/ghc/-/blob/master/packages)
Expand All @@ -56,17 +56,17 @@ library
build-depends:
aeson
, async
, atomic-primops
, bytestring
, heaps
, hashable
, heaps
, http-client
, http-types
, random
, unordered-containers
, vector
, wai
, warp
, atomic-primops
, vector

default-language: Haskell2010

Expand All @@ -88,13 +88,13 @@ test-suite test

other-modules:
StuntDouble.ActorMapTest
StuntDouble.Transport.HttpTest
StuntDouble.Transport.StmTest
StuntDouble.Transport.NamedPipeTest
StuntDouble.FrontendTest
StuntDouble.HistogramTest
StuntDouble.RandomTest
StuntDouble.SchedulerTest
StuntDouble.Transport.HttpTest
StuntDouble.Transport.NamedPipeTest
StuntDouble.Transport.StmTest
TastyDiscover

ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-ignore-asserts
Expand All @@ -111,3 +111,11 @@ executable stunt-double
-- hs-source-dirs:
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010

benchmark bench
type: exitcode-stdio-1.0
hs-source-dirs: bench/
main-is: Main.hs
build-depends:
base
, stunt-double

0 comments on commit 5ed12fe

Please sign in to comment.