 
   # callbacks
 
+  @doc false
   def start_server(exec) do
     {:ok, pid} = GenServer.start_link(__MODULE__, [])
 
     %Execution{exec | timing_pid: pid}
   end
 
+  @doc false
   def init(_) do
     {:ok, []}
   end
 
+  @doc false
   def handle_call({:append, tags, started_at, time}, _from, current_state) do
     new_current_state = [{tags, started_at, time} | current_state]
 
     {:reply, :ok, new_current_state}
   end
 
+  @doc false
   def handle_call(:all, _from, current_state) do
     list = Enum.sort_by(current_state, fn {_, started_at, _} -> started_at end)
 

defmodule Credo.Execution.Timing do
  use GenServer

  alias Credo.Execution

  def inspect(label, fun) do
    {time, result} = :timer.tc(fun)


    {started_at, time, result}
  end

  @doc """
  Adds a timing to the given `exec` using the given values of `tags`, `started_at` and `duration`.
  """
  def append(%Execution{timing_pid: pid}, tags, started_at, duration) do
    spawn(fn ->
      GenServer.call(pid, {:append, tags, started_at, duration})
    end)
  end

  @doc """
  Returns all timings for the given `exec`.
  """
  def all(%Execution{timing_pid: pid}) do
    GenServer.call(pid, :all)
  end

  @doc """
  Groups all timings for the given `exec` and `tag_name`.
  """
  def grouped_by_tag(exec, tag_name) do
    map =
      exec
