[sip-comm-dev] media statistics sample

Hey folks,

We now have basic call stats reported in the log files. I am attaching
a sample here in case people would like them changed in some way.

   [java] 09:17:40.379 FINER:
impl.neomedia.transform.rtcp.StatisticsTransformEngine.transform().110
Sending report to remote party [packetCount:114, bytes:18400,
interarrival jitter:22, lost:0, lastSRBefore:32767999ms ]
    [java] 09:17:43.211 FINER:
impl.neomedia.MediaStreamImpl.update().2104 Remote party report
received (for stream 75367458) [packetCount:246, bytes:39360,
interarrival jitter:1886, lost:0, lastSRBefore:2726ms ]
    [java] 09:17:56.266 FINER:
impl.neomedia.transform.rtcp.StatisticsTransformEngine.transform().110
Sending report to remote party [packetCount:908, bytes:145440,
interarrival jitter:245, lost:0, lastSRBefore:3109ms ]
    [java] 09:18:03.157 FINER:
impl.neomedia.MediaStreamImpl.update().2104 Remote party report
received (for stream 75367458) [packetCount:1252, bytes:200320,
interarrival jitter:149, lost:0, lastSRBefore:4186ms ]
    [java] 09:18:12.709 FINER:
impl.neomedia.transform.rtcp.StatisticsTransformEngine.transform().110
Sending report to remote party [packetCount:1731, bytes:277120,
interarrival jitter:16, lost:0, lastSRBefore:4535ms ]

    [java] 09:20:18.122 FINER:
impl.neomedia.MediaStreamImpl.printFlowStatistics().2202 global
transmission stats (stream 75367458):
    [java] bytes sent: 1280000
    [java] remote reported min interarrival jitter : 104
    [java] remote reported max interarrival jitter : 2360
    [java] local collisions: 0
    [java] remote collisions: 0
    [java] RTCP sent: 36
    [java] RTP sent: 8000
    [java] transmit failed: 0
    [java] 09:20:18.122 FINER:
impl.neomedia.MediaStreamImpl.printFlowStatistics().2218 global
reception stats (stream 75367458):
    [java] packets received: 8004
    [java] bytes received: 1373340
    [java] packets lost: 3
    [java] reported min interarrival jitter : 16
    [java] reported max interarrival jitter : 314
    [java] bad RTCP packets: 0
    [java] bad RTP packets: 0
    [java] local collisions: 0
    [java] malformed BYEs: 0
    [java] malformed RRs: 0
    [java] malformed SDESs: 0
    [java] malformed SRs: 0
    [java] packets looped: 0
    [java] remote collisions: 0
    [java] RTCPs received: 31
    [java] SRRs received: 31
    [java] transmit failed: 0
    [java] unknown types: 0
    [java] 09:20:18.216 FINER:
impl.neomedia.MediaStreamImpl.printFlowStatistics().2202 global
transmission stats (stream 845019938):
    [java] bytes sent: 2600341
    [java] remote reported min interarrival jitter : 0
    [java] remote reported max interarrival jitter : 0
    [java] local collisions: 0
    [java] remote collisions: 0
    [java] RTCP sent: 23
    [java] RTP sent: 2954
    [java] transmit failed: 0
    [java] 09:20:18.216 FINER:
impl.neomedia.MediaStreamImpl.printFlowStatistics().2218 global
reception stats (stream 845019938):
    [java] packets received: 2962
    [java] bytes received: 2623352
    [java] packets lost: 3
    [java] reported min interarrival jitter : 520
    [java] reported max interarrival jitter : 4445
    [java] bad RTCP packets: 0
    [java] bad RTP packets: 0
    [java] local collisions: 0
    [java] malformed BYEs: 0
    [java] malformed RRs: 0
    [java] malformed SDESs: 0
    [java] malformed SRs: 0
    [java] packets looped: 0
    [java] remote collisions: 0
    [java] RTCPs received: 23
    [java] SRRs received: 23
    [java] transmit failed: 0
    [java] unknown types: 0

Cheers
damencho

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

Hey Damencho,

They look good! I would just like to ask for a few minor changes:

Sending report to remote party [packetCount:114, bytes:18400,

interarrival jitter:22, lost:0, lastSRBefore:32767999ms ]

Sending report to remote party -> Sending a report for [audio|video]
stream SSRC:<SSRC>

packetCount: -> packet count:
lost: -> lost packets:
lastSRBefore: -> time since previous report:

impl.neomedia.MediaStreamImpl.update().2104 Remote party report
received (for stream 75367458) [packetCount:1252, bytes:200320,
interarrival jitter:149, lost:0, lastSRBefore:4186ms ]

Remote party report received (for stream 75367458) ->
Received a report for [audio|stream] SSRC:75367458

packetCount: -> packet count:
lost: -> lost packets:
lastSRBefore: -> time since previous report:

     [java] 09:20:18.122 FINER:

All stats should be printed with an INFO level in order to be accessible
from the logs.

impl.neomedia.MediaStreamImpl.printFlowStatistics().2202 global
transmission stats (stream 75367458):

global transmission stats (stream 75367458) ->
call transmission stats for [incoming|outgoing] [audio|video] stream
SSRC:75367458

A few more comments:

Could we store, for logging purposes only, the format that we've last
set on a media stream so that we don't have to read it from the device
session. We should only modify the setFormat() method and getFormat()
should continue reading it from the device session (at least for now).
The name and the comment of the format field should make it clear it is
not necessarily a 100% reliable source for obtaining the current format.

Finally, I am thinking it would probably be nice to have a common prefix
for all stats so that one could easily grep for them in a log. In order
for this to happen, we would need to make sure that both kinds of stats
(report and global ones) are printed from the same place. We also need
to determine what to do with the multiline prints.

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net