anchor.diff:                            {struct, [{name, <<"user:image:value4">>},
                                       {gets, 10000},
                                       {bucket, <<"chat application">>},
  -                                    {misses, 100}]}]},
  -              {op, {struct, [{tstamp, LastSampleTStamp},
  -                             {samplesInterval, SamplesInterval}
  -                             | Samples2]}}]}.
  +                                    {misses, 100}]}]}]}.
   
   -ifdef(EUNIT).
   
  
positive.code:      {evictionsPerSec, 5},
       {cachePercentUsed, 50}].
  
  handle_bucket_stats(PoolId, all, Req) ->
      % TODO: get aggregate stats for all buckets.
      handle_bucket_stats(PoolId, "default", Req);
  
  handle_bucket_stats(PoolId, Id, Req) ->
      Now = java_date(),
      Params = Req:parse_qs(),
      Res = build_bucket_stats_response(PoolId, Id, Params, Now),
      reply_json(Req, Res).
  
  %% Implementation
  
  
negative.code: %       {1263,946877,864065}]},
  %  ...]
  
  get_stats_raw(_PoolId, BucketId, SamplesNum) ->
      dict:to_list(stats_aggregator:get_stats(BucketId, SamplesNum)).
  
  get_stats(PoolId, BucketId, _Params) ->
      SamplesInterval = 1, % A sample every second.
      SamplesNum = 60, % Sixty seconds worth of data.
      Samples = get_stats_raw(PoolId, BucketId, SamplesNum),
      Samples2 = case lists:keytake(t, 1, Samples) of
                     false -> [{t, []} | Samples];
                     {value, {t, TStamps}, SamplesNoTStamps} ->
  