anchor.diff:  %       {1263,946877,864065}]},
   %  ...]
   
  -get_stats(_PoolId, BucketId, SamplesNum) ->
  +get_stats_raw(_PoolId, BucketId, SamplesNum) ->
       dict:to_list(stats_aggregator:get_stats(BucketId, SamplesNum)).
   
  -build_bucket_stats_response(PoolId, BucketId, _Params, _Now) ->
  +get_stats(PoolId, BucketId, _Params) ->
       SamplesInterval = 1, % A sample every second.
       SamplesNum = 60, % Sixty seconds worth of data.
  -    Samples = get_stats(PoolId, BucketId, SamplesNum),
  +    Samples = get_stats_raw(PoolId, BucketId, SamplesNum),
       Samples2 = case lists:keytake(t, 1, Samples) of
                      false -> [{t, []} | Samples];
                      {value, {t, TStamps}, SamplesNoTStamps} ->
  
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:                           {struct, [{name, <<"user:image:value4">>},
                                      {gets, 10000},
                                      {bucket, <<"chat application">>},
                                      {misses, 100}]}]}]}.
  
  -ifdef(EUNIT).
  
  