anchor.diff:          _ ->
               ?LEVEL_INACTIVE
       end.
  -
  -%% @doc Retrieve level of mq
  -%% @private
  -level_mq([]) ->
  -    ?LEVEL_INACTIVE;
  -level_mq(MQStats) ->
  -    SumLevel = level_mq_1(MQStats, 0),
  -    erlang:round(SumLevel / erlang:length(MQStats)).
  -
  -%% @private
  -level_mq_1([], SoFar) ->
  -    SoFar;
  -level_mq_1([#mq_state{state = State}|Rest], SoFar) ->
  -    SoFar_1 = case leo_misc:get_value('consumer_status', State) of
  -                  'running' ->
  -                      SoFar + ?LEVEL_MID;
  -                  _ ->
  -                      SoFar
  -              end,
  -    level_mq_1(Rest, SoFar_1).
   
   %% @doc Retrieve level of cpu
   %% @private
  
positive.code:     case leo_compact_fsm_controller:state() of
          {ok, #compaction_stats{} = State} ->
              lists:zip(record_info(fields, compaction_stats), tl(tuple_to_list(State)));
          _ ->
              []
      end;
  get_node_stats_1(mq) ->
      case leo_storage_api:get_mq_consumer_state() of
          {ok, Val} ->
              Val;
          _ ->
              []
      end;
  
negative.code:              {ok, #state{}} | {error, Cause} when Cause::any()).
  get_node_stats() ->
      CompactionState = get_node_stats_1(compaction),
      CPUState  = get_node_stats_1(cpu),
      DiskState = get_node_stats_1(disk),
      {ok, #state{compaction = CompactionState,
                  cpu  = CPUState,
                  disk = DiskState
                 }}.
  