anchor.diff:  
   -include_lib("eunit/include/eunit.hrl").
   
  --define(to_int(Value), list_to_integer(binary_to_list(Value))).
   -define(SHP_VERSION, 1).
   
  -% -type shp_metric_type() :: (<<"m">> | <<"mr">> | <<"g">> | <<"h">>).
   -type shp_metric_type() :: 'm' | 'mr' | 'g' | 'h'.
   
   -record(shp_metric, {key :: binary(),
  
positive.code: parse_body({_Length, Body}) ->
      try
          Lines = binary:split(Body, <<"\n">>, [global]),
          [ parse_line(L) || L <- Lines, L =/= <<>> ]
      catch
          error:Why ->
              error_logger:error_report({bad_metric,
  
negative.code: parse_type(<<"mr">>) ->
      mr;
  parse_type(<<"g">>) ->
      g;
  parse_type(Unknown) ->
      throw({bad_metric, {unknown_type, Unknown}}).
  
  parse_sample_rate([]) ->
      undefined;
  parse_sample_rate([<<"@", FloatBin/binary>>]) ->
      try
          list_to_float(binary_to_list(FloatBin))
      catch
          error:badarg ->
              throw({bad_metric, {bad_sample_rate, FloatBin}})
      end;
  parse_sample_rate(L) ->
      throw({bad_metric, {bad_sample_rate, L}}).
  
  to_int(Value) when is_binary(Value) ->
      try
          list_to_integer(binary_to_list(Value))
      catch
          error:badarg ->
              throw({bad_metric, {bad_value, Value}})
      end.
  
  estatsd_shp_test_() ->
      {foreach,
  