stats/latency stats

271 views
Skip to first unread message

Max Dörfler

unread,
Nov 2, 2015, 8:18:19 AM11/2/15
to kurento
Hey,

we use our RTP to WebRTC setup to stream video content to the browser. I use Kurento Server 6.1.1, kurento-client 6.1.1-dev.

I like to get stats from the endpoints, so I call getStats on the two endpoints. The problem is that the result of getStats on the rtpEndpoint is always null. No error is thrown or returned.

Question 1: What is going on? :)

I use this function to get the stats of the endpoints. I pass in references to the endpoints when calling getStats.
function getStats(endpoint, done) {
 
if (endpoint) {
    endpoint
.getStats(function(err, stats) {
     
return done(err, stats);
   
});
 
} else {
   
return done(null, "No Endpoint");
 
}
}


This is the output:
rtpEndpoint null

webRtcEndpoint
{ '4ca3cb9e-9269-4504-a000-75dc797e85cd':
   
{ __module__: 'kurento',
     __type__
: 'RTCOutboundRTPStreamStats',
     associateStatsId
: '',
     bytesSent
: 52800,
     codecId
: '',
     firCount
: 0,
     fractionLost
: 0,
     id
: '4ca3cb9e-9269-4504-a000-75dc797e85cd',
     isRemote
: false,
     mediaTrackId
: '',
     nackCount
: 0,
     packetsLost
: 0,
     packetsSent
: 330,
     pliCount
: 0,
     remb
: 0,
     roundTripTime
: 0.0008697509765625,
     sliCount
: 0,
     ssrc
: '4285449851',
     targetBitrate
: 64355,
     timestamp
: 1446469583,
     transportId
: '',
     type
: 'outboundrtp' },
 
'a376b855-0ec9-41a2-9269-b0a48b569c29':
   
{ __module__: 'kurento',
     __type__
: 'RTCOutboundRTPStreamStats',
     associateStatsId
: '',
     bytesSent
: 2324031,
     codecId
: '',
     firCount
: 0,
     fractionLost
: 0,
     id
: 'a376b855-0ec9-41a2-9269-b0a48b569c29',
     isRemote
: false,
     mediaTrackId
: '',
     nackCount
: 0,
     packetsLost
: 0,
     packetsSent
: 1764,
     pliCount
: 0,
     remb
: 0,
     roundTripTime
: 0.0005035400390625,
     sliCount
: 0,
     ssrc
: '1084455287',
     targetBitrate
: 2843979,
     timestamp
: 1446469583,
     transportId
: '',
     type
: 'outboundrtp' } }


The second question is about the latency stats feature introduced in 6.1.1 (see: here). How can I access them? I don't see them included in the output above.

Thanks and regards
Max

Santiago Carot Nemesio

unread,
Nov 2, 2015, 10:02:30 AM11/2/15
to kur...@googlegroups.com
Hi,

Latency stats stand for the average time that buffers spent in the pipeline. You have these measures for both audio and video. By default, those measures are disabled because of the impact they might have in the whole  pipeline, so it's up to you to enable them. Anyway, you can always enable/disable them by setting the latencyStats property in the pipeline here 

As for the problem regarding the rtpendpoint stats it's quite strange, I always get proper values for tests I've made. Check media server logs whenever you request any stats to the rtpendpoint and verify that server is always proving you something instead of a null value.

Regards

--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Hassman

unread,
Nov 2, 2015, 12:22:19 PM11/2/15
to kur...@googlegroups.com
I haven't yet had a chance to try the latest dev version, so haven't followed up, but the result Max is seeing is identical to mine.
 


From: kur...@googlegroups.com [mailto:kur...@googlegroups.com] On Behalf Of Santiago Carot Nemesio
Sent: Monday, November 02, 2015 10:02 AM
To: kur...@googlegroups.com
Subject: Re: [kurento-public] stats/latency stats

Ivan Gracia

unread,
Nov 3, 2015, 3:53:20 AM11/3/15
to Kurento Public
There was an issue with this about a month ago. The release had a regression, so you can use that in the development version of KMS. Otherwise, you'll have to do without until the next release, which should be in one or two weeks.

Ivan Gracia


Max Dörfler

unread,
Nov 3, 2015, 10:02:10 AM11/3/15
to kurento
Hi,

thank you for the info. By adding the following I now see the latency stats:
pipeline.setLatencyStats(true, function(err) {
   
if (err) {
        console
.log("Error enabling latency stats", err);
   
}
});
Reply all
Reply to author
Forward
0 new messages