eventlog2html: Visualise an eventlog

[ bsd3, development, library, program ] [ Propose Tags ]

eventlog2html is a library for visualising eventlogs. At the moment, the intended use is to visualise eventlogs which have heap profiling events, as a replacement to hp2ps and hp2pretty. eventlog2html creates a static webpage which contains a collection of different interactive charts for analysing heap usage. Trace events are displayed on the chart and the charts can be zoomed, scrolled and filtered to give a more exploratory feel to heap profile analysis.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.11.0, 0.11.1
Change log CHANGELOG.md
Dependencies aeson (>=1.4.3 && <1.6 || >=2.0 && <2.3), array (>=0.5.3 && <0.6), attoparsec (>=0.13.2 && <0.15), base (>=4 && <5), blaze-html (>=0.9.1 && <0.10), blaze-markup (>=0.8 && <0.9), bytestring (>=0.10.8 && <0.13), containers (>=0.5.0 && <0.8), eventlog2html, file-embed (>=0.0.11 && <0.1), filepath (>=1.4.2 && <1.6), ghc-events (>=0.19.0 && <0.20), ghc-heap (>=9 && <10), githash (>=0.1.6.2 && <0.2), hashable (>=1.0 && <1.5), hashtables (>=1.2.3 && <1.4), hvega (>=0.11.0 && <0.13), mtl (>=2.2.2 && <2.4), optparse-applicative (>=0.14.3 && <0.19), raw-strings-qq (>=1.1 && <1.2), semigroups (>=0.18 && <0.21), statistics-linreg (>=0.3 && <0.4), text (>=1.2.3 && <1.3 || >=2.0 && <2.2), time (>=1.8.0 && <2.0), trie-simple (>=0.4 && <0.5), vector (>=0.11 && <0.14) [details]
License BSD-3-Clause
Copyright (C) 2010,2011,2015,2017,2018 Claude Heiland-Allen 2019 Matthew Pickering
Author Matthew Pickering, David Binder, Claude Heiland-Allen
Maintainer matthewtpickering@gmail.com
Category Development
Home page https://mpickering.github.io/eventlog2html
Bug tracker https://github.com/mpickering/eventlog2html/issues
Source repo head: git clone https://github.com/mpickering/eventlog2html.git
Uploaded by DavidBinder at 2024-08-17T16:48:50Z
Distributions NixOS:0.11.0
Reverse Dependencies 1 direct, 0 indirect [details]
Executables eventlog2html
Downloads 5512 total (28 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-08-17 [all 1 reports]

Readme for eventlog2html-0.11.1

[back to package description]

eventlog2html

Interactive Documentation

GHC Matrix CI Hackage

eventlog2html is a tool to visualise eventlogs. In particular, it creates interactive charts for the heap profiling information included in the eventlog.

The complete documentation contain interactive examples and complete usage information.

How to use

The tool produces a static webpage to visualise the heap profile. For an eventlog program.eventlog, a static page titled program.eventlog.html will be created adjacent to the original file.

In order to use eventlog2html you first need an eventlog with heap profiling samples.

Compile your program with -prof. In a cabal project, the easiest way to do this is to set profiling: True in the cabal.project file.

Then, run your program with the normal profiling flags with an additional -l flag. This will tell GHC to also emit the eventlog.

my-leaky-program +RTS -hy -l-au

In the current directory a file my-leaky-program.eventlog will be produced. This is what you need to pass to eventlog2html to generate the profiling graphs.

eventlog2html my-leaky-program.eventlog

Note: The -l-au suffix will result in a significantly smaller eventlog as it will not include thread events. This makes a big difference for multi-threaded applications.

Building the project

There are two supported ways to build the project: cabal new-build and nix. For development the normal cabal new-build workflow should work fine.

There are also nix files provided which can build both the tool and documentation. Binary caches are populated by CI.

cachix use mpickering
nix build -f . eventlog2html
nix build -f . site

Using nix means that you can conveniently try the project using

nix run -f https://github.com/mpickering/eventlog2html/archive/master.tar.gz eventlog2html -c eventlog2html my-leaky-program.eventlog

Fixing CI

If we need a newer version of a dependency then it might be necessary to update the index-state which haskell.nix uses to compute the build plan.

All this requires is updating the date in build.nix to something more recent. The index-state-hashes are updated once a day so you might have to choose a date from a few days ago rather than the current date.

Modifying Documentation

The documentation for the project is located in the docs folder. It is a hakyll site built by the generator in the hakyll-eventlog folder. CI automatically builds and deploys changes to the documentation.

Additional examples can be added by adding an eventlog to the examples subdirectory. They will automatically be added to the examples gallery.

You can build the documentation using the nix target or using cabal new-build hakyll-eventlog and invoking the resulting executable in the docs/ directory.

There is a custom pandoc filter which can insert rendered eventlogs into the documentation. To understand how this works it's probably easiest to read the code or copy the existing examples.