Example #1
0
static void
_foreach_counter_helper(StatsCluster *sc, gpointer user_data)
{
  gpointer *args = (gpointer *) user_data;
  StatsForeachCounterFunc func = args[0];
  gpointer func_data = args[1];
  
  stats_cluster_foreach_counter(sc, func, func_data);
}
Example #2
0
static void
assert_stats_foreach_yielded_counters_matches(StatsCluster *sc, ...)
{
  ValidateCountersState st;
  va_list va;
  gint type_count = 0;
  gint t;

  va_start(va, sc);
  st.validate_count = 0;
  va_copy(st.types, va);

  t = va_arg(va, gint);
  while (t >= 0)
    {
      type_count++;
      t = va_arg(va, gint);
    }
  
  stats_cluster_foreach_counter(sc, _validate_yielded_counters, &st);
  va_end(va);
  
  assert_gint(type_count, st.validate_count, "the number of validated counters mismatch the expected size");
}
Example #3
0
void
stats_log_format_cluster(StatsCluster *sc, EVTREC *e)
{
  stats_cluster_foreach_counter(sc, stats_log_format_counter, e);
}
Example #4
0
static void
_update_indexes_of_cluster_if_needed(StatsCluster *sc, gpointer user_data)
{
  stats_cluster_foreach_counter(sc, _index_counter, NULL);
}