Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kianmeng misc doc changes #23

Merged
merged 3 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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