Browse Source

MT#57335 Update the test-stats due to changes in the `call_timer()`

We have to call the `stats_rate_min_max()` now explicitely from
the test-stats.c, because the `call_timer()` is not anymore
responsible for providing call rate stats.

Change-Id: Id896ac086660a94b8d1d6fe520b1aa68791cd351
pull/1646/head
Donat Zenichev 3 years ago
parent
commit
2a4f2dbf33
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      t/test-stats.c

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

@ -3231,18 +3231,21 @@ int main(void) {
// test cmd_ps_min/max/avg // test cmd_ps_min/max/avg
call_timer(NULL); call_timer(NULL);
stats_rate_min_max(&rtpe_rate_graphite_min_max, &rtpe_stats_rate);
RTPE_STATS_ADD(ng_commands[NGC_OFFER], 100); RTPE_STATS_ADD(ng_commands[NGC_OFFER], 100);
rtpe_now.tv_sec += 2; rtpe_now.tv_sec += 2;
RTPE_STATS_ADD(ng_commands[NGC_OFFER], 20); RTPE_STATS_ADD(ng_commands[NGC_OFFER], 20);
call_timer(NULL); call_timer(NULL);
stats_rate_min_max(&rtpe_rate_graphite_min_max, &rtpe_stats_rate);
// timer run time interval increased // timer run time interval increased
rtpe_now.tv_sec += 5; rtpe_now.tv_sec += 5;
RTPE_STATS_ADD(ng_commands[NGC_OFFER], 200); RTPE_STATS_ADD(ng_commands[NGC_OFFER], 200);
call_timer(NULL); call_timer(NULL);
stats_rate_min_max(&rtpe_rate_graphite_min_max, &rtpe_stats_rate);
graph_str = print_graphite_data(); graph_str = print_graphite_data();
assert_g_string_eq(graph_str, assert_g_string_eq(graph_str,


Loading…
Cancel
Save