com.alibaba.rocketmq.common.protocol.body.BrokerStatsData Java Examples

The following examples show how to use com.alibaba.rocketmq.common.protocol.body.BrokerStatsData. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StatsAllSubCommand.java    From reading-and-annotate-rocketmq-3.4.6 with GNU General Public License v3.0 5 votes vote down vote up
public static long compute24HourSum(BrokerStatsData bsd) {
    if (bsd.getStatsDay().getSum() != 0) {
        return bsd.getStatsDay().getSum();
    }

    if (bsd.getStatsHour().getSum() != 0) {
        return bsd.getStatsHour().getSum();
    }

    if (bsd.getStatsMinute().getSum() != 0) {
        return bsd.getStatsMinute().getSum();
    }

    return 0;
}
 
Example #2
Source File: StatsAllSubCommand.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
public static long compute24HourSum(BrokerStatsData bsd) {
    if (bsd.getStatsDay().getSum() != 0) {
        return bsd.getStatsDay().getSum();
    }

    if (bsd.getStatsHour().getSum() != 0) {
        return bsd.getStatsHour().getSum();
    }

    if (bsd.getStatsMinute().getSum() != 0) {
        return bsd.getStatsMinute().getSum();
    }

    return 0;
}
 
Example #3
Source File: StatsAllSubCommand.java    From RocketMQ-Master-analyze with Apache License 2.0 5 votes vote down vote up
public static long compute24HourSum(BrokerStatsData bsd) {
    if (bsd.getStatsDay().getSum() != 0) {
        return bsd.getStatsDay().getSum();
    }

    if (bsd.getStatsHour().getSum() != 0) {
        return bsd.getStatsHour().getSum();
    }

    if (bsd.getStatsMinute().getSum() != 0) {
        return bsd.getStatsMinute().getSum();
    }

    return 0;
}
 
Example #4
Source File: MQAdminExtImpl.java    From rocket-console with Apache License 2.0 4 votes vote down vote up
@Override //查看集群状况 分时间段 tps
public BrokerStatsData viewBrokerStatsData(String brokerAddr, String statsName, String statsKey) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException {
    return MQAdminInstance.threadLocalMQAdminExt().viewBrokerStatsData(brokerAddr, statsName, statsKey);
}