anchor.diff:      fold_links_should_succeed/1,
       fold_links_token_should_succeed/1,
       get_links_trees_should_return_all_trees/1,
  -    fold_links_token_should_succeed_after_token_timeout/1
  +    fold_links_token_should_succeed_after_token_timeout/1,
  +    links_performance/1,
  +    links_performance_base/1
   ]).
   
   all() ->
  
positive.code:         fold_links_should_succeed,
          fold_links_token_should_succeed,
          get_links_trees_should_return_all_trees,
          fold_links_token_should_succeed_after_token_timeout
      ]).
  
  -define(DOC(Model), ?DOC(?KEY, Model)).
  -define(DOC(Key, Model), ?BASE_DOC(Key, ?MODEL_VALUE(Model))).
  
  -define(ATTEMPTS, 30).
  
  %%%===================================================================
  %%% Test functions
  
negative.code:             Opts2 = Opts#{token => Token, offset => Offset + length(Reversed)},
              timer:sleep(timer:seconds(10)),
              Reversed ++ fold_links_token_sleep(Key, Worker, Model, Opts2)
      end.
  
  fold_links_offset(Key, Worker, Model, Opts, ExpectedSize) ->
      {ok, Links} = ?assertMatch({ok, _}, rpc:call(Worker, Model, fold_links,
          [Key, all, fun(Link, Acc) -> {ok, [Link | Acc]} end, [], Opts]
      )),
      LinksLength = length(Links),
      case LinksLength >= ExpectedSize of
          true ->
              Links;
          _ ->
              Offset = maps:get(offset, Opts),
              Opts2 = Opts#{offset => Offset + LinksLength},
              Links ++ fold_links_offset(Key, Worker, Model, Opts2,
                  ExpectedSize - LinksLength)
      end.