All Projects → bencheeorg → benchee_html

bencheeorg / benchee_html

Licence: MIT license
Draw pretty micro benchmarking charts in HTML and allow to export them as png for benchee

Programming Languages

elixir
2628 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to benchee html

perf check
PERRRFFF CHERRRRK!
Stars: ✭ 16 (-68%)
Mutual labels:  benchmarking
load-testing-toolkit
Collection of open-source tools for debugging, benchmarking, load and stress testing your code or services.
Stars: ✭ 65 (+30%)
Mutual labels:  benchmarking
csharpier
CSharpier is an opinionated code formatter for c#.
Stars: ✭ 337 (+574%)
Mutual labels:  formatter
string theory
Flexible modern C++ string library with type-safe formatting
Stars: ✭ 32 (-36%)
Mutual labels:  formatter
html-eslint
ESLint plugin for linting HTML
Stars: ✭ 72 (+44%)
Mutual labels:  formatter
ormolu.el
A formatter for Haskell source code
Stars: ✭ 31 (-38%)
Mutual labels:  formatter
vue-translated
Internationalization (i18n) and localization (l10n) library for Vue.js v2.
Stars: ✭ 19 (-62%)
Mutual labels:  formatter
ufmt
Safe, atomic formatting with black and µsort
Stars: ✭ 46 (-8%)
Mutual labels:  formatter
mirtop
command lines tool to annotate miRNAs with a standard mirna/isomir naming
Stars: ✭ 16 (-68%)
Mutual labels:  formatter
blockchain-load-testing
Code for load testing the Stellar network.
Stars: ✭ 36 (-28%)
Mutual labels:  benchmarking
benchmark-trend
Measure performance trends of Ruby code
Stars: ✭ 60 (+20%)
Mutual labels:  benchmarking
JsonFormatter
Easy, Fast and Lightweight Json Formatter. (Serializer and Deserializer)
Stars: ✭ 26 (-48%)
Mutual labels:  formatter
reframe
A powerful Python framework for writing and running portable regression tests and benchmarks for HPC systems.
Stars: ✭ 154 (+208%)
Mutual labels:  benchmarking
vscode-nginx-formatter
A simple Formatter, which formats NGINX Configuration Files in VSCode
Stars: ✭ 16 (-68%)
Mutual labels:  formatter
immuneML
immuneML is a platform for machine learning analysis of adaptive immune receptor repertoire data.
Stars: ✭ 41 (-18%)
Mutual labels:  benchmarking
beapi-bench
Tool for benchmarking apis. Uses ApacheBench(ab) to generate data and gnuplot for graphing. Adding new features almost daily
Stars: ✭ 16 (-68%)
Mutual labels:  benchmarking
unicode-formatter
Convert portions of text to fancy text using unicode fonts for use on Twitter and other sites that don't support rich text
Stars: ✭ 31 (-38%)
Mutual labels:  formatter
bench
⏱️ Reliable performance measurement for Go programs. All in one design.
Stars: ✭ 33 (-34%)
Mutual labels:  benchmarking
elm-benchmark
Benchmarking for Elm
Stars: ✭ 48 (-4%)
Mutual labels:  benchmarking
grandma
👵 fully programmable stress testing framework
Stars: ✭ 20 (-60%)
Mutual labels:  benchmarking

benchee_html Hex Version Build Status Coverage Status

Formatter for benchee to produce some standalone HTML with nice graphs, a data table etc. from your benchee benchmarking results :) Also allows you to export PNG images, the graphs are also somewhat explorable thanks to plotly.js!

To get a taste of what this is like you can check out an online example report or look at this little screenshot:

ips

It not only generates HTML but also assets and into the same folder. You can just take it and drop it on your server, github pages or public dropbox directory if you want it to be accessible to someone else :)

Installation

Add benchee_html to your list of dependencies in mix.exs:

def deps do
  [{:benchee_html, "~> 1.0", only: :dev}]
end

Usage

Just use it as a formatter for benchee:

list = Enum.to_list(1..10_000)
map_fun = fn(i) -> [i, i * i] end

Benchee.run(%{
  "flat_map"    => fn -> Enum.flat_map(list, map_fun) end,
  "map.flatten" => fn -> list |> Enum.map(map_fun) |> List.flatten end
},
  formatters: [
    Benchee.Formatters.HTML,
    Benchee.Formatters.Console
  ]
  # override defaults:
  # formatters: [{Benchee.Formatters.HTML, file: "output/my.html", auto_open: false}]
)

The report index page will be written to "benchmarks/output/results.html" and opened in your standard browser automatically. Of course you can also optionally specify a tuple of {Module, options} to specify a different destination for the reports: [{Benchee.Formatters.HTML, file: "your_file.html"}]. Auto open behaviour can be overridden in the same manner: html: [{Benchee.Formatters.HTML, auto_open: false}]

Of course it also works with multiple inputs, in that case one file per input is generated:

map_fun = fn(i) -> [i, i * i] end

Benchee.run(%{
  "flat_map"    => fn(list) -> Enum.flat_map(list, map_fun) end,
  "map.flatten" => fn(list) -> list |> Enum.map(map_fun) |> List.flatten end
},
  formatters: [
    {Benchee.Formatters.HTML, file: "samples_output/my.html"},
    Benchee.Formatters.Console
  ],
  time: 7,
  warmup: 3,
  inputs: %{
    "Smaller List" => Enum.to_list(1..1_000),
    "Bigger List"  => Enum.to_list(1..100_000),
  }
)

When you hover the graphs in the HTML report, quite some plotly.js controls and links appear with which you can navigate in the graph and more.

Be aware, that currently when too many samples are recorded (> 100_000 usually) rendering might break as plotly can't handle all that data. See this issue on how to quick fix it and what could be done in the future.

PNG image export/download

When you hover the graph the controls appear and the left most of those is a camera and says "Download plot as png" - and it does what you'd expect. Refer to the image below if you need more guidance :)

download

A look at graphs

In the wiki there is a page providing an overview of the differnt chart types benchee_html produces.

For the ones that just want to scroll through, here they are once more.

IPS Bar Chart

ips

Run Time Boxplot

boxplot

Run Time Histogram

histo

Raw run times

raw_run_times

Contributing

Contributions to benchee_html are very welcome! Bug reports, documentation, spelling corrections, whole features, feature ideas, bugfixes, new plugins, fancy graphics... all of those (and probably more) are much appreciated contributions!

Please respect the Code of Conduct.

You can get started with a look at the open issues.

A couple of (hopefully) helpful points:

  • Feel free to ask for help and guidance on an issue/PR ("How can I implement this?", "How could I test this?", ...)
  • Feel free to open early/not yet complete pull requests to get some early feedback
  • When in doubt if something is a good idea open an issue first to discuss it
  • In case I don't respond feel free to bump the issue/PR or ping me on other places

Development

  • mix deps.get to install dependencies
  • mix test to run tests
  • mix credo or mix credo --strict to find code style problems (not too strict with the 80 width limit for sample output in the docs)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].