anchor.diff:      end.
   
   
  +metric_and_paths(Metric) ->
  +    Parts = statser_util:split_metric(Metric),
  +    keep_last(Parts).
  +
  +
  +keep_last([]) -> error;
  +keep_last(Parts) -> keep_last(Parts, []).
  +
  +keep_last([Part], Acc) ->
  +    {lists:reverse(Acc), Part};
  +keep_last([Part | Parts], Acc) ->
  +    keep_last(Parts, [Part | Acc]).
  +
  +
   get_suffix(File) ->
       get_suffix(lists:reverse(File), 4, []).
   
  
positive.code:      ?_assertEqual({"", "sp"}, get_suffix("sp")),
       ?_assertEqual({"foo", ".wsp"}, get_suffix("foo.WSP")),
       ?_assertEqual({"Foo", ".wsp"}, get_suffix("Foo.WSP"))
      ].
  
  convert_metric_test_() ->
  
negative.code: 
  
  register_metric_handler(Path, Pid) ->
      {Paths, Name} = metric_and_paths(Path),
      Metric = #metric_file{name=Name, handler=Pid},
      gen_server:cast(?MODULE, {register_handler, Metric, Paths}).
  
  
  unregister_metric_handler(Path) ->
      register_metric_handler(Path, undefined).
  
  
  %%%===================================================================
  