diff --git a/.gitignore b/.gitignore index 9cddf1d..ba71f45 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,17 @@ # The directory Mix will write compiled artifacts to. -/_build +/_build/ # If you run "mix test --cover", coverage assets end up here. -/cover +/cover/ # The directory Mix downloads your dependencies sources to. -/deps +/deps/ -# Where 3rd-party dependencies like ExDoc output generated docs. -/doc +# Where third-party dependencies like ExDoc output generated docs. +/doc/ + +# Ignore .fetch files in case you like to edit your project deps locally. +/.fetch # If the VM crashes, it generates a dump, let's ignore it too. erl_crash.dump @@ -16,4 +19,11 @@ erl_crash.dump # Also ignore archive artifacts (built via "mix archive.build"). *.ez +# Ignore package tarball (built via "mix hex.build"). +benchee_json-*.tar + +# Temporary files for e.g. tests. +/tmp/ + +# Misc. my.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 23f0895..6cc562b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + ## 1.0.0 - 2019-03-28 + * Benchee 0.99 & 1.0.0 support * BREAKING: data structures changed, no more `run_times`/`memory_usages`/`run_time_statitics`/`memory_usage_statistics` - it's all in `run_time_data`/`memory_usage_data` now under the keys `samples`/`statistics` to mirror the original benchee data structure. diff --git a/README.md b/README.md index 994be6c..a9567d1 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,16 @@ -# benchee_json [![Hex Version](https://img.shields.io/hexpm/v/benchee_json.svg)](https://hex.pm/packages/benchee_json) [![CI](https://github.com/bencheeorg/benchee_json/actions/workflows/main.yml/badge.svg)](https://github.com/bencheeorg/benchee_json/actions/workflows/main.yml) [![Coverage Status](https://coveralls.io/repos/github/bencheeorg/benchee_json/badge.svg?branch=master)](https://coveralls.io/github/bencheeorg/benchee_json?branch=master) +# benchee_json [![Hex Version](https://img.shields.io/hexpm/v/benchee_json.svg)](https://hex.pm/packages/benchee_json) [![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/benchee_json/) [![CI](https://github.com/bencheeorg/benchee_json/actions/workflows/main.yml/badge.svg)](https://github.com/bencheeorg/benchee_json/actions/workflows/main.yml) [![Coverage Status](https://coveralls.io/repos/github/bencheeorg/benchee_json/badge.svg?branch=master)](https://coveralls.io/github/bencheeorg/benchee_json?branch=master) [![Total Download](https://img.shields.io/hexpm/dt/benchee_json.svg)](https://hex.pm/packages/benchee_json) [![License](https://img.shields.io/hexpm/l/benchee_json.svg)](https://github.com/bencheeorg/benchee_json/blob/master/LICENSE) Formats a benchee benchmarking suite to a JSON representation and can also write it to disk. Actively used in [benchee_html](https://github.com/PragTob/benchee_html) to generate JSON, and embed it into the JavaScript to give the JS access to the benchmarking results for graphing purposes. ## Installation -Add `benchee_json` to your list of dependencies in `mix.exs`: +Add `:benchee_json` to your list of dependencies in `mix.exs`: ```elixir def deps do - [{:benchee_json, "~> 1.0", only: :dev}] + [ + {:benchee_json, "~> 1.0", only: :dev} + ] end ``` @@ -33,7 +35,7 @@ Benchee.run(%{ ## Contributing -Contributions to benchee_json 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! +Contributions to `:benchee_json` 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](//github.com/PragTob/benchee_json/blob/master/CODE_OF_CONDUCT.md). @@ -51,3 +53,10 @@ A couple of (hopefully) helpful points: * `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) + +## Copyright and License + +Copyright (c) 2016 Tobias Pfeiffer + +This library is released under the MIT License. See the [LICENSE.md](./LICENSE.md) file +for further details. diff --git a/mix.exs b/mix.exs index 5389eb0..c734af2 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,9 @@ defmodule BencheeJSON.Mixfile do use Mix.Project + @source_url "https://github.com/PragTob/benchee_json" @version "1.0.0" + def project do [ app: :benchee_json, @@ -10,9 +12,8 @@ defmodule BencheeJSON.Mixfile do build_embedded: Mix.env() == :prod, start_permanent: Mix.env() == :prod, deps: deps(), - docs: [source_ref: @version], + docs: docs(), package: package(), - test_coverage: [tool: ExCoveralls], preferred_cli_env: [ coveralls: :test, "coveralls.detail": :test, @@ -28,30 +29,42 @@ defmodule BencheeJSON.Mixfile do ] end - def application do - [] - end - defp deps do [ {:benchee, ">= 0.99.0 and < 2.0.0"}, {:jason, "~> 1.0"}, {:excoveralls, "~> 0.8", only: :test}, {:credo, "~> 1.0", only: :dev}, - {:ex_doc, "~> 0.14", only: :dev}, - {:earmark, "~> 1.0", only: :dev}, + {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}, {:dialyxir, "~> 1.0", only: :dev, runtime: false} ] end defp package do [ + description: "JSON formatter for the (micro) benchmarking library benchee.", maintainers: ["Tobias Pfeiffer"], licenses: ["MIT"], links: %{ - "github" => "https://github.com/PragTob/benchee_json", - "Blog posts" => "https://pragtob.wordpress.com/tag/benchee/" + "Blog posts" => "https://pragtob.wordpress.com/tag/benchee/", + "Changelog" => "https://github.com/bencheeorg/benchee_json/blob/main/CHANGELOG.md", + "GitHub" => @source_url } ] end + + defp docs do + [ + extras: [ + "CHANGELOG.md", + "CODE_OF_CONDUCT.md": [title: "Code of Conduct"], + "LICENSE.md": [title: "License"], + "README.md": [title: "Overview"] + ], + main: "readme", + source_url: @source_url, + source_ref: @version, + formatters: ["html"] + ] + end end