{"id":20862393,"url":"https://github.com/bencheeorg/benchee_csv","last_synced_at":"2025-12-11T23:31:45.947Z","repository":{"id":57479572,"uuid":"60472433","full_name":"bencheeorg/benchee_csv","owner":"bencheeorg","description":"Output your Benchee benchmarks as CSV to generate graphs in your favorite spreadsheet tool!","archived":false,"fork":false,"pushed_at":"2023-12-10T10:23:33.000Z","size":116,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-11T00:19:18.431Z","etag":null,"topics":["benchee","benchmarking","csv","formatter","plugin","spreadsheet"],"latest_commit_sha":null,"homepage":null,"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}},"created_at":"2016-06-05T17:36:38.000Z","updated_at":"2023-11-09T09:35:07.000Z","dependencies_parsed_at":"2023-12-10T10:25:44.368Z","dependency_job_id":"18fcd3fb-ec81-4b4f-ae3e-1131c053ee51","html_url":"https://github.com/bencheeorg/benchee_csv","commit_stats":{"total_commits":109,"total_committers":4,"mean_commits":27.25,"dds":0.09174311926605505,"last_synced_commit":"cc4e5807dc2e7f37c00b228a3d7461d465f5b1aa"},"previous_names":["pragtob/benchee_csv"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencheeorg%2Fbenchee_csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencheeorg%2Fbenchee_csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencheeorg%2Fbenchee_csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencheeorg%2Fbenchee_csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bencheeorg","download_url":"https://codeload.github.com/bencheeorg/benchee_csv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253709147,"owners_count":21951108,"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","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","csv","formatter","plugin","spreadsheet"],"created_at":"2024-11-18T05:23:31.198Z","updated_at":"2025-10-07T07:38:36.454Z","avatar_url":"https://github.com/bencheeorg.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# benchee_csv [![Hex Version](https://img.shields.io/hexpm/v/benchee_csv.svg)](https://hex.pm/packages/benchee_csv) [![docs](https://img.shields.io/badge/docs-hexpm-blue.svg)](https://hexdocs.pm/benchee_csv/) [![CI](https://github.com/bencheeorg/benchee_csv/actions/workflows/main.yml/badge.svg)](https://github.com/bencheeorg/benchee_csv/actions/workflows/main.yml) [![Coverage Status](https://coveralls.io/repos/github/bencheeorg/benchee_csv/badge.svg?branch=main)](https://coveralls.io/github/bencheeorg/benchee_csv?branch=main)\n\nFormatter for [benchee](https://github.com/PragTob/benchee) to turn the statistics output into a CSV file. This can then be used in the Spreadsheet tool of your choice to generate graphs to your liking.\n\nThese might then look like this one (quickly generated with LibreOffice from the output of the sample):\n\n![sample graphs](http://www.pragtob.info/images/benchee_csv.png)\n\n## Installation\n\nAdd benchee_csv to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:benchee_csv, \"~\u003e 1.0\", only: :dev}]\nend\n```\n\nAfterwards, run `mix deps.get` to install it.\n\n## Usage\n\nSimply configure `Benchee.Formatters.CSV` as one of the formatters for `Benchee.run/2` along with the file path you want the output to go (otherwise defaults to \"benchmark_output.csv\"):\n\n```elixir\nlist = Enum.to_list(1..10_000)\nmap_fun = fn i -\u003e [i, i * i] end\n\nBenchee.run(\n  %{\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.CSV, file: \"my.csv\"},\n    Benchee.Formatters.Console\n  ]\n```\n\nThe sample defines both the standard console formatter and the CSV formatter, if you don't care about the console output you can just delet that line.\n\nYou can also use the more verbose and versatile API of Benchee. When it comes to formatting just use `Benchee.Formatters.CSV.format/2` and then write it to a file (taking into account the new input structure). Check out the [samples directory](https://github.com/PragTob/benchee_csv/tree/master/samples) for the verbose samples to see how it's done.\n\n## Contributing\n\nContributions to benchee_csv 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_csv/blob/master/CODE_OF_CONDUCT.md).\n\nYou can get started with a look at the [open issues](https://github.com/PragTob/benchee_csv/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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencheeorg%2Fbenchee_csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbencheeorg%2Fbenchee_csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencheeorg%2Fbenchee_csv/lists"}