anchor.diff:      TimeSinceTick = timer:now_diff(Now, LastTick),
   
       lager:info("[ metrics ] Evaluating rates..."),
  -    NewState = eval_rps(State, TimeSinceTick),
  +    NewState = eval_rps(State, Now),
   
       lager:info("[ metrics ] Checking assertions..."),
       NewAsserts = mzb_asserts:update_state(TimeSinceTick, Asserts),
  
positive.code:         _ -> {error, not_found}
      end.
  
  eval_rps(#s{previous_counter_values = PreviousData} = State, TimeInterval) ->
      Counters = [N || {[_, N], counter, _} <- exometer:find_entries([?GLOBALPREFIX])],
      NewData = lists:foldl(
          fun (Metric, Acc) ->
              NewMetric = Metric ++ ".rps",
              Old = proplists:get_value(NewMetric, Acc, 0),
              {ok, [{value, New}]} = exometer:get_value([?GLOBALPREFIX, Metric], value),
              HitsPerSecond = ((New - Old) * 1000000) / TimeInterval,
              _ = exometer:update_or_create([?GLOBALPREFIX, NewMetric], HitsPerSecond, gauge, []),
              lists:keystore(NewMetric, 1, Acc, {NewMetric, New})
          end, PreviousData, Counters),
      State#s{previous_counter_values = NewData}.
  
  aggregate_metrics_data(Metrics) ->
      lists:foldl(
  
negative.code:     {ok, GraphiteReporterRef} = init_exometer(Host, Port, ApiKey, MetricsPrefix, Metrics),
      erlang:send_after(?INTERVAL, self(), trigger),
      _ = [ok = mz_histogram:create(Nodes, Name) || {Name, histogram} <- lists:flatten(Metrics)],
      StartTime = os:timestamp(),
      _ = random:seed(StartTime),
      {ok, #s{
          prefix = MetricsPrefix,
          nodes = Nodes,
          supervisor_pid = SuperPid,
          graphite_reporter_ref = GraphiteReporterRef,
          last_tick_time = StartTime,
          start_time = StartTime,
          previous_counter_values = [],
          last_rps_calculation_time = StartTime,
          asserts = Asserts,
          active = true
          }}.
  