Skip to content

Commit

Permalink
Add more projects to benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
devinus committed Jun 25, 2021
1 parent ac17e00 commit 7d89863
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ $ MIX_ENV=bench mix run bench/run.exs

### Current Benchmarks

As of 2019-12-11:
As of 2020-06-25:

- Amazon EC2 c5n.2xlarge instance running Ubuntu Server 18.04:
https://gist.github.com/devinus/e0af1d75d70146e5d89b5e308edd1abd
- Amazon EC2 c5.2xlarge instance running Ubuntu Server 20.04:
https://gist.github.com/devinus/c82c2f6eaa22456e7ff0f5705466b1de

## License

Expand Down
10 changes: 7 additions & 3 deletions bench/run.exs
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,26 @@ defmodule Bench do
defp decode_jobs do
%{
"Jason" => &Jason.decode!/1,
"Jaxon" => &Jaxon.decode!/1,
"jiffy" => &:jiffy.decode(&1, [:return_maps, :use_nil]),
"JSON" => &JSON.decode!/1,
"jsone" => &:jsone.decode/1,
"JSX" => &JSX.decode!(&1, [:strict]),
"Poison" => &Poison.Parser.parse!/1
"Poison" => &Poison.Parser.parse!/1,
"Tiny" => &Tiny.decode!/1
}
end

defp encode_jobs do
%{
"Jason" => &Jason.encode!/1,
"jiffy" => &:jiffy.encode/1,
"Jaxon" => &Jaxon.encode!/1,
"jiffy" => &:jiffy.encode(&1, [:use_nil]),
"JSON" => &JSON.encode!/1,
"jsone" => &:jsone.encode/1,
"JSX" => &JSX.encode!/1,
"Poison" => &Poison.encode!/1
"Poison" => &Poison.encode!/1,
"Tiny" => &Tiny.encode!/1
}
end

Expand Down
4 changes: 3 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ defmodule Poison.Mixfile do
{:excoveralls, "~> 0.14", only: :test, runtime: false},
{:exjsx, "~> 4.0", only: [:bench, :profile], runtime: false},
{:jason, "~> 1.2", only: [:dev, :test, :bench, :profile], runtime: false},
{:jaxon, "~> 2.0", only: [:bench, :profile], runtime: false},
{:jiffy, "~> 1.0", only: [:bench, :profile], runtime: false},
{:json, "~> 1.4", only: [:bench, :profile], runtime: false},
{:jsone, "~> 1.6", only: [:bench, :profile], runtime: false},
{:junit_formatter, "~> 3.3", only: :test, runtime: false},
{:stream_data, "~> 0.5", only: [:dev, :test], runtime: false}
{:stream_data, "~> 0.5", only: [:dev, :test], runtime: false},
{:tiny, "~> 1.0", only: [:bench, :profile], runtime: false}
]
end

Expand Down
3 changes: 3 additions & 0 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
"dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"},
"earmark_parser": {:hex, :earmark_parser, "1.4.13", "0c98163e7d04a15feb62000e1a891489feb29f3d10cb57d4f845c405852bbef8", [:mix], [], "hexpm", "d602c26af3a0af43d2f2645613f65841657ad6efc9f0e361c3b6c06b578214ba"},
"elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_doc": {:hex, :ex_doc, "0.24.2", "e4c26603830c1a2286dae45f4412a4d1980e1e89dc779fcd0181ed1d5a05c8d9", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "e134e1d9e821b8d9e4244687fb2ace58d479b67b282de5158333b0d57c6fb7da"},
"excoveralls": {:hex, :excoveralls, "0.14.1", "14140e4ef343f2af2de33d35268c77bc7983d7824cb945e6c2af54235bc2e61f", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "4a588f9f8cf9dc140cc1f3d0ea4d849b2f76d5d8bee66b73c304bb3d3689c8b0"},
Expand All @@ -17,6 +18,7 @@
"hackney": {:hex, :hackney, "1.17.4", "99da4674592504d3fb0cfef0db84c3ba02b4508bae2dff8c0108baa0d6e0977c", [:rebar3], [{:certifi, "~>2.6.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "de16ff4996556c8548d512f4dbe22dd58a587bf3332e7fd362430a7ef3986b16"},
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
"jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"},
"jaxon": {:hex, :jaxon, "2.0.7", "d63d3687e35ce1f641cef3002917e561c9efe06ddcd3951e4835a0011da68706", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "c1833c9c7e70b39be8fb7c4d3cc697220f49ca1fcfb61aa745348b9317b9a34e"},
"jiffy": {:hex, :jiffy, "1.0.8", "60e36f00be35e5ac6e6cf2d4caf3bdf3103d4460aff385f543a8d7df2d6d9613", [:rebar3], [], "hexpm", "f9ae986ba5a0854eb48cf6a76192d9367086da86c20197da430630be7c087a4e"},
"json": {:hex, :json, "1.4.1", "8648f04a9439765ad449bc56a3ff7d8b11dd44ff08ffcdefc4329f7c93843dfa", [:mix], [], "hexpm", "9abf218dbe4ea4fcb875e087d5f904ef263d012ee5ed21d46e9dbca63f053d16"},
"jsone": {:hex, :jsone, "1.6.0", "4ed7e456cff24ff153c2eac7e1855797ea1b1416ef0bbc368525ed8cbeb57518", [:rebar3], [], "hexpm", "9e5623ac927a278086a3e758537c68f312f6b16a2d0582a0d1c8a58bd4a939db"},
Expand All @@ -31,5 +33,6 @@
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
"stream_data": {:hex, :stream_data, "0.5.0", "b27641e58941685c75b353577dc602c9d2c12292dd84babf506c2033cd97893e", [:mix], [], "hexpm", "012bd2eec069ada4db3411f9115ccafa38540a3c78c4c0349f151fc761b9e271"},
"tiny": {:hex, :tiny, "1.0.1", "535ea7e600cb1c6ba17b53029266d9d7ec54ce29bfb05d906c433907acfa01ca", [:mix], [], "hexpm", "1278a457deb8d99135c378b71f66f21e283d8adea426252a3f8f5e003c536a7b"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
}

0 comments on commit 7d89863

Please sign in to comment.