anchor.diff:      ?assertEqual([
           #{ name => "Default",
              graphs => [#{metrics => [#{name => "counter",
  -                                      realtime => true}],
  +                                      realtime => true,
  +                                      visibility => true}],
                           units   => "msg" },
                         #{metrics => [#{name => "counter.rps",
  -                                      realtime => true}],
  +                                      realtime => true,
  +                                      visibility => true}],
                           units   => "msg/sec" }]}],
           build_graphite([{graph, #{ units => "msg",
                                      metrics => [{"counter", counter, #{realtime => true}}]}}])).
  
positive.code: normalization_bc_test() ->
      ?assertEqual(
         [{group, "Default", [
              {graph, #{metrics => [ {"counter", counter, #{}} ]} }]
         }],
         mzb_script_metrics:normalize([{"counter", counter}])),
  
      ?assertEqual(
         [{group, "Default", [
              {graph, #{metrics => [
                          {"counter1", counter, #{}},
                          {"counter2", counter, #{}}]}
              }]
         }],
         mzb_script_metrics:normalize([[{"counter1", counter},
                                        {"counter2", counter}]])).
  
  
  graphite_one_metric_test() ->
      ?assertEqual([
          #{ name => "Default",
             graphs => [#{metrics => [#{name => "counter"}] },
                        #{metrics => [#{name => "counter.rps"}],
                          units => "rps" }]}],
          build_graphite([{"counter", counter}])).
  
  
negative.code: graphite_histogram_test() ->
      ?assertEqual([
          #{ name => "Default",
             graphs => [#{metrics => [ #{name => "bar.min", visibility => true},
                                       #{name => "bar.max", visibility => true},
                                       #{name => "bar.mean", visibility => true},
                                       #{name => "bar.50", visibility => true},
                                       #{name => "bar.75", visibility => true},
                                       #{name => "bar.90", visibility => true},
                                       #{name => "bar.95", visibility => true},
                                       #{name => "bar.99", visibility => true},
                                       #{name => "bar.999", visibility => true}]}]}],
          build_graphite([{"bar", histogram}])).
  
  graphite_counter_with_gauge_test() ->
      ?assertEqual([
          #{ name => "Default",
             graphs => [#{metrics => [ #{name => "gauge", visibility => true},
                                       #{name => "counter", visibility => true} ]},
                        #{metrics => [ #{name => "gauge", visibility => true},
                                       #{name => "counter.rps", visibility => true}]}]}],
          build_graphite([[{"counter", counter}, {"gauge", gauge}]])).
  
  graphite_all_in_one_group_test() ->
      ?assertEqual([
          #{ name => "Default",
             graphs => [#{metrics => [ #{name => "counter", visibility => true},
                                       #{name => "counter.rps", visibility => true},
                                       #{name => "gauge", visibility => true},
                                       #{name => "histogram.min", visibility => true},
                                       #{name => "histogram.max", visibility => true},
                                       #{name => "histogram.mean", visibility => true},
                                       #{name => "histogram.50", visibility => true},
                                       #{name => "histogram.75", visibility => true},
                                       #{name => "histogram.90", visibility => true},
                                       #{name => "histogram.95", visibility => true},
                                       #{name => "histogram.99", visibility => true},
                                       #{name => "histogram.999", visibility => true}]}]}],
          build_graphite([[{"counter", counter}, {"gauge", gauge}, {"histogram", histogram}]])).
  
  graphite_groups_test() ->
      ?assertEqual([
          #{ name => "Default",
             graphs => [#{metrics => [ #{name => "gauge", visibility => true} ]}] },
          #{ name => "Group1",
             graphs => [#{metrics => [ #{name => "counter1", visibility => true}]},
                        #{metrics => [ #{name => "counter1.rps", visibility => true}],
                          units   => "rps" }]},
          #{ name => "Group2",
             graphs => [#{metrics => [ #{name => "counter2", visibility => true}]},
                        #{metrics => [ #{name => "counter2.rps", visibility => true}],
                          units   => "rps" }]}],
          build_graphite([{group, "Group1", [
                              {graph, #{metrics => [{"counter1", counter}]}}]},
  