Browse Source

TT#101150 obsolete total_relayed_* fields

Change-Id: I2340daba8f8088af81b3ed6b5dfc6f5fb8621a9a
pull/1373/head
Richard Fuchs 4 years ago
parent
commit
3608d9b070
4 changed files with 5 additions and 28 deletions
  1. +0
    -2
      daemon/call.c
  2. +2
    -4
      daemon/graphite.c
  3. +3
    -18
      daemon/statistics.c
  4. +0
    -4
      include/statistics.h

+ 0
- 2
daemon/call.c View File

@ -3217,8 +3217,6 @@ void call_destroy(struct call *c) {
atomic64_get(&ps->stats.bytes), atomic64_get(&ps->stats.bytes),
atomic64_get(&ps->stats.errors), atomic64_get(&ps->stats.errors),
rtpe_now.tv_sec - atomic64_get(&ps->last_packet)); rtpe_now.tv_sec - atomic64_get(&ps->last_packet));
statistics_update_totals(ps);
} }
} }


+ 2
- 4
daemon/graphite.c View File

@ -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_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_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_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_nopacket_relayed_sess);
atomic64_local_copy_zero_struct(ts, &rtpe_totalstats_interval, total_oneway_stream_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("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("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("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("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("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)); GPF("offer_timeout_sess "UINT64F, atomic64_get_na(&ts->total_offer_timeout_sess));


+ 3
- 18
daemon/statistics.c View File

@ -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 // op can be CMC_INCREMENT or CMC_DECREMENT
// check not to multiple decrement or increment // check not to multiple decrement or increment
void statistics_update_ip46_inc_dec(struct call* c, int op) { 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"); PROM("closed_sessions_total", "counter");
PROMLAB("reason=\"force_terminated\""); 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"); 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"); 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"); PROM("bytes_total", "counter");
METRIC("zerowaystreams", "Total number of streams with no relayed packets", UINT64F, UINT64F, atomic64_get(&rtpe_totalstats.total_nopacket_relayed_sess)); METRIC("zerowaystreams", "Total number of streams with no relayed packets", UINT64F, UINT64F, atomic64_get(&rtpe_totalstats.total_nopacket_relayed_sess));


+ 0
- 4
include/statistics.h View File

@ -66,9 +66,6 @@ struct totalstats {
atomic64 total_final_timeout_sess; atomic64 total_final_timeout_sess;
atomic64 total_regular_term_sess; atomic64 total_regular_term_sess;
atomic64 total_forced_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_nopacket_relayed_sess;
atomic64 total_oneway_stream_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_ip46_inc_dec(struct call *, int op);
void statistics_update_foreignown_dec(struct call *); void statistics_update_foreignown_dec(struct call *);
void statistics_update_foreignown_inc(struct call* c); void statistics_update_foreignown_inc(struct call* c);
void statistics_update_totals(struct packet_stream *) ;
GQueue *statistics_gather_metrics(void); GQueue *statistics_gather_metrics(void);
void statistics_free_metrics(GQueue **); void statistics_free_metrics(GQueue **);


Loading…
Cancel
Save