Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
[PB-95] independent 'post-mortem' tool
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Diemand <codieplusplus@apax.net>
  • Loading branch information
CodiePP committed Sep 27, 2018
1 parent 15e019d commit df3d0a9
Show file tree
Hide file tree
Showing 23 changed files with 248 additions and 116 deletions.
83 changes: 83 additions & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17439,6 +17439,89 @@ doHaddock = false;
description = "Cardano SL - Tools";
license = stdenv.lib.licenses.mit;

}) {};
"cardano-sl-tools-post-mortem" = callPackage
({
mkDerivation
, aeson
, attoparsec
, base
, bytestring
, cardano-sl
, cardano-sl-chain
, cardano-sl-core
, cardano-sl-infra
, cardano-sl-util
, cassava
, Chart
, Chart-diagrams
, containers
, directory
, fgl
, filepath
, foldl
, graphviz
, MonadRandom
, optparse-applicative
, pipes
, pipes-bytestring
, pipes-interleave
, pipes-safe
, process
, random
, stdenv
, text
, time-units
, universum
}:
mkDerivation {

pname = "cardano-sl-tools-post-mortem";
version = "1.3.0";
src = ./../tools/post-mortem;
configureFlags = [
"--ghc-option=-fwarn-redundant-constraints"
"--ghc-option=-Wall"
"--ghc-option=-Wcompat"
"--ghc-option=-Werror"
];
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
aeson
attoparsec
base
bytestring
cardano-sl
cardano-sl-chain
cardano-sl-core
cardano-sl-infra
cardano-sl-util
cassava
Chart
Chart-diagrams
containers
directory
fgl
filepath
foldl
graphviz
MonadRandom
optparse-applicative
pipes
pipes-bytestring
pipes-interleave
pipes-safe
process
random
text
time-units
universum
];
doHaddock = false;
description = "Cardano SL - post-mortem tool";
license = stdenv.lib.licenses.mit;

}) {};
"cardano-sl-util" = callPackage
({
Expand Down
55 changes: 30 additions & 25 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ packages:
- explorer
- node
- tools
- tools/post-mortem
- utxo
- wallet
- wallet/test
Expand Down Expand Up @@ -294,33 +295,37 @@ extra-deps:
- servant-swagger-ui-0.3.0.3.13.2
- servant-swagger-ui-redoc-0.3.0.1.21.2

- fsnotify-0.2.1.2
- hinotify-0.3.10

# This is for CI to pass --fast to all dependencies
apply-ghc-options: everything

# If you find it too restrictive, you can use `scripts/build/cardano-sl.sh' script
ghc-options:
cardano-sl: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-auxx: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-binary: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-binary-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-chain: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-chain-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-client: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-core: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-core-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-crypto: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-crypto-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-db: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-db-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-explorer: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-generator: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-infra: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-networking: -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-node: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-tools: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-util: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-util-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-wallet: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-wallet-new: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-node-ipc: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-x509: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-auxx: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-binary: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-binary-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-chain: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-chain-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-client: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-core: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-core-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-crypto: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-crypto-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-db: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-db-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-explorer: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-generator: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-infra: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-networking: -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-node: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-tools: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-tools-post-mortem: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-util: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-util-test: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-wallet: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-wallet-new: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-node-ipc: -Wall -Werror -Wcompat -fwarn-redundant-constraints
cardano-sl-x509: -Wall -Werror -Wcompat -fwarn-redundant-constraints
91 changes: 0 additions & 91 deletions tools/cardano-sl-tools.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ Flag for-installer
description: Build a reduced set of components (only what is needed for the
installer)

Flag postmortem
default: False
manual: True
description: Build the post-mortem analysis tool (ignored if for-installer is
true)

executable dbgen
hs-source-dirs: src/dbgen
main-is: Main.hs
Expand Down Expand Up @@ -328,91 +322,6 @@ executable cardano-cli-docs
if flag(for-installer)
buildable: False

executable cardano-post-mortem
hs-source-dirs: src/post-mortem
main-is: Main.hs
other-modules: JSONLog
, Options
, Statistics
, Statistics.Block
, Statistics.Chart
, Statistics.CSV
, Statistics.Focus
, Statistics.Graph
, Statistics.MemPool
, Statistics.Report
, Statistics.Throughput
, Statistics.Tx
, Types
, Util.Aeson
, Util.Pipes
, Util.Safe
if flag(postmortem) && !flag(for-installer)
buildable: True
build-depends: Chart
, Chart-diagrams
, MonadRandom
, aeson
, attoparsec
, base
, bytestring
, cardano-sl
, cardano-sl-chain
, cardano-sl-core
, cardano-sl-infra
, cardano-sl-chain
, cardano-sl-util
, containers
, cassava
, directory
, fgl
, filepath
, foldl
, graphviz
, optparse-applicative
, pipes
, pipes-bytestring
, pipes-interleave
, pipes-safe
, process
, random
, text
, time-units
, universum >= 0.1.11
else
buildable: False
default-language: Haskell2010
ghc-options: -threaded
-Wall
-O2
-- linker speed up for linux
if os(linux)
ghc-options: -optl-fuse-ld=gold
ld-options: -fuse-ld=gold

default-extensions: DeriveDataTypeable
DeriveGeneric
GeneralizedNewtypeDeriving
StandaloneDeriving
FlexibleContexts
FlexibleInstances
MultiParamTypeClasses
FunctionalDependencies
DefaultSignatures
NoImplicitPrelude
OverloadedStrings
TypeApplications
TupleSections
ViewPatterns
LambdaCase
MultiWayIf
ConstraintKinds
UndecidableInstances
ScopedTypeVariables
ScopedTypeVariables
BangPatterns
MonadFailDesugaring

executable cardano-blockchain-analyser
hs-source-dirs: src/blockchain-analyser
main-is: Main.hs
Expand Down
20 changes: 20 additions & 0 deletions tools/post-mortem/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2018 IOHK

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to
do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

5 changes: 5 additions & 0 deletions tools/post-mortem/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# cardano tool: post-mortem

At the end of a benchmark run we launch `post-mortem` on the output JSON logs to summarize and analize the data of the run.

Loading

0 comments on commit df3d0a9

Please sign in to comment.