anchor.diff:      binary_to_atom(<<Bin1/binary, $_, Bin2/binary>>, latin1).
   
   stats() ->
  -    [{riak_kv_vnode_gets, meter},
  -     {riak_kv_vnode_puts, meter},
  -     {riak_kv_vnode_index_reads, meter},
  -     {riak_kv_vnode_index_writes, meter},
  -     {riak_kv_vnode_index_writes_postings, meter},
  -     {riak_kv_vnode_index_deletes, meter},
  -     {riak_kv_vnode_index_deletes_postings, meter},
  -     {riak_kv_node_gets_total, counter},
  -     {riak_kv_node_get_fsm_siblings, histogram},
  -     {riak_kv_node_get_fsm_objsize, histogram},
  -     {riak_kv_node_get_fsm_time, histogram},
  -     {riak_kv_node_puts_total, counter},
  -     {riak_kv_node_put_fsm_time, histogram},
  -     {riak_kv_pbc_connects, meter},
  -     {riak_kv_pbc_connects_active, counter},
  -     {riak_kv_read_repairs, meter},
  -     {riak_kv_coord_redirs_total, counter},
  -     {riak_kv_mapper_count, counter},
  -     {riak_kv_precommit_fail, counter},
  -     {riak_kv_postcommit_fail, counter}].
  -
  -register_stat({Name, meter}) ->
  +    [{vnode_gets, meter},
  +     {vnode_puts, meter},
  +     {vnode_index_reads, meter},
  +     {vnode_index_writes, meter},
  +     {vnode_index_writes_postings, meter},
  +     {vnode_index_deletes, meter},
  +     {vnode_index_deletes_postings, meter},
  +     {node_gets_total, counter},
  +     {node_get_fsm_siblings, histogram},
  +     {node_get_fsm_objsize, histogram},
  +     {node_get_fsm_time, histogram},
  +     {node_puts_total, counter},
  +     {node_put_fsm_time, histogram},
  +     {pbc_connects, meter},
  +     {pbc_connects_active, counter},
  +     {read_repairs, meter},
  +     {coord_redirs_total, counter},
  +     {mapper_count, counter},
  +     {precommit_fail, counter},
  +     {postcommit_fail, counter}].
  +
  +register_stat(Name, meter) ->
       folsom_metrics:new_meter(Name);
  -register_stat({Name, counter}) ->
  +register_stat(Name, counter) ->
       folsom_metrics:new_counter(Name);
  -register_stat({Name, histogram}) ->
  +register_stat(Name, histogram) ->
       %% get the global default histo type
       {SampleType, SampleArgs} = get_sample_type(Name),
       folsom_metrics:new_histogram(Name, SampleType, SampleArgs).
  
positive.code: %%      of stats.
  produce_stats() ->
      lists:append(
        [lists:flatten([backwards_compat(Name, Type, get_stat(Stat)) || {Name, Type}=Stat <- stats()]),
         cpu_stats(),
         mem_stats(),
         disk_stats(),
  
negative.code:     ok;
  do_put_bucket(true, {Bucket, Microsecs}=Args) ->
      BucketAtom = binary_to_atom(Bucket, latin1),
      case (catch folsom_metrics:notify_existing_metric({?APP, join(node_puts_total, BucketAtom)}, {inc, 1}, counter)) of
          ok ->
              folsom_metrics:notify_existing_metric({?APP, join(node_put_fsm_time, BucketAtom)}, Microsecs, histogram);
          {'EXIT', _} ->
              register_stat({?APP, join(node_puts_total, BucketAtom)}, counter),
              register_stat({?APP, join(node_put_fsm_time, BucketAtom)}, histogram),
              do_put_bucket(true, Args)
      end.
  
  