eventlog2html: Visualise an eventlog

[ bsd3, development, library, program ] [ Propose Tags ] [ Report a vulnerability ]

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

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

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
Dependencies aeson (>=1.4.3 && <1.6), array (>=0.5.3 && <0.6), attoparsec (>=0.13.2 && <0.14), base (>=4 && <5), blaze-html (>=0.9.1 && <0.10), bytestring (>=0.10.8 && <0.11), containers (>=0.5.0 && <0.7), eventlog2html, file-embed (>=0.0.11 && <0.1), filepath (>=1.4.2 && <1.5), ghc-events (>=0.16.0 && <0.18), ghc-heap, hashable (>=1.0), hashtables (>=1.2.3 && <1.3), hvega (>=0.11.0 && <0.12), mtl (>=2.2.2 && <2.3), optparse-applicative (>=0.14.3 && <0.17), semigroups (>=0.18 && <0.20), statistics-linreg (>=0.3), text (>=1.2.3 && <1.3), time (>=1.8.0 && <2.0), trie-simple (>=0.4), vector (>=0.11) [details]
Tested with ghc ==8.6.5
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
Revised Revision 1 made by mpickering at 2021-08-25T16:15:20Z
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 mpickering at 2021-06-21T08:14:38Z
Distributions NixOS:0.11.1
Reverse Dependencies 1 direct, 0 indirect [details]
Executables eventlog2html
Downloads 5656 total (48 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-06-21 [all 1 reports]

Readme for eventlog2html-0.9.1

[back to package description]

eventlog2html

Interactive Documentation

Build Status 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.