Skip to content

Commit

Permalink
Create a benchmark project
Browse files Browse the repository at this point in the history
  • Loading branch information
williamthome committed Nov 4, 2023
1 parent 050de40 commit c2170b1
Show file tree
Hide file tree
Showing 19 changed files with 125,201 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ edoc: $(REBAR)
-eval '{ok, saved_to_file} = httpc:request(get, {"$(REBAR_URL)", []}, [], [{stream, "./rebar3"}])' \
-s init stop
chmod +x ./rebar3

bench.encode:
cd jsxrecord_bench && mix encode

bench.decode:
cd jsxrecord_bench && mix decode
4 changes: 4 additions & 0 deletions jsxrecord_bench/.formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test,script}/**/*.{ex,exs}"]
]
26 changes: 26 additions & 0 deletions jsxrecord_bench/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# The directory Mix will write compiled artifacts to.
/_build/

# If you run "mix test --cover", coverage assets end up here.
/cover/

# The directory Mix downloads your dependencies sources to.
/deps/

# 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").
jsxrecord_bench-*.tar

# Temporary files, for example, from tests.
/tmp/
21 changes: 21 additions & 0 deletions jsxrecord_bench/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# JsxrecordBench

**TODO: Add description**

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `jsxrecord_bench` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:jsxrecord_bench, "~> 0.1.0"}
]
end
```

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at <https://hexdocs.pm/jsxrecord_bench>.

32 changes: 32 additions & 0 deletions jsxrecord_bench/mix.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
defmodule JSXRecordBench.MixProject do
use Mix.Project

def project do
[
app: :jsxrecord_bench,
version: "0.1.0",
elixir: "~> 1.16-dev",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases()
]
end

defp aliases() do
[
encode: ["run script/encode.exs"],
decode: ["run script/decode.exs"]
]
end

# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:jsxrecord, path: "../"},
{:jsx, "~> 3.1"},
{:jason, "~> 1.4"},
{:benchee, "~> 1.1"},
{:benchee_html, "~> 1.0"},
]
end
end
10 changes: 10 additions & 0 deletions jsxrecord_bench/mix.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
%{
"benchee": {:hex, :benchee, "1.1.0", "f3a43817209a92a1fade36ef36b86e1052627fd8934a8b937ac9ab3a76c43062", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}], "hexpm", "7da57d545003165a012b587077f6ba90b89210fd88074ce3c60ce239eb5e6d93"},
"benchee_html": {:hex, :benchee_html, "1.0.0", "5b4d24effebd060f466fb460ec06576e7b34a00fc26b234fe4f12c4f05c95947", [:mix], [{:benchee, ">= 0.99.0 and < 2.0.0", [hex: :benchee, repo: "hexpm", optional: false]}, {:benchee_json, "~> 1.0", [hex: :benchee_json, repo: "hexpm", optional: false]}], "hexpm", "5280af9aac432ff5ca4216d03e8a93f32209510e925b60e7f27c33796f69e699"},
"benchee_json": {:hex, :benchee_json, "1.0.0", "cc661f4454d5995c08fe10dd1f2f72f229c8f0fb1c96f6b327a8c8fc96a91fe5", [:mix], [{:benchee, ">= 0.99.0 and < 2.0.0", [hex: :benchee, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "da05d813f9123505f870344d68fb7c86a4f0f9074df7d7b7e2bb011a63ec231c"},
"deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
"euneus": {:hex, :euneus, "0.4.0", "5d2993c190ade720f06fca41359458fc6905460eca801d3a77bc6ff4650882d5", [:rebar3], [], "hexpm", "10ebcc349babee03ab2c389e8ce2295c50276a3f640652bb6c21656fd8601a2c"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
"jsx": {:hex, :jsx, "3.1.0", "d12516baa0bb23a59bb35dccaf02a1bd08243fcbb9efe24f2d9d056ccff71268", [:rebar3], [], "hexpm", "0c5cc8fdc11b53cc25cf65ac6705ad39e54ecc56d1c22e4adb8f5a53fb9427f3"},
"statistex": {:hex, :statistex, "1.0.0", "f3dc93f3c0c6c92e5f291704cf62b99b553253d7969e9a5fa713e5481cd858a5", [:mix], [], "hexpm", "ff9d8bee7035028ab4742ff52fc80a2aa35cece833cf5319009b52f1b5a86c27"},
}
Loading

0 comments on commit c2170b1

Please sign in to comment.