anchor.diff:  -module(lucene_bench).
   -author('elbrujohalcon@inaka.net').
   
  --export([add/2, match/6, just_match/4, concurrency/6]).
  +-export([add/2, match/7, just_match/5, concurrency/7]).
   -export([sleep/2]).
   
   -spec add(pos_integer(), pos_integer()) -> float().
  
positive.code: 	GenMax = lists:max([M || {_, M} <- Results]),
  	{GenAvg, GenMax}.
  
  match(C, Query, PageSize, Parent) ->
  	Self = self(),
  	Pids =
  		[spawn(fun() -> receive P -> P ! timer:tc(lucene, match, [Query, PageSize]) end end)
  	 	 || _ <- lists:seq(1, C)],
  	[Pid ! Self || Pid <- Pids],
  	Times =
  
negative.code: 		fun(I) ->
  			Field = integer_to_list((I rem NumFields) + 1),
  			{Avg, Max} =
  				lucene_bench:just_match(N, I, Query ++ " AND Field" ++ Field ++ ":F" ++ Field ++ "*", Filters, 10),
  			io:format("~3b: ~..3f / ~..3f~n", [I, Avg, Max])
  		end, lists:seq(CStep, CTop, CStep)).
  
  -spec sleep(pos_integer(), [undefined | integer()]) -> [undefined | float()].
  sleep(Ms, Is) ->
  	timer:sleep(Ms),
  	[element(1, string:to_float(I ++ ".0")) || [_|I] <- Is].
  