anchor.diff:  
   -define(NUM_SAMPLES, 61).
   
  --record(state, {bucket, samples}).
  +-record(state, {bucket, samples, table}).
   
   -export([start_link/1,
            latest/2, latest/3, latest/4,
  
positive.code:     {reply, ringbuffer:to_list(N, Samples), State}.
  
  
  handle_cast(unhandled, unhandled) ->
      unhandled.
  
  
  handle_info({stats, Bucket, Sample}, State = #state{bucket=Bucket,
                                                     samples=Samples}) ->
      gen_event:notify(ns_stats_event, {sample_archived, Bucket, Sample}),
      {noreply, State#state{samples=ringbuffer:add(Sample,
                                                   Samples)}}.
  
  
  terminate(_Reason, _State) ->
      ok.
  
  
  %% Internal functions
  
  server(Bucket) ->
      list_to_atom(?MODULE_STRING ++ "-" ++ Bucket).
  
negative.code: %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  %% See the License for the specific language governing permissions and
  %% limitations under the License.
  %%
  %% @doc Store and aggregate statistics collected from memcached.
  %%
  
  -module(stats_archiver).
  
  