diff --git a/daemon/call.c b/daemon/call.c index cfda650c9..fa1899626 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -3217,8 +3217,6 @@ void call_destroy(struct call *c) { atomic64_get(&ps->stats.bytes), atomic64_get(&ps->stats.errors), rtpe_now.tv_sec - atomic64_get(&ps->last_packet)); - - statistics_update_totals(ps); } } diff --git a/daemon/graphite.c b/daemon/graphite.c index 65e749270..d1629da81 100644 --- a/daemon/graphite.c +++ b/daemon/graphite.c @@ -116,8 +116,6 @@ GString *print_graphite_data(struct totalstats *sent_data) { atomic64_local_copy_zero_struct(ts, &rtpe_totalstats_interval, total_offer_timeout_sess); atomic64_local_copy_zero_struct(ts, &rtpe_totalstats_interval, total_regular_term_sess); atomic64_local_copy_zero_struct(ts, &rtpe_totalstats_interval, total_forced_term_sess); - atomic64_local_copy_zero_struct(ts, &rtpe_totalstats_interval, total_relayed_packets); - atomic64_local_copy_zero_struct(ts, &rtpe_totalstats_interval, total_relayed_errors); atomic64_local_copy_zero_struct(ts, &rtpe_totalstats_interval, total_nopacket_relayed_sess); atomic64_local_copy_zero_struct(ts, &rtpe_totalstats_interval, total_oneway_stream_sess); @@ -199,8 +197,8 @@ GString *print_graphite_data(struct totalstats *sent_data) { GPF("nopacket_relayed_sess "UINT64F, atomic64_get_na(&ts->total_nopacket_relayed_sess)); GPF("oneway_stream_sess "UINT64F, atomic64_get_na(&ts->total_oneway_stream_sess)); GPF("regular_term_sess "UINT64F, atomic64_get_na(&ts->total_regular_term_sess)); - GPF("relayed_errors "UINT64F, atomic64_get_na(&ts->total_relayed_errors)); - GPF("relayed_packets "UINT64F, atomic64_get_na(&ts->total_relayed_packets)); + GPF("relayed_errors "UINT64F, atomic64_get_na(&rtpe_stats_graphite_interval.errors)); + GPF("relayed_packets "UINT64F, atomic64_get_na(&rtpe_stats_graphite_interval.packets)); GPF("silent_timeout_sess "UINT64F, atomic64_get_na(&ts->total_silent_timeout_sess)); GPF("final_timeout_sess "UINT64F, atomic64_get_na(&ts->total_final_timeout_sess)); GPF("offer_timeout_sess "UINT64F, atomic64_get_na(&ts->total_offer_timeout_sess)); diff --git a/daemon/statistics.c b/daemon/statistics.c index e84cb286e..904107a77 100644 --- a/daemon/statistics.c +++ b/daemon/statistics.c @@ -82,21 +82,6 @@ static void timeval_totalstats_call_duration_add(struct totalstats *s, } -void statistics_update_totals(struct packet_stream *ps) { - atomic64_add(&rtpe_totalstats.total_relayed_packets, - atomic64_get(&ps->stats.packets)); - atomic64_add(&rtpe_totalstats_interval.total_relayed_packets, - atomic64_get(&ps->stats.packets)); - atomic64_add(&rtpe_totalstats.total_relayed_errors, - atomic64_get(&ps->stats.errors)); - atomic64_add(&rtpe_totalstats_interval.total_relayed_errors, - atomic64_get(&ps->stats.errors)); - atomic64_add(&rtpe_totalstats.total_relayed_bytes, - atomic64_get(&ps->stats.bytes)); - atomic64_add(&rtpe_totalstats_interval.total_relayed_bytes, - atomic64_get(&ps->stats.bytes)); -} - // op can be CMC_INCREMENT or CMC_DECREMENT // check not to multiple decrement or increment void statistics_update_ip46_inc_dec(struct call* c, int op) { @@ -515,11 +500,11 @@ GQueue *statistics_gather_metrics(void) { PROM("closed_sessions_total", "counter"); PROMLAB("reason=\"force_terminated\""); - METRIC("relayedpackets", "Total relayed packets", UINT64F, UINT64F, atomic64_get(&rtpe_totalstats.total_relayed_packets)); + METRIC("relayedpackets", "Total relayed packets", UINT64F, UINT64F, atomic64_get(&rtpe_stats_cumulative.packets)); PROM("packets_total", "counter"); - METRIC("relayedpacketerrors", "Total relayed packet errors", UINT64F, UINT64F, atomic64_get(&rtpe_totalstats.total_relayed_errors)); + METRIC("relayedpacketerrors", "Total relayed packet errors", UINT64F, UINT64F, atomic64_get(&rtpe_stats_cumulative.errors)); PROM("packet_errors_total", "counter"); - METRIC("relayedbytes", "Total relayed bytes", UINT64F, UINT64F, atomic64_get(&rtpe_totalstats.total_relayed_bytes)); + METRIC("relayedbytes", "Total relayed bytes", UINT64F, UINT64F, atomic64_get(&rtpe_stats_cumulative.bytes)); PROM("bytes_total", "counter"); METRIC("zerowaystreams", "Total number of streams with no relayed packets", UINT64F, UINT64F, atomic64_get(&rtpe_totalstats.total_nopacket_relayed_sess)); diff --git a/include/statistics.h b/include/statistics.h index 93f0bbc3d..8d9a12df4 100644 --- a/include/statistics.h +++ b/include/statistics.h @@ -66,9 +66,6 @@ struct totalstats { atomic64 total_final_timeout_sess; atomic64 total_regular_term_sess; atomic64 total_forced_term_sess; - atomic64 total_relayed_packets; - atomic64 total_relayed_errors; - atomic64 total_relayed_bytes; atomic64 total_nopacket_relayed_sess; atomic64 total_oneway_stream_sess; @@ -145,7 +142,6 @@ void statistics_update_oneway(struct call *); void statistics_update_ip46_inc_dec(struct call *, int op); void statistics_update_foreignown_dec(struct call *); void statistics_update_foreignown_inc(struct call* c); -void statistics_update_totals(struct packet_stream *) ; GQueue *statistics_gather_metrics(void); void statistics_free_metrics(GQueue **);