Java 带宽消耗

Java 带宽消耗,java,wowza,Java,Wowza,我目前正在获取RTMP、HTTP和RTP的每个会话的带宽使用率,如下所示: //RTMP public void onStreamDestroy(IMediaStream stream) { if ( stream.getClient() != null){ IOPerformanceCounter perf = stream.getMediaIOPerformance(); Long outbytes = perf.getMe

我目前正在获取RTMP、HTTP和RTP的每个会话的带宽使用率,如下所示:

//RTMP
public void onStreamDestroy(IMediaStream stream) {
        if ( stream.getClient() != null){

            IOPerformanceCounter perf = stream.getMediaIOPerformance();

            Long outbytes = perf.getMessagesOutBytes();
        }
    }

//HTTP
public void onHTTPSessionDestroy(IHTTPStreamerSession httpSession) {
        if ( httpSession != null){

                    IOPerformanceCounter perf = httpSession.getIOPerformanceCounter();
                    Long outbytes = perf.getMessagesOutBytes(); 
                }
    }


    //RTP
    public void onRTPSessionDestroy(RTPSession rtpSession) {

        if ( rtpSession != null){

            IOPerformanceCounter perf = rtpSession.getIOPerformanceCounter();

            Long outbytes = perf.getMessagesOutBytes();

        }
    }
当我将我的使用情况与托管提供商进行比较时,情况就大不相同了。我的使用率低于我的提供商


这是获得带宽使用率的正确方法吗?

在我看来还可以。差别有多大?他们是从SP的角度提供每个协议的统计数据,还是仅仅提供总量?每天都是这样吗?