anchor.diff:  %% Tests
   
   parse_stats_test() ->
  -    Now = now(),
  +    Now = misc:time_to_epoch_ms_int(now()),
       Input =
           [{<<"conn_yields">>,<<"0">>},
            {<<"threads">>,<<"4">>},
  
positive.code: %% API
  -export([start_link/1]).
  
  -record(state, {bucket, counters, count=?LOG_FREQ}).
  
  %% gen_server callbacks
  -export([init/1, handle_call/3, handle_cast/2,
  
negative.code: handle_cast(unhandled, unhandled) ->
      unhandled.
  
  handle_info({tick, TS}, #state{bucket=Bucket, counters=Counters, last_ts=LastTS}
              = State) ->
      case catch ns_memcached:stats(Bucket) of
          {ok, Stats} ->
              TS1 = latest_tick(TS),
              {Entry, NewCounters} = parse_stats(TS1, Stats, Counters, LastTS),
              case Counters of % Don't send event with undefined values
                  undefined ->
                      ok;
  