Browse Source

TT#178352 export additional VoIP metrics

Change-Id: Ib5886e4ccd3f746cd230a21a98cb8ec485bbc921
pull/1525/head
Richard Fuchs 4 years ago
parent
commit
9b4669d7e6
4 changed files with 627 additions and 0 deletions
  1. +5
    -0
      daemon/ssrc.c
  2. +9
    -0
      daemon/statistics.c
  3. +4
    -0
      include/gauge_stats_fields.inc
  4. +609
    -0
      t/test-stats.c

+ 5
- 0
daemon/ssrc.c View File

@ -396,6 +396,11 @@ void ssrc_receiver_report(struct call_media *m, const struct ssrc_receiver_repor
.packetloss = (unsigned int) rr->fraction_lost * 100 / 256,
};
RTPE_GAUGE_SET(jitter, jitter);
RTPE_GAUGE_SET(rtt_e2e, rtt_end2end);
RTPE_GAUGE_SET(rtt_dsct, rtt);
RTPE_GAUGE_SET(packetloss, ssb->packetloss);
other_e->packets_lost = rr->packets_lost;
mos_calc(ssb);
if (ssb->mos) {


+ 9
- 0
daemon/statistics.c View File

@ -551,6 +551,15 @@ GQueue *statistics_gather_metrics(void) {
HEADER(NULL, "");
HEADER("}", "");
HEADER("voip_metrics", "VoIP metrics:");
HEADER("{", "");
STAT_GET_PRINT(jitter, "jitter", 1.0);
STAT_GET_PRINT(rtt_e2e, "end-to-end round-trip time", 1.0);
STAT_GET_PRINT(rtt_dsct, "discrete round-trip time", 1.0);
STAT_GET_PRINT(packetloss, "packet loss", 1.0);
HEADER(NULL, "");
HEADER("}", "");
HEADER("controlstatistics", "Control statistics:");
HEADER("{", "");
HEADER("proxies", NULL);


+ 4
- 0
include/gauge_stats_fields.inc View File

@ -9,3 +9,7 @@ F(userspace_streams)
F(kernel_only_streams)
F(kernel_user_streams)
F(mos)
F(jitter)
F(rtt_e2e)
F(rtt_dsct)
F(packetloss)

+ 609
- 0
t/test-stats.c View File

@ -900,6 +900,93 @@ int main(void) {
"\n"
"\n"
"}\n"
"VoIP metrics:\n"
"voip_metrics\n"
"\n"
"{\n"
"Sum of all jitter values sampled\n"
"jitter_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all jitter square values sampled\n"
"jitter2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of jitter samples\n"
"jitter_samples_total\n"
"0\n"
"0\n"
"Average jitter\n"
"jitter_average\n"
"0.000000\n"
"0.000000\n"
"jitter standard deviation\n"
"jitter_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time values sampled\n"
"rtt_e2e_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time square values sampled\n"
"rtt_e2e2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of end-to-end round-trip time samples\n"
"rtt_e2e_samples_total\n"
"0\n"
"0\n"
"Average end-to-end round-trip time\n"
"rtt_e2e_average\n"
"0.000000\n"
"0.000000\n"
"end-to-end round-trip time standard deviation\n"
"rtt_e2e_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time values sampled\n"
"rtt_dsct_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time square values sampled\n"
"rtt_dsct2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of discrete round-trip time samples\n"
"rtt_dsct_samples_total\n"
"0\n"
"0\n"
"Average discrete round-trip time\n"
"rtt_dsct_average\n"
"0.000000\n"
"0.000000\n"
"discrete round-trip time standard deviation\n"
"rtt_dsct_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss values sampled\n"
"packetloss_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss square values sampled\n"
"packetloss2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of packet loss samples\n"
"packetloss_samples_total\n"
"0\n"
"0\n"
"Average packet loss\n"
"packetloss_average\n"
"0.000000\n"
"0.000000\n"
"packet loss standard deviation\n"
"packetloss_stddev\n"
"0.000000\n"
"0.000000\n"
"\n"
"\n"
"}\n"
"Control statistics:\n"
"controlstatistics\n"
"\n"
@ -1801,6 +1888,93 @@ int main(void) {
"\n"
"\n"
"}\n"
"VoIP metrics:\n"
"voip_metrics\n"
"\n"
"{\n"
"Sum of all jitter values sampled\n"
"jitter_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all jitter square values sampled\n"
"jitter2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of jitter samples\n"
"jitter_samples_total\n"
"0\n"
"0\n"
"Average jitter\n"
"jitter_average\n"
"0.000000\n"
"0.000000\n"
"jitter standard deviation\n"
"jitter_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time values sampled\n"
"rtt_e2e_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time square values sampled\n"
"rtt_e2e2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of end-to-end round-trip time samples\n"
"rtt_e2e_samples_total\n"
"0\n"
"0\n"
"Average end-to-end round-trip time\n"
"rtt_e2e_average\n"
"0.000000\n"
"0.000000\n"
"end-to-end round-trip time standard deviation\n"
"rtt_e2e_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time values sampled\n"
"rtt_dsct_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time square values sampled\n"
"rtt_dsct2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of discrete round-trip time samples\n"
"rtt_dsct_samples_total\n"
"0\n"
"0\n"
"Average discrete round-trip time\n"
"rtt_dsct_average\n"
"0.000000\n"
"0.000000\n"
"discrete round-trip time standard deviation\n"
"rtt_dsct_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss values sampled\n"
"packetloss_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss square values sampled\n"
"packetloss2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of packet loss samples\n"
"packetloss_samples_total\n"
"0\n"
"0\n"
"Average packet loss\n"
"packetloss_average\n"
"0.000000\n"
"0.000000\n"
"packet loss standard deviation\n"
"packetloss_stddev\n"
"0.000000\n"
"0.000000\n"
"\n"
"\n"
"}\n"
"Control statistics:\n"
"controlstatistics\n"
"\n"
@ -2699,6 +2873,93 @@ int main(void) {
"\n"
"\n"
"}\n"
"VoIP metrics:\n"
"voip_metrics\n"
"\n"
"{\n"
"Sum of all jitter values sampled\n"
"jitter_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all jitter square values sampled\n"
"jitter2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of jitter samples\n"
"jitter_samples_total\n"
"0\n"
"0\n"
"Average jitter\n"
"jitter_average\n"
"0.000000\n"
"0.000000\n"
"jitter standard deviation\n"
"jitter_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time values sampled\n"
"rtt_e2e_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time square values sampled\n"
"rtt_e2e2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of end-to-end round-trip time samples\n"
"rtt_e2e_samples_total\n"
"0\n"
"0\n"
"Average end-to-end round-trip time\n"
"rtt_e2e_average\n"
"0.000000\n"
"0.000000\n"
"end-to-end round-trip time standard deviation\n"
"rtt_e2e_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time values sampled\n"
"rtt_dsct_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time square values sampled\n"
"rtt_dsct2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of discrete round-trip time samples\n"
"rtt_dsct_samples_total\n"
"0\n"
"0\n"
"Average discrete round-trip time\n"
"rtt_dsct_average\n"
"0.000000\n"
"0.000000\n"
"discrete round-trip time standard deviation\n"
"rtt_dsct_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss values sampled\n"
"packetloss_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss square values sampled\n"
"packetloss2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of packet loss samples\n"
"packetloss_samples_total\n"
"0\n"
"0\n"
"Average packet loss\n"
"packetloss_average\n"
"0.000000\n"
"0.000000\n"
"packet loss standard deviation\n"
"packetloss_stddev\n"
"0.000000\n"
"0.000000\n"
"\n"
"\n"
"}\n"
"Control statistics:\n"
"controlstatistics\n"
"\n"
@ -3610,6 +3871,93 @@ int main(void) {
"\n"
"\n"
"}\n"
"VoIP metrics:\n"
"voip_metrics\n"
"\n"
"{\n"
"Sum of all jitter values sampled\n"
"jitter_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all jitter square values sampled\n"
"jitter2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of jitter samples\n"
"jitter_samples_total\n"
"0\n"
"0\n"
"Average jitter\n"
"jitter_average\n"
"0.000000\n"
"0.000000\n"
"jitter standard deviation\n"
"jitter_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time values sampled\n"
"rtt_e2e_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time square values sampled\n"
"rtt_e2e2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of end-to-end round-trip time samples\n"
"rtt_e2e_samples_total\n"
"0\n"
"0\n"
"Average end-to-end round-trip time\n"
"rtt_e2e_average\n"
"0.000000\n"
"0.000000\n"
"end-to-end round-trip time standard deviation\n"
"rtt_e2e_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time values sampled\n"
"rtt_dsct_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time square values sampled\n"
"rtt_dsct2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of discrete round-trip time samples\n"
"rtt_dsct_samples_total\n"
"0\n"
"0\n"
"Average discrete round-trip time\n"
"rtt_dsct_average\n"
"0.000000\n"
"0.000000\n"
"discrete round-trip time standard deviation\n"
"rtt_dsct_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss values sampled\n"
"packetloss_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss square values sampled\n"
"packetloss2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of packet loss samples\n"
"packetloss_samples_total\n"
"0\n"
"0\n"
"Average packet loss\n"
"packetloss_average\n"
"0.000000\n"
"0.000000\n"
"packet loss standard deviation\n"
"packetloss_stddev\n"
"0.000000\n"
"0.000000\n"
"\n"
"\n"
"}\n"
"Control statistics:\n"
"controlstatistics\n"
"\n"
@ -4516,6 +4864,93 @@ int main(void) {
"\n"
"\n"
"}\n"
"VoIP metrics:\n"
"voip_metrics\n"
"\n"
"{\n"
"Sum of all jitter values sampled\n"
"jitter_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all jitter square values sampled\n"
"jitter2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of jitter samples\n"
"jitter_samples_total\n"
"0\n"
"0\n"
"Average jitter\n"
"jitter_average\n"
"0.000000\n"
"0.000000\n"
"jitter standard deviation\n"
"jitter_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time values sampled\n"
"rtt_e2e_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time square values sampled\n"
"rtt_e2e2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of end-to-end round-trip time samples\n"
"rtt_e2e_samples_total\n"
"0\n"
"0\n"
"Average end-to-end round-trip time\n"
"rtt_e2e_average\n"
"0.000000\n"
"0.000000\n"
"end-to-end round-trip time standard deviation\n"
"rtt_e2e_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time values sampled\n"
"rtt_dsct_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time square values sampled\n"
"rtt_dsct2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of discrete round-trip time samples\n"
"rtt_dsct_samples_total\n"
"0\n"
"0\n"
"Average discrete round-trip time\n"
"rtt_dsct_average\n"
"0.000000\n"
"0.000000\n"
"discrete round-trip time standard deviation\n"
"rtt_dsct_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss values sampled\n"
"packetloss_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss square values sampled\n"
"packetloss2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of packet loss samples\n"
"packetloss_samples_total\n"
"0\n"
"0\n"
"Average packet loss\n"
"packetloss_average\n"
"0.000000\n"
"0.000000\n"
"packet loss standard deviation\n"
"packetloss_stddev\n"
"0.000000\n"
"0.000000\n"
"\n"
"\n"
"}\n"
"Control statistics:\n"
"controlstatistics\n"
"\n"
@ -5417,6 +5852,93 @@ int main(void) {
"\n"
"\n"
"}\n"
"VoIP metrics:\n"
"voip_metrics\n"
"\n"
"{\n"
"Sum of all jitter values sampled\n"
"jitter_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all jitter square values sampled\n"
"jitter2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of jitter samples\n"
"jitter_samples_total\n"
"0\n"
"0\n"
"Average jitter\n"
"jitter_average\n"
"0.000000\n"
"0.000000\n"
"jitter standard deviation\n"
"jitter_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time values sampled\n"
"rtt_e2e_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time square values sampled\n"
"rtt_e2e2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of end-to-end round-trip time samples\n"
"rtt_e2e_samples_total\n"
"0\n"
"0\n"
"Average end-to-end round-trip time\n"
"rtt_e2e_average\n"
"0.000000\n"
"0.000000\n"
"end-to-end round-trip time standard deviation\n"
"rtt_e2e_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time values sampled\n"
"rtt_dsct_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time square values sampled\n"
"rtt_dsct2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of discrete round-trip time samples\n"
"rtt_dsct_samples_total\n"
"0\n"
"0\n"
"Average discrete round-trip time\n"
"rtt_dsct_average\n"
"0.000000\n"
"0.000000\n"
"discrete round-trip time standard deviation\n"
"rtt_dsct_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss values sampled\n"
"packetloss_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss square values sampled\n"
"packetloss2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of packet loss samples\n"
"packetloss_samples_total\n"
"0\n"
"0\n"
"Average packet loss\n"
"packetloss_average\n"
"0.000000\n"
"0.000000\n"
"packet loss standard deviation\n"
"packetloss_stddev\n"
"0.000000\n"
"0.000000\n"
"\n"
"\n"
"}\n"
"Control statistics:\n"
"controlstatistics\n"
"\n"
@ -6320,6 +6842,93 @@ int main(void) {
"\n"
"\n"
"}\n"
"VoIP metrics:\n"
"voip_metrics\n"
"\n"
"{\n"
"Sum of all jitter values sampled\n"
"jitter_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all jitter square values sampled\n"
"jitter2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of jitter samples\n"
"jitter_samples_total\n"
"0\n"
"0\n"
"Average jitter\n"
"jitter_average\n"
"0.000000\n"
"0.000000\n"
"jitter standard deviation\n"
"jitter_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time values sampled\n"
"rtt_e2e_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all end-to-end round-trip time square values sampled\n"
"rtt_e2e2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of end-to-end round-trip time samples\n"
"rtt_e2e_samples_total\n"
"0\n"
"0\n"
"Average end-to-end round-trip time\n"
"rtt_e2e_average\n"
"0.000000\n"
"0.000000\n"
"end-to-end round-trip time standard deviation\n"
"rtt_e2e_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time values sampled\n"
"rtt_dsct_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all discrete round-trip time square values sampled\n"
"rtt_dsct2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of discrete round-trip time samples\n"
"rtt_dsct_samples_total\n"
"0\n"
"0\n"
"Average discrete round-trip time\n"
"rtt_dsct_average\n"
"0.000000\n"
"0.000000\n"
"discrete round-trip time standard deviation\n"
"rtt_dsct_stddev\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss values sampled\n"
"packetloss_total\n"
"0.000000\n"
"0.000000\n"
"Sum of all packet loss square values sampled\n"
"packetloss2_total\n"
"0.000000\n"
"0.000000\n"
"Total number of packet loss samples\n"
"packetloss_samples_total\n"
"0\n"
"0\n"
"Average packet loss\n"
"packetloss_average\n"
"0.000000\n"
"0.000000\n"
"packet loss standard deviation\n"
"packetloss_stddev\n"
"0.000000\n"
"0.000000\n"
"\n"
"\n"
"}\n"
"Control statistics:\n"
"controlstatistics\n"
"\n"


Loading…
Cancel
Save