Skip to content

Commit

Permalink
Merge #3999
Browse files Browse the repository at this point in the history
3999: workbench & locli:  multi-run analyses, profiled mode & quality of life r=deepfire a=deepfire

1. `locli` (log analysis):
    - higher-order CDF
    - multi-machine performance analysis
    - multi-run summarisation
    - golden tests for CDF functionality
    - nomenclature changes: `s/Distribution/CDF/`
    - `s/Float/Double/` for all reals
    - restore useful headers in text reports (`Anchor`)
    - compensate for analysis data starting prior to `systemStart`
    - refactor the analysis state machine -- and properly handle more cases
    - more intermediate data dump subcommands
2. workbench:
    - multi-run analysis
    - profiled mode & Makefile targets (`-prof` suffix for profile targets)
    - default to maximum interactivity mode in shells
    - quality of life:  patterned run listing, AWS run listing and localisation, genesis trimming

Co-authored-by: Kosyrev Serge <serge.kosyrev@iohk.io>
Co-authored-by: Michael Karg <michael.karg@iohk.io>
  • Loading branch information
3 people authored Jun 14, 2022
2 parents c7bc9d8 + ec69a6e commit 7e7b21f
Show file tree
Hide file tree
Showing 29 changed files with 1,732 additions and 644 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ ci-targets: $(CI_TARGETS)
##
## Base targets:
##
shell: ## Nix shell, CI mode (from Nix store), vars: PROFILE, CMD
shell: ## Nix shell, (workbench from /nix/store), vars: PROFILE, CMD
nix-shell --max-jobs 8 --cores 0 --show-trace --argstr profileName ${PROFILE} ${ARGS} ${if ${CMD},--run "${CMD}"}
shell-dev: shell
shell-dev: ARGS += --arg 'workbenchDevMode' true ## Nix shell, dev mode (from checkout), vars: PROFILE, CMD
shell-dev shell-prof shell-nix: shell
shell-nix: ARGS += --arg 'workbenchDevMode' false ## Nix shell, (workbench from Nix store), vars: PROFILE, CMD
shell-prof: ARGS += --arg 'profiled' true ## Nix shell, everything Haskell built profiled

list-profiles: ## List workbench profiles
nix build .#workbench.profile-names-json --json | jq '.[0].outputs.out' -r | xargs jq .
Expand Down
100 changes: 63 additions & 37 deletions bench/locli/locli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,47 @@ license-files:
NOTICE
build-type: Simple

library
common base
default-language: Haskell2010
default-extensions: BangPatterns
BlockArguments
DeriveGeneric
DerivingStrategies
DerivingVia
FlexibleContexts
FlexibleInstances
GADTs
ImportQualifiedPost
LambdaCase
MultiParamTypeClasses
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
PartialTypeSignatures
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
ViewPatterns

ghc-options: -Wall
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wredundant-constraints
-Wpartial-fields
-Wcompat
-Wno-all-missed-specialisations

build-depends: base

library
import: base
hs-source-dirs: src

exposed-modules: Data.Accum
Data.Distribution
Data.CDF

Cardano.Command
Cardano.TopHandler
Expand All @@ -29,7 +64,7 @@ library
Cardano.Analysis.ChainFilter
Cardano.Analysis.Context
Cardano.Analysis.Ground
Cardano.Analysis.MachTimeline
Cardano.Analysis.MachPerf
Cardano.Analysis.Version

Cardano.Unlog.LogObject
Expand All @@ -38,8 +73,7 @@ library

other-modules: Paths_locli

build-depends: base
, aeson
build-depends: aeson
, aeson-pretty
, async
, attoparsec
Expand All @@ -59,12 +93,15 @@ library
, Histogram
, optparse-applicative-fork
, optparse-generic
, ouroboros-consensus
-- for Data.SOP.Strict:
, ouroboros-network
, process
, quiet
, scientific
, split
, statistics
, system-filepath
, template-haskell
, text
, text-short
Expand All @@ -76,49 +113,38 @@ library
, utf8-string
, vector

default-language: Haskell2010
default-extensions: BangPatterns
BlockArguments
DerivingStrategies
DerivingVia
FlexibleContexts
FlexibleInstances
GADTs
ImportQualifiedPost
LambdaCase
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
PartialTypeSignatures
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications

ghc-options: -Wall
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wredundant-constraints
-Wpartial-fields
-Wcompat
-Wno-all-missed-specialisations

executable locli
import: base

hs-source-dirs: app
main-is: locli.hs
default-language: Haskell2010
ghc-options: -threaded
-Wall
-rtsopts
"-with-rtsopts=-T -N7 -A2m -qb -H64m"
build-depends: base

build-depends: aeson
, cardano-prelude
, locli
, optparse-applicative-fork
, text
, text-short
, transformers
, transformers-except
default-extensions: NoImplicitPrelude

test-suite test-locli
import: base

hs-source-dirs: test
main-is: test-locli.hs
type: exitcode-stdio-1.0
ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T

build-depends: cardano-prelude
, containers
, hedgehog
, hedgehog-extras
, locli
, text

other-modules: Test.Analysis.CDF
Loading

0 comments on commit 7e7b21f

Please sign in to comment.