Skip to content

Commit

Permalink
Merge pull request #23 from bencheeorg/kianmeng-misc-doc-changes
Browse files Browse the repository at this point in the history
Kianmeng misc doc changes
  • Loading branch information
PragTob committed Dec 10, 2023
2 parents 8232b2e + a0377a7 commit 76d5f3d
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 19 deletions.
20 changes: 15 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
# 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

# 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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
```

Expand All @@ -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).

Expand All @@ -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.
33 changes: 23 additions & 10 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
Expand All @@ -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

0 comments on commit 76d5f3d

Please sign in to comment.