anchor.diff:  handle_info(init, State) ->
       create_tables(State#state.bucket),
       {noreply, State};
  -handle_info({stats, Bucket, Sample}, State = #state{bucket=Bucket}) ->
  +handle_info({stats, Bucket, Sample}, State) ->
  +    true = (Bucket =:= State#state.bucket),
  +
       Tab = table(Bucket, minute),
       #stat_entry{timestamp=TS} = Sample,
       ets:insert(Tab, {TS, Sample}),
       gen_event:notify(ns_stats_event, {sample_archived, Bucket, Sample}),
  -    {noreply, State};
  -handle_info({sample_archived, _, _}, State) ->
       {noreply, State};
   handle_info({truncate, Period, N} = Msg, #state{bucket=Bucket} = State) ->
       flush(Msg),
  
positive.code:     start_cascade_timers(Archives),
      timer2:send_after(random:uniform(?BACKUP_INTERVAL), backup),
  
      ns_pubsub:subscribe_link(ns_stats_event),
      process_flag(trap_exit, true),
      {ok, #state{bucket=Bucket}}.
  
  
negative.code:         false ->
              ok
      end.
  
  stats_event_handler(Event, {Parent, Bucket} = State) ->
      case Event of
          {stats, EventBucket, _}
            when EventBucket =:= Bucket ->
              Parent ! Event;
          _ ->
              ok
      end,
      State.
  