   ## Examples
 
       iex> run_times = [200, 400, 400, 400, 500, 500, 500, 700, 900]
-      iex> Benchee.Statistics.job_statistics(run_times, :run_time)
+      iex> Benchee.Statistics.job_statistics(run_times)
       %Benchee.Statistics{
         average:       500.0,
-        ips:           2000.0,
+        ips:           nil,
         std_dev:       200.0,
         std_dev_ratio: 0.4,
-        std_dev_ips:   800.0,
+        std_dev_ips:   nil,
         median:        500.0,
         percentiles:   %{50 => 500.0, 99 => 900.0},
         mode:          [500, 400],

      }

  """
  @spec job_statistics(samples, atom) :: __MODULE__.t()
  def job_statistics([], _) do
    %__MODULE__{sample_size: 0}
  end

  def job_statistics(measurements, run_time_or_memory) do
    total = Enum.sum(measurements)
    num_iterations = length(measurements)
    average = total / num_iterations
    ips = iterations_per_second(average, run_time_or_memory)
    deviation = standard_deviation(measurements, average, num_iterations)
    standard_dev_ratio = if average == 0, do: 0, else: deviation / average
    standard_dev_ips = ips * standard_dev_ratio
    percentiles = Percentile.percentiles(measurements, [50, 99])
    median = Map.fetch!(percentiles, 50)
    mode = Mode.mode(measurements)

            },
            memory_usage_statistics: %Benchee.Statistics{
              average:       500.0,
              ips:           nil,
              std_dev:       200.0,
              std_dev_ratio: 0.4,
              std_dev_ips:   nil,
              median:        500.0,
              percentiles:   %{50 => 500.0, 99 => 900.0},
              mode:          [500, 400],
