anchor.diff:      Now = now(),
       Elapsed = trunc(timer:now_diff(Now, State#state.start_time) / 1000000),
       Window  = trunc(timer:now_diff(Now, State#state.last_write_time) / 1000000),
  -    
  +
       %% Time to report latency data to our CSV files
       {Oks, Errors} = lists:foldl(fun(Op, {TotalOks, TotalErrors}) ->
                                           {Oks, Errors} = report_latency(Elapsed, Window, Op),
  
positive.code:                               Oks,
                                Errors])),
  
      %% Schedule next report
      erlang:send_after(State#state.report_interval, self(), report),    
      {noreply, State#state { last_write_time = Now}}.
  
  terminate(_Reason, State) ->
      [ok = file:close(F) || {{csv_file, _}, F} <- erlang:get()],
  
negative.code:     erlang:put({latencies, Op}, Hist),
      {reply, ok, State};
  handle_call({op, Op, {error, Reason}, _ElapsedUs}, _From, State) ->
      increment_error_counter(Op),
      increment_error_counter({Op, Reason}),
      {reply, ok, State#state { errors_since_last_report = true }}.
  
  handle_cast(_, State) ->
      {noreply, State}.
  