anchor.diff:  -record(state, {indexer :: atom(),
                   default_stats,
                   buckets}).
  +
  +-record(stats_accumulators, {
  +          gauges = [],
  +          counters = [],
  +          sys_gauges = [],
  +          sys_counters = [],
  +          status = []
  +         }).
   
   server_name(Indexer) ->
       list_to_atom(?MODULE_STRING "-" ++ atom_to_list(Indexer:get_type())).
  
positive.code:     end.
  
  do_recognize_name(_Indexer, <<"needs_restart">>) ->
      {status, index_needs_restart};
  do_recognize_name(_Indexer, <<"num_connections">>) ->
      {status, index_num_connections};
  do_recognize_name(Indexer, K) ->
      Type = find_type(K, [{service_gauge, Indexer:get_service_gauges()},
                           {service_counter, Indexer:get_service_counters()}]),
      case Type of
          not_found ->
              do_recognize_bucket_metric(Indexer, K);
  
negative.code:     end.
  
  massage_stats(Indexer, Ets, GrabbedStats) ->
      massage_stats(Indexer, Ets, GrabbedStats, #stats_accumulators{}).
  
  massage_stats(_Indexer, _Ets, [], Acc) ->
      Acc;
  massage_stats(Indexer, Ets, [{K, V} | Rest], Acc) ->
      case recognize_name(Indexer, Ets, K) of
          undefined ->
              massage_stats(Indexer, Ets, Rest, Acc);
          {Pos, NewK} ->
              massage_stats(
                Indexer, Ets, Rest, setelement(Pos, Acc, [{NewK, V} | element(Pos, Acc)]))
      end.
  
  grab_stats(#state{indexer = Indexer}) ->
  