anchor.diff:  %% for db monitoring
   -export([init_db_monitors/2, update_db_monitor/2]).
   %% Metrics
  --export([get_load_metric/0]).
  +-export([get_load_metric/0, get_request_metric/0]).
   % Load Balancing
   -export([balance_nodes/3, balance_nodes/4, balance_noop/1]).
   
  
positive.code:                 case intervals:in(?MINUS_INFINITY, MyRange) andalso MyRange =/= intervals:all() of
                      false ->
                          {histogram, HistogramSize};
                      true -> %% we need a normalized histogram because of the key space overflow
                          NormFun =
                              fun(Val) ->
                                      case Val - MyId of
  
negative.code: init_stats() ->
      case collect_stats() of
          true ->
              Resolution = config:read(lb_active_monitor_resolution),
              %LongTerm  = rrd:create(60 * 5 * 1000000, 5, {timing, '%'}),
              %monitor:client_monitor_set_value(lb_active, cpu5min, LongTerm),
              %monitor:client_monitor_set_value(lb_active, mem5min, LongTerm),
              ShortTerm = rrd:create(Resolution * 1000, 5, gauge),
              monitor:client_monitor_set_value(lb_active, cpu, ShortTerm),
              monitor:client_monitor_set_value(lb_active, mem, ShortTerm);
          _ ->
              ok
      end.
  
  %% @doc initially checks if enough metric data has been collected
  -spec monitor_vals_appeared() -> boolean().
  monitor_vals_appeared() ->
      Metric = config:read(lb_active_metric),
  