 defmodule Benchee.StatistcsTest do
   use ExUnit.Case
+  alias Benchee.Statistics
   doctest Benchee.Statistics
 
-  test "statistics computes the statistics for all jobs correctly" do
+  test ".statistics computes the statistics for all jobs correctly" do
     suite = %{
       run_times: %{
         "Job 1" => [600, 470, 170, 430, 300],

    assert stats_2.median == 14.0
  end

  test "sort sorts the benchmarks correctly and retains all date" do
    fourth = {"Fourth", %{average: 400.1, ips: 4_999.0,  std_dev_ratio: 0.7}}
    second = {"Second", %{average: 200.0, ips: 5_000.0,  std_dev_ratio: 2.1}}
    third  = {"Third",  %{average: 400.0, ips: 2_500.0,  std_dev_ratio: 1.5}}
    first  = {"First",  %{average: 100.0, ips: 10_000.0, std_dev_ratio: 0.3}}
    jobs = Map.new [fourth, second, third, first]

    assert Benchee.Statistics.sort(jobs) == [first, second, third, fourth]
  end
end


    %{statistics:
      %{"Job 1" => stats_1,
        "Job 2" => stats_2}} = Statistics.statistics suite

    assert stats_1.average == 394.0
    assert_in_delta stats_1.std_dev, 147.32, 0.01
