anchor.diff:  %%% This module provides functions for gathering and calculating
   %%% statistical data. They are invoked by node_manager.
   %%% Some statistics require previous measurements to be calculated.
  -%%% In order to encapsulate this aspect in this module, there is a
  +%%% In order to encapsulate this aspect inside this module, there is a
   %%% dedicated record that shall be passed to all function calls.
   %%% @end
   %%%-------------------------------------------------------------------
  
positive.code:                       {ok, <<"full\n">>} -> 2;
                        _ -> 1
                    end,
      IntSpeedMB = case file:read_file(?NET_SPEED_FILE(Interface)) of
                       {ok, SpeedBin} ->
                           binary_to_integer(binary:part(SpeedBin, 0, byte_size(SpeedBin) - 1));
                       _ ->
                           10
                   end,
      IntSpeedMB * 1024 * 1024 * DuplexRatio * TimeElapsed.
  
  
  %%--------------------------------------------------------------------
  
negative.code:     {NetUsage, MaxThroughput} = lists:foldl(
          fun({Name, Value}, {AccNU, AccMS}) ->
              case Name of
                  % Sum bytes sent and received
                  <<"net_rx_b_eth", _/binary>> ->
                      {AccNU + Value, AccMS};
                  <<"net_tx_b_eth", _/binary>> ->
                      {AccNU + Value, AccMS};
                  % Sum throughputs
                  <<"net_maxthp_eth", _/binary>> ->
                      {AccNU, AccMS + Value};
                  _ ->
                      {AccNU, AccMS}
              end
          end, {0, 0}, NetStats),
      % Calc usage in per cent
      NetUsage / MaxThroughput * 100.
  
  
  