Browse Source

Merge branch 'master' of https://github.com/smititelu/rtpengine

Change-Id: Ib3d067385d9ea0efe259aaeec97bfd4f8f7075f1
pull/1421/head
Richard Fuchs 4 years ago
parent
commit
5fba6c7172
2 changed files with 16 additions and 16 deletions
  1. +2
    -2
      daemon/statistics.c
  2. +14
    -14
      t/test-stats.c

+ 2
- 2
daemon/statistics.c View File

@ -461,7 +461,7 @@ GQueue *statistics_gather_metrics(void) {
PROM("zero_packet_streams_total", "counter"); PROM("zero_packet_streams_total", "counter");
METRIC("onewaystreams", "Total number of 1-way streams", UINT64F, UINT64F,atomic64_get(&rtpe_stats_cumulative.oneway_stream_sess)); METRIC("onewaystreams", "Total number of 1-way streams", UINT64F, UINT64F,atomic64_get(&rtpe_stats_cumulative.oneway_stream_sess));
PROM("one_way_sessions_total", "counter"); PROM("one_way_sessions_total", "counter");
METRICva("avgcallduration", "Average call duration", "%" TIME_T_INT_FMT ".%06" TIME_T_INT_FMT, "%" TIME_T_INT_FMT ".%06" TIME_T_INT_FMT, avg.tv_sec, avg.tv_usec);
METRICva("avgcallduration", "Average call duration", "%" TIME_T_INT_FMT ".%06" TIME_T_INT_FMT, "%" TIME_T_INT_FMT ".%06" TIME_T_INT_FMT " seconds", avg.tv_sec, avg.tv_usec);
calls_dur_iv = (double) atomic64_get_na(&rtpe_stats_graphite_interval.total_calls_duration) / 1000000.0; calls_dur_iv = (double) atomic64_get_na(&rtpe_stats_graphite_interval.total_calls_duration) / 1000000.0;
min_sess_iv = atomic64_get(&rtpe_stats_gauge_graphite_min_max_interval.min.total_sessions); min_sess_iv = atomic64_get(&rtpe_stats_gauge_graphite_min_max_interval.min.total_sessions);
@ -472,7 +472,7 @@ GQueue *statistics_gather_metrics(void) {
HEADER("intervalstatistics", "Graphite interval statistics (last reported values to graphite):"); HEADER("intervalstatistics", "Graphite interval statistics (last reported values to graphite):");
HEADER("{", NULL); HEADER("{", NULL);
METRICva("totalcallsduration", "Total calls duration", "%.6f", "%.6f", calls_dur_iv);
METRICva("totalcallsduration", "Total calls duration", "%.6f", "%.6f seconds", calls_dur_iv);
HEADER(NULL, ""); HEADER(NULL, "");
METRIC("minmanagedsessions", "Min managed sessions", UINT64F, UINT64F, min_sess_iv); METRIC("minmanagedsessions", "Min managed sessions", UINT64F, UINT64F, min_sess_iv);


+ 14
- 14
t/test-stats.c View File

@ -428,7 +428,7 @@ int main(void) {
"0\n" "0\n"
"Average call duration\n" "Average call duration\n"
"avgcallduration\n" "avgcallduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"\n" "\n"
@ -438,7 +438,7 @@ int main(void) {
"{\n" "{\n"
"Total calls duration\n" "Total calls duration\n"
"totalcallsduration\n" "totalcallsduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"Min managed sessions\n" "Min managed sessions\n"
@ -1266,7 +1266,7 @@ int main(void) {
"0\n" "0\n"
"Average call duration\n" "Average call duration\n"
"avgcallduration\n" "avgcallduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"\n" "\n"
@ -1276,7 +1276,7 @@ int main(void) {
"{\n" "{\n"
"Total calls duration\n" "Total calls duration\n"
"totalcallsduration\n" "totalcallsduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"Min managed sessions\n" "Min managed sessions\n"
@ -2101,7 +2101,7 @@ int main(void) {
"0\n" "0\n"
"Average call duration\n" "Average call duration\n"
"avgcallduration\n" "avgcallduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"\n" "\n"
@ -2111,7 +2111,7 @@ int main(void) {
"{\n" "{\n"
"Total calls duration\n" "Total calls duration\n"
"totalcallsduration\n" "totalcallsduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"Min managed sessions\n" "Min managed sessions\n"
@ -2949,7 +2949,7 @@ int main(void) {
"0\n" "0\n"
"Average call duration\n" "Average call duration\n"
"avgcallduration\n" "avgcallduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"\n" "\n"
@ -2959,7 +2959,7 @@ int main(void) {
"{\n" "{\n"
"Total calls duration\n" "Total calls duration\n"
"totalcallsduration\n" "totalcallsduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"Min managed sessions\n" "Min managed sessions\n"
@ -3792,7 +3792,7 @@ int main(void) {
"0\n" "0\n"
"Average call duration\n" "Average call duration\n"
"avgcallduration\n" "avgcallduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"\n" "\n"
@ -3802,7 +3802,7 @@ int main(void) {
"{\n" "{\n"
"Total calls duration\n" "Total calls duration\n"
"totalcallsduration\n" "totalcallsduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"Min managed sessions\n" "Min managed sessions\n"
@ -4630,7 +4630,7 @@ int main(void) {
"0\n" "0\n"
"Average call duration\n" "Average call duration\n"
"avgcallduration\n" "avgcallduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"\n" "\n"
@ -4640,7 +4640,7 @@ int main(void) {
"{\n" "{\n"
"Total calls duration\n" "Total calls duration\n"
"totalcallsduration\n" "totalcallsduration\n"
"186.000000\n"
"186.000000 seconds\n"
"186.000000\n" "186.000000\n"
"\n" "\n"
"Min managed sessions\n" "Min managed sessions\n"
@ -5470,7 +5470,7 @@ int main(void) {
"0\n" "0\n"
"Average call duration\n" "Average call duration\n"
"avgcallduration\n" "avgcallduration\n"
"93.000000\n"
"93.000000 seconds\n"
"93.000000\n" "93.000000\n"
"\n" "\n"
"\n" "\n"
@ -5480,7 +5480,7 @@ int main(void) {
"{\n" "{\n"
"Total calls duration\n" "Total calls duration\n"
"totalcallsduration\n" "totalcallsduration\n"
"0.000000\n"
"0.000000 seconds\n"
"0.000000\n" "0.000000\n"
"\n" "\n"
"Min managed sessions\n" "Min managed sessions\n"


Loading…
Cancel
Save