diff --git a/default.nix b/default.nix index e3b593f..d0ffd51 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,4 @@ -{ci ? false, haskellCompiler ? "ghc925" }: +{ci ? false, haskellCompiler ? "ghc927" }: let # Import the Haskell.nix library, haskell-src = import ((import ./nix/sources.nix)."haskell.nix") {}; @@ -17,7 +17,7 @@ let compiler-nix-name = haskellCompiler; src = haskell.haskellLib.cleanGit { name = "eventlog2html"; src = ./.; }; modules = (if ci then ciOptions else []) ++ opts; - index-state = "2022-12-01T00:00:00Z"; + index-state = "2023-03-25T00:00:00Z"; }; diff --git a/hakyll-eventlog/site.hs b/hakyll-eventlog/site.hs index 163348d..ef1fc79 100644 --- a/hakyll-eventlog/site.hs +++ b/hakyll-eventlog/site.hs @@ -19,6 +19,7 @@ import Eventlog.Data import Eventlog.Args import Eventlog.VegaTemplate import Eventlog.HtmlTemplate +import Eventlog.Ticky import Text.Blaze.Html.Renderer.Text import Options.Applicative import Options.Applicative.Help.Types @@ -114,9 +115,12 @@ drawEventlog :: [T.Text] -> Int -> ChartConfig -> IO T.Text drawEventlog args vid conf = do let final_args = ["--no-include-js"] ++ args Run as <- handleParseResult (execParserPure defaultPrefs argsInfo (map T.unpack final_args)) - (_, dat, _, _) <- generateJson (head $ files as) as - let itd = if traces conf then TraceData else NoTraceData - return $ TL.toStrict $ renderHtml $ renderChartWithJson itd (chartType conf) vid dat (vegaJsonText conf) + ty <- generateJson (head $ files as) as + return $ case ty of + HeapProfile (_, dat, _, _) -> + let itd = if traces conf then TraceData else NoTraceData + in TL.toStrict $ renderHtml $ renderChartWithJson itd (chartType conf) vid dat (vegaJsonText conf) + TickyProfile {} -> mempty def :: ChartConfig def = ChartConfig 600 500 True "category20" "set1" (AreaChart Stacked) Nothing @@ -162,6 +166,10 @@ fullEventLogPage file = do -- convenient. Run as <- handleParseResult (execParserPure defaultPrefs argsInfo [file, "--no-include-js", "--include-trace-events", "--limit-detailed=100"]) - (header, data_json, descs, closure_descs) <- generateJson file as - return $ templateString header data_json descs closure_descs as + ty <- generateJson file as + case ty of + HeapProfile (header, data_json, descs, closure_descs) -> + return $ templateString header data_json descs closure_descs as + TickyProfile (header, tallocs, ticked_per, dat) -> + return $ tickyTemplateString header tallocs ticked_per dat as diff --git a/nix/sources.json b/nix/sources.json index 63ef659..6b7f2c3 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -5,10 +5,10 @@ "homepage": "https://input-output-hk.github.io/haskell.nix", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "1a2bea5d67a211620da2460f1e19e3f6e9018935", - "sha256": "1l34bq8v5lp5ji7cx06l3rw03zlis151g5apqyyfm5xanc0q160z", + "rev": "af82dc3e464f58f5cc90400200f703e197d52e84", + "sha256": "0cdbxwqd8d22dxnqx6d1060hpjk5awwp4z5v5lvavp3p8fngg9cv", "type": "tarball", - "url": "https://github.com/input-output-hk/haskell.nix/archive/1a2bea5d67a211620da2460f1e19e3f6e9018935.tar.gz", + "url": "https://github.com/input-output-hk/haskell.nix/archive/af82dc3e464f58f5cc90400200f703e197d52e84.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "niv": {