From 0ceb0460290c7ea266947877d784d8ee1d901b84 Mon Sep 17 00:00:00 2001 From: zookzook Date: Tue, 19 Sep 2023 16:13:18 +0200 Subject: [PATCH] removed the benchmark code --- mix.exs | 3 +-- samples/decoder.exs | 19 ------------------- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 samples/decoder.exs diff --git a/mix.exs b/mix.exs index 71842255..d4f55aed 100644 --- a/mix.exs +++ b/mix.exs @@ -37,8 +37,7 @@ defmodule Mongodb.Mixfile do {:patch, "~> 0.12.0", only: [:dev, :test]}, {:jason, "~> 1.3", only: [:dev, :test]}, {:credo, "~> 1.6.1", only: [:dev, :test], runtime: false}, - {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}, - {:benchee, "~> 1.1", only: :dev} + {:ex_doc, ">= 0.0.0", only: :dev, runtime: false} ] end diff --git a/samples/decoder.exs b/samples/decoder.exs deleted file mode 100644 index 470c84f0..00000000 --- a/samples/decoder.exs +++ /dev/null @@ -1,19 +0,0 @@ -items = Enum.map(1..100, fn i -> %{id: :crypto.strong_rand_bytes(10), age: i, name: "Greta"} end) - -doc = %{ - name: "This is a test", - items: items -} - -encoded = BSON.encode(doc) - -IO.inspect(BSON.decode(encoded)) - -Benchee.run( - %{ - "Original encoder" => fn -> BSON.decode(encoded) end, - "Original encoder 1" => fn -> BSON.decode(encoded) end, - "Original encoder 2" => fn -> BSON.decode(encoded) end, - "Original encoder 3" => fn -> BSON.decode(encoded) end, - } -)