Skip to content

renatoathaydes/h_view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HView

HView Logo

A Histogram Viewer for HdrHistogram, such as those produced by the wrk2 performance testing tool.

HView can run in most browsers, as an offline web application (PWA), and as a desktop/mobile application on any OS supported by Flutter.

You can try the web version at hview.netlify.app. If you like Hview, you can install it by clicking on the install icon on the URL bar (on browsers that support it, like Chrome).

Currently, to use the native desktop/mobile application, you must build it yourself.

Using HView

HView expects a file containing HdrHistogram data as input. Click on the top-right button to open a file picker.

Open file

Select the histogram file. If all goes well, you should see a chart like this:

Example Chart - Go VS Dart HTTP Server

Click on the top-left corner burger icon to open the settings drawer:

Settings screen

You can change the following settings, as shown above:

  • The title of the chart.
  • Maximum number of 9's in 99.n% percentile to display.
  • Percentile horizontal line (shows the mean, 0.5, by default).

The value for the percentile line can be empty, in which case the horizontal line is hidden. Values must be between 0 (shows the minimum) and 1.0 (shows the maximum). The value 0.99, for example, shows the 99th percentile.

To export a PNG image of the chart, click on the button to the left of the file picker button:

Export image

Creating wrk2 histograms

When using wrk2, make sure to run it with the --latency flag.

To provide a name for each series, include a single line with the title (starting with # ) before each histogram data.

Example:

# My first series

< histogram data goes here>

# Another series

< histogram data goes here>

You may use a command as shown below to produce an appropriate file:

# Run Go Server (or whatever you're measuring) in another shell
echo "# Go HTTP\n" >> dart_vs_go.txt && \
wrk2 -t8 -c100 -d30s -R200 --latency "http://[::1]:8080/" >> dart_vs_go.txt

# Run Dart Server (or whatever else you're measuring) in another shell
echo "# Dart HttpServer\n" >> dart_vs_go.txt && \
wrk2 -t8 -c100 -d30s -R200 --latency "http://[::1]:8080/" >> dart_vs_go.txt

Acknowledgements

HView is built on Flutter.

Flutter charts are provided by Syncfusion.

The HdrHistogram format and wrk2, which HView was designed to integrate with, were created by Gil Tene.

Thanks to favicon.io for providing a free, simple icon generator. HView's icons were generated using it.

Thanks also to Netlify for providing free hosting for the web app.

Deploying HView Website

Run this command to build it:

flutter build web --release

Upload the build/web directory to a web server.

HView is currently deployed on Netlify at hview.netlify.app.