anchor.diff:  -record(state, {bucket}).
   
   -export([start_link/1,
  -         latest/3, latest/4,
  +         latest/3, latest/4, latest/5,
            latest_all/2, latest_all/3]).
   
   -export([code_change/3, init/1, handle_call/3, handle_cast/2, handle_info/2,
  
positive.code:     Node = node(),
      lists:foreach(
        fun ({Period, _, _}) ->
                TableName = table_name(Node, Bucket, Period),
                ?log_info("Creating table ~p.", [TableName]),
                case mnesia:create_table(TableName,
                                         [{disc_copies, [Node]},
  
negative.code: 
  
  %% @doc Generate a suitable name for the Mnesia table.
  table(Node, Bucket, Period) ->
      list_to_atom(lists:flatten(io_lib:format("~s-~s-~s-~s",
                                               [?MODULE_STRING,
                                                Node, Bucket, Period]))).
  
  
  %% @doc Truncate a timestamp to the nearest multiple of N seconds.
  trunc_ts(TS, N) ->
      TS - (TS rem (N*1000)).
  
  
  %% @doc Truncate the given table to the last N records.
  