{"id":20862396,"url":"https://github.com/bencheeorg/benchee_html","last_synced_at":"2025-12-12T00:26:39.435Z","repository":{"id":51086787,"uuid":"68041325","full_name":"bencheeorg/benchee_html","owner":"bencheeorg","description":"Draw pretty micro benchmarking charts in HTML and allow to export them as png for benchee","archived":false,"fork":false,"pushed_at":"2023-12-27T20:30:52.000Z","size":2621,"stargazers_count":58,"open_issues_count":6,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-04T06:54:20.073Z","etag":null,"topics":["benchee","benchmarking","formatter","graph","html","plotlyjs","plugin"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bencheeorg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-12T19:37:24.000Z","updated_at":"2024-08-19T07:48:43.000Z","dependencies_parsed_at":"2024-01-14T07:06:48.106Z","dependency_job_id":"5c9412a1-4db5-4baf-b8fc-4b91ecd6a645","html_url":"https://github.com/bencheeorg/benchee_html","commit_stats":{"total_commits":246,"total_committers":12,"mean_commits":20.5,"dds":"0.25609756097560976","last_synced_commit":"6150baaea34d7a496d3de5cc80a2eb3f814b87ae"},"previous_names":["pragtob/benchee_html"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/bencheeorg/benchee_html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencheeorg%2Fbenchee_html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencheeorg%2Fbenchee_html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencheeorg%2Fbenchee_html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencheeorg%2Fbenchee_html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bencheeorg","download_url":"https://codeload.github.com/bencheeorg/benchee_html/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencheeorg%2Fbenchee_html/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270803531,"owners_count":24648688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchee","benchmarking","formatter","graph","html","plotlyjs","plugin"],"created_at":"2024-11-18T05:23:32.906Z","updated_at":"2025-12-12T00:26:39.407Z","avatar_url":"https://github.com/bencheeorg.png","language":"Elixir","readme":"# benchee_html [![Hex Version](https://img.shields.io/hexpm/v/benchee_html.svg)](https://hex.pm/packages/benchee_html) [![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/benchee_html/) [![CI](https://github.com/bencheeorg/benchee_html/actions/workflows/main.yml/badge.svg)](https://github.com/bencheeorg/benchee_html/actions/workflows/main.yml) [![Coverage Status](https://coveralls.io/repos/github/bencheeorg/benchee_html/badge.svg?branch=main)](https://coveralls.io/github/bencheeorg/benchee_html?branch=main) [![Total Download](https://img.shields.io/hexpm/dt/benchee_html.svg)](https://hex.pm/packages/benchee_html) [![License](https://img.shields.io/hexpm/l/benchee_html.svg)](https://github.com/bencheeorg/benchee_html/blob/master/LICENSE)\n\nFormatter for [benchee](//github.com/PragTob/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](https://plot.ly/javascript/)!\n\nTo get a taste of what this is like you can check out an [online example report](http://www.pragtob.info/benchee/README/results_comparison.html) or look at this little screenshot:\n\n![ips](http://www.pragtob.info/benchee/images/report.png)\n\nIt 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 :)\n\n## Installation\n\nAdd `:benchee_html` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:benchee_html, \"~\u003e 1.0\", only: :dev}\n  ]\nend\n```\n\n## Usage\n\nJust use it as a formatter for [benchee](https://github.com/PragTob/benchee):\n\n```elixir\nlist = Enum.to_list(1..10_000)\nmap_fun = fn(i) -\u003e [i, i * i] end\n\nBenchee.run(%{\n  \"flat_map\"    =\u003e fn -\u003e Enum.flat_map(list, map_fun) end,\n  \"map.flatten\" =\u003e fn -\u003e list |\u003e Enum.map(map_fun) |\u003e List.flatten end\n},\n  formatters: [\n    Benchee.Formatters.HTML,\n    Benchee.Formatters.Console\n  ]\n  # override defaults:\n  # formatters: [{Benchee.Formatters.HTML, file: \"output/my.html\", auto_open: false}]\n)\n```\n\nThe 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}]`\n\nOf course it also works with multiple inputs, in that case one file per input is generated:\n\n```elixir\nmap_fun = fn(i) -\u003e [i, i * i] end\n\nBenchee.run(%{\n  \"flat_map\"    =\u003e fn(list) -\u003e Enum.flat_map(list, map_fun) end,\n  \"map.flatten\" =\u003e fn(list) -\u003e list |\u003e Enum.map(map_fun) |\u003e List.flatten end\n},\n  formatters: [\n    {Benchee.Formatters.HTML, file: \"samples_output/my.html\"},\n    Benchee.Formatters.Console\n  ],\n  time: 7,\n  warmup: 3,\n  inputs: %{\n    \"Smaller List\" =\u003e Enum.to_list(1..1_000),\n    \"Bigger List\"  =\u003e Enum.to_list(1..100_000),\n  }\n)\n\n```\n\nWhen 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.\n\nBe aware, that currently when too many samples are recorded (\u003e 100_000 usually) rendering might break as plotly can't handle all that data. See [this issue](https://github.com/PragTob/benchee_html/issues/3) on how to quick fix it and what could be done in the future.\n\n## PNG image export/download\n\nWhen 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 :)\n\n![download](http://www.pragtob.info/benchee/images/download.png)\n\n\n## A look at graphs\n\nIn the wiki there is a page [providing an overview of the differnt chart types benchee_html produces](https://github.com/PragTob/benchee_html/wiki/Chart-Types).\n\nFor the ones that just want to scroll through, here they are once more.\n\n### IPS Bar Chart\n\n![ips](http://www.pragtob.info/benchee/images/ips.png)\n\n### Run Time Boxplot\n\n![boxplot](http://www.pragtob.info/benchee/images/boxplot.png)\n\n### Run Time Histogram\n\n![histo](http://www.pragtob.info/benchee/images/histogram.png)\n\n\n### Raw run times\n\n![raw_run_times](http://www.pragtob.info/benchee/images/raw_run_times.png)\n\n## Contributing\n\nContributions 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!\n\nPlease respect the [Code of Conduct](//github.com/PragTob/benchee_html/blob/master/CODE_OF_CONDUCT.md).\n\nYou can get started with a look at the [open issues](https://github.com/PragTob/benchee_html/issues).\n\nA couple of (hopefully) helpful points:\n\n* Feel free to ask for help and guidance on an issue/PR (\"How can I implement this?\", \"How could I test this?\", ...)\n* Feel free to open early/not yet complete pull requests to get some early feedback\n* When in doubt if something is a good idea open an issue first to discuss it\n* In case I don't respond feel free to bump the issue/PR or ping me on other places\n\n## Development\n\n* `mix deps.get` to install dependencies\n* `mix test` to run tests\n* `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)\n\n## Copyright and License\n\nCopyright (c) 2016 Tobias Pfeiffer\n\nThis library is released under the MIT License. See the [LICENSE.md](./LICENSE.md) file\nfor further details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencheeorg%2Fbenchee_html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbencheeorg%2Fbenchee_html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencheeorg%2Fbenchee_html/lists"}