packages feed

eventlog2html 0.8.2 → 0.8.3

raw patch · 5 files changed

+30/−17 lines, 5 filesdep −cpudep −directorydep −strictdep ~aesondep ~hvegadep ~statistics-linregPVP ok

version bump matches the API change (PVP)

Dependencies removed: cpu, directory, strict

Dependency ranges changed: aeson, hvega, statistics-linreg

API changes (from Hackage documentation)

+ Eventlog.Args: defaultArgs :: FilePath -> IO Args
+ Eventlog.Data: generateJsonData :: Args -> ProfData -> IO (Header, Value, Maybe Value, Maybe Html)

Files

CHANGELOG view
@@ -1,3 +1,8 @@+0.8.3++* Add `defaultArgs` and `generateJsonData` for using eventlog2html as a library+* Update to hvega-0.11+ 0.8.2, release 2020-12-17  * Fix initialisation of fancyTable (#137)
eventlog2html.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.4 Name:                eventlog2html-Version:             0.8.2+Version:             0.8.3 Synopsis:            Visualise an eventlog Description:         eventlog2html is a library for visualising eventlogs.                      At the moment, the intended use is to visualise eventlogs@@ -34,8 +34,7 @@  Library   Build-depends:-    cpu,-    aeson                >= 1.4.3 && < 1.5,+    aeson                >= 1.4.3 && < 1.6,     attoparsec           >= 0.13.2 && < 0.14,     array                >= 0.5.3 && < 0.6,     base                 >= 4 && < 5,@@ -46,7 +45,7 @@     filepath             >= 1.4.2 && < 1.5,     ghc-events           >= 0.13.0 && < 0.14,     hashtables           >= 1.2.3 && < 1.3,-    hvega                >= 0.6.0 && < 0.7,+    hvega                >= 0.11.0 && < 0.12,     mtl                  >= 2.2.2 && < 2.3,     optparse-applicative >= 0.14.3 && < 0.16,     semigroups           >= 0.18 && < 0.20,@@ -55,9 +54,7 @@     vector               >= 0.11,     trie-simple          >= 0.4,     hashable             >= 1.0,-    directory,-    strict,-    statistics-linreg,+    statistics-linreg    >= 0.3,     ghc-heap    GHC-options:         -Wall@@ -89,7 +86,7 @@   build-depends:       base >= 4 && < 5,       eventlog2html,-      aeson                >= 1.4.3 && < 1.5,+      aeson                >= 1.4.3 && < 1.6,       text                 >= 1.2.3 && < 1.3,       filepath             >= 1.4.2 && < 1.5 
src/Eventlog/Args.hs view
@@ -7,6 +7,7 @@   , argsInfo   , Args(..)   , Sort(..)+  , defaultArgs   ) where  import Options.Applicative@@ -117,6 +118,11 @@  args :: IO Args args = execParser argsInfo+++defaultArgs :: FilePath -> IO Args+defaultArgs fp = handleParseResult (execParserPure defaultPrefs argsInfo [fp])+  argsInfo :: ParserInfo Args argsInfo = opts
src/Eventlog/Data.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}-module Eventlog.Data (generateJson, generateJsonValidate ) where+module Eventlog.Data (generateJson, generateJsonValidate, generateJsonData ) where  import Prelude hiding (readFile) import Data.Aeson (Value(..), (.=), object)@@ -18,11 +18,8 @@ import Eventlog.Detailed import Text.Blaze.Html -generateJsonValidate :: (ProfData -> IO ()) -> FilePath -> Args -> IO (Header, Value, Maybe Value, Maybe Html)-generateJsonValidate validate file a = do-  let chunk = if heapProfile a then H.chunk else E.chunk a-  dat@(ProfData h binfo ccMap fs traces _ipes) <- chunk file-  validate dat+generateJsonData :: Args -> ProfData -> IO (Header, Value, Maybe Value, Maybe Html)+generateJsonData a (ProfData h binfo ccMap fs traces _ipes) = do   let keeps = pruneBands a binfo       bs = bands h (Map.map fst keeps) fs       combinedJson = object [@@ -49,4 +46,12 @@  generateJson :: FilePath -> Args -> IO (Header, Value, Maybe Value, Maybe Html) generateJson = generateJsonValidate (const (return ()))++generateJsonValidate :: (ProfData -> IO ()) -> FilePath+                     -> Args -> IO (Header, Value, Maybe Value, Maybe Html)+generateJsonValidate validate file a = do+  let chunk = if heapProfile a then H.chunk else E.chunk a+  dat <- chunk file+  validate dat+  generateJsonData a dat 
src/Eventlog/VegaTemplate.hs view
@@ -104,7 +104,7 @@             , MSort [ByFieldOp "k" Max, Descending]             , MLegend [LNoTitle]]     . position X [PName "x", PmType Quantitative, PAxis [AxTitle ""]-                 ,PScale [SDomain (DSelection "brush")]]+                 ,PScale [SDomainOpt (DSelection "brush")]]     . position Y [PName "norm_y", PmType Quantitative, PAxis [AxTitle "Allocation", AxFormat ".1f"]]  transformLineLayer :: [TransformSpec] -> (VLProperty, VLSpec)@@ -185,7 +185,7 @@         , [TName "c", TmType Nominal, TTitle "Type"]         ]     . position X [PName "x", PmType Quantitative, PAxis [AxTitle ""]-                 , PScale [SDomain (DSelection "brush")]]+                 , PScale [SDomainOpt (DSelection "brush")]]     . position Y ([PName "y"                  , PmType Quantitative                  , PAxis $ case ct of@@ -225,7 +225,7 @@   encoding     . color [MString "grey"]     . position X [PmType Quantitative, PAxis [], PName "tx"-                 , PScale [SDomain (DSelection "brush")] ]+                 , PScale [SDomainOpt (DSelection "brush")] ]     . VL.size [MNumber 2]     . tooltip [TName "desc", TmType Nominal]