anchor.diff:  	line  :: non_neg_integer(),
   	tries :: non_neg_integer(),
   	colls :: non_neg_integer(),
  -	hist  :: tuple(),           % histogram
   	time  :: non_neg_integer(), % us
  -	nt    :: non_neg_integer()  % #timings collected
  +	nt    :: non_neg_integer(), % #timings collected
  +	hist  :: tuple()            % histogram
       }).
   
   -record(lock, {
  
positive.code: 	(X, Y) -> {X,Y}
      end, record_info(fields, state), Values).
  
  list2state(List) -> list2state(record_info(fields, state), List, [state]).
  list2state([], _, Out) -> list_to_tuple(lists:reverse(Out));
  list2state([locks|Fs], List, Out) ->
      Locks = [ list2lock(Lock) || Lock <- proplists:get_value(locks, List, [])],
      list2state(Fs, List, [Locks|Out]);
  list2state([F|Fs], List, Out) -> list2state(Fs, List, [proplists:get_value(F, List, state_default(F))|Out]).
  
  lock_default(Field) -> proplists:get_value(Field, lock2list(#lock{})).
  
  lock2list(Lock) ->
      [_|Values] = tuple_to_list(Lock),
      lists:zip(record_info(fields, lock), Values).
  
  list2lock(List) -> list2lock(record_info(fields, lock), List, [lock]).
  list2lock([], _, Out) -> list_to_tuple(lists:reverse(Out));
  list2lock([F|Fs], List, Out) -> list2lock(Fs, List, [proplists:get_value(F, List, lock_default(F))|Out]).
  
  %% printing
  
  
negative.code: 	cr,     % collision ratio
  	time,
  	dtr,    % time duration ratio
  	%% new
  	hist    % log2 histogram of lock wait_time
      }).
  
  