def stats
      {
        endpoint_name: @endpoint_name,
        started_at: @start,
        duration: format_ms(@duration),
        chain: sorted_chain.map do |event|
          { name: event[:name], duration: format_ms(event[:duration]) }
        end,
      }
    end
def stats
      {
        endpoint_name: @endpoint_name,
        started_at: @start,
        duration: format_ms(@duration),
        chain: sorted_chain.map do |event|
          { name: event[:name], duration: format_ms(event[:duration]) }
        end,
      }
    end
Serialize the results of the benchmarking