GNUnet  0.11.x
Data Structures | Functions | Variables
gnunet-statistics.c File Reference

tool to obtain statistics More...

#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_statistics_service.h"
#include "statistics.h"
Include dependency graph for gnunet-statistics.c:

Go to the source code of this file.

Data Structures

struct  Node
 Representation of all (testbed) nodes. More...
 
struct  ValueSet
 Set of values for a combination of subsystem and name. More...
 

Functions

static struct ValueSetnew_value_set (const char *subsystem, const char *name, unsigned num_values, int is_persistent)
 Create a new ValueSet. More...
 
static int printer (void *cls, const struct GNUNET_HashCode *key, void *value)
 Print the (collected) values. More...
 
static int printer_watch (void *cls, const char *subsystem, const char *name, uint64_t value, int is_persistent)
 Callback function to process statistic values. More...
 
static void clean_node (void *cls)
 Clean all data structures related to given node. More...
 
static void print_finish (void *cls)
 Print and shutdown. More...
 
static void continuation_print (void *cls, int success)
 Called once all statistic values are available. More...
 
static void cleanup (void *cls, int success)
 Function called last by the statistics code. More...
 
static int collector (void *cls, const char *subsystem, const char *name, uint64_t value, int is_persistent)
 Iterate over statistics values and store them in values. More...
 
static void main_task (void *cls)
 Main task that does the actual work. More...
 
static int iter_check_config (void *cls, const char *filename)
 Iter over content of a node's directory to check for existence of a config file. More...
 
static int iter_testbed_path (void *cls, const char *filename)
 Iterates over filenames in testbed directory. More...
 
static int discover_testbed_nodes (const char *path_testbed)
 Count the number of nodes running in the testbed. More...
 
static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
 Main function that will be run by the scheduler. More...
 
int main (int argc, char *const *argv)
 The main function to obtain statistics in GNUnet. More...
 

Variables

static int ret
 Final status code. More...
 
static char * subsystem
 Set to subsystem that we're going to get stats for (or NULL for all). More...
 
static char * path_testbed
 The path of the testbed data. More...
 
static char * name
 Set to the specific stat value that we are after (or NULL for all). More...
 
static int persistent
 Make the value that is being set persistent. More...
 
static int watch
 Watch value continuously. More...
 
static int quiet
 Quiet mode. More...
 
static char * csv_separator
 Separator string for csv. More...
 
static char * remote_host
 Remote host. More...
 
static unsigned long long remote_port
 Remote host's port. More...
 
static unsigned long long set_val
 Value to set. More...
 
static int set_value
 Set operation. More...
 
static struct Nodenodes
 
static unsigned num_nodes
 Number of configurations of all (testbed) nodes. More...
 
static struct GNUNET_CONTAINER_MultiHashMapvalues
 Collection of all values (represented with ValueSet). More...
 
static int num_nodes_ready
 Number of nodes that have their values ready. More...
 
static int num_nodes_ready_shutdown
 Number of nodes that have their values ready. More...
 

Detailed Description

tool to obtain statistics

Author
Christian Grothoff
Igor Wronsky

Definition in file gnunet-statistics.c.

Function Documentation

◆ new_value_set()

static struct ValueSet* new_value_set ( const char *  subsystem,
const char *  name,
unsigned  num_values,
int  is_persistent 
)
static

Create a new ValueSet.

Parameters
subsystemSubsystem of the valueset.
nameName of the valueset.
num_valuesNumber of values in valueset - number of peers.
is_persistentPersistence status of values.
Returns
Newly allocated ValueSet.

Definition at line 180 of file gnunet-statistics.c.

References GNUNET_new, GNUNET_new_array, GNUNET_strdup, ValueSet::is_persistent, ValueSet::name, persistent, ValueSet::subsystem, and ValueSet::values.

Referenced by collector().

184 {
185  struct ValueSet *value_set;
186 
187  value_set = GNUNET_new (struct ValueSet);
188  value_set->subsystem = GNUNET_strdup (subsystem);
189  value_set->name = GNUNET_strdup (name);
190  value_set->values = GNUNET_new_array (num_values, uint64_t);
191  value_set->is_persistent = persistent;
192  return value_set;
193 }
char * subsystem
Subsystem of the valueset.
static char * subsystem
Set to subsystem that we're going to get stats for (or NULL for all).
Set of values for a combination of subsystem and name.
int is_persistent
Persistence of the values.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
static unsigned int num_values
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
uint64_t * values
The values.
static char * name
Set to the specific stat value that we are after (or NULL for all).
#define GNUNET_new_array(n, type)
Allocate a size n array with structs or unions of the given type.
static int persistent
Make the value that is being set persistent.
char * name
Name of the valueset.
Here is the caller graph for this function:

◆ printer()

static int printer ( void *  cls,
const struct GNUNET_HashCode key,
void *  value 
)
static

Print the (collected) values.

Implements #GNUNET_CONTAINER_HashMapIterator.

Parameters
clsClosure - unused
keyGNUNET_HashCode key of GNUNET_CONTAINER_MultiHashMap iterator - unused
valueValues represented as ValueSet.
Returns
GNUNET_YES - continue iteration.

Definition at line 209 of file gnunet-statistics.c.

References _, csv_separator, GNUNET_free, GNUNET_NO, GNUNET_STRINGS_absolute_time_to_string(), GNUNET_TIME_absolute_get(), GNUNET_YES, ValueSet::is_persistent, ValueSet::name, num_nodes, quiet, ValueSet::subsystem, value, ValueSet::values, and watch.

Referenced by print_finish().

210 {
212  const char *now_str;
213  struct ValueSet *value_set = value;
214 
215  if (quiet == GNUNET_NO)
216  {
217  if (GNUNET_YES == watch)
218  {
220  fprintf (stdout,
221  "%24s%s %s%s%12s%s %s%50s%s%s ",
222  now_str,
224  value_set->is_persistent ? "!" : " ",
226  value_set->subsystem,
228  (0 == strlen (csv_separator) ? "" : "\""), /* quotes if csv */
229  _ (value_set->name),
230  (0 == strlen (csv_separator) ? "" : "\""), /* quotes if csv */
231  (0 == strlen (csv_separator) ? ":" : csv_separator));
232  }
233  else
234  {
235  fprintf (stdout,
236  "%s%s%12s%s %s%50s%s%s ",
237  value_set->is_persistent ? "!" : " ",
239  value_set->subsystem,
241  (0 == strlen (csv_separator) ? "" : "\""), /* quotes if csv */
242  _ (value_set->name),
243  (0 == strlen (csv_separator) ? "" : "\""), /* quotes if csv */
244  (0 == strlen (csv_separator) ? ":" : csv_separator));
245  }
246  }
247  for (unsigned i = 0; i < num_nodes; i++)
248  {
249  fprintf (stdout,
250  "%16llu%s",
251  (unsigned long long) value_set->values[i],
252  csv_separator);
253  }
254  fprintf (stdout, "\n");
255  GNUNET_free (value_set->subsystem);
256  GNUNET_free (value_set->name);
257  GNUNET_free (value_set->values);
258  GNUNET_free (value_set);
259  return GNUNET_YES;
260 }
char * subsystem
Subsystem of the valueset.
Set of values for a combination of subsystem and name.
static char * csv_separator
Separator string for csv.
int is_persistent
Persistence of the values.
#define GNUNET_NO
Definition: gnunet_common.h:78
uint64_t * values
The values.
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
static char * value
Value of the record to add/remove.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
Definition: time.c:118
static unsigned num_nodes
Number of configurations of all (testbed) nodes.
static int watch
Watch value continuously.
Time for absolute times used by GNUnet, in microseconds.
#define GNUNET_YES
Definition: gnunet_common.h:77
static int quiet
Quiet mode.
const char * GNUNET_STRINGS_absolute_time_to_string(struct GNUNET_TIME_Absolute t)
Like asctime, except for GNUnet time.
Definition: strings.c:742
char * name
Name of the valueset.
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ printer_watch()

static int printer_watch ( void *  cls,
const char *  subsystem,
const char *  name,
uint64_t  value,
int  is_persistent 
)
static

Callback function to process statistic values.

Parameters
clsclosure
subsystemname of subsystem that created the statistic
namethe name of the datum
valuethe current value
is_persistentGNUNET_YES if the value is persistent, GNUNET_NO if not
Returns
GNUNET_OK to continue, GNUNET_SYSERR to abort iteration

Definition at line 274 of file gnunet-statistics.c.

References _, csv_separator, GNUNET_NO, GNUNET_OK, GNUNET_STRINGS_absolute_time_to_string(), GNUNET_TIME_absolute_get(), GNUNET_YES, quiet, and watch.

Referenced by clean_node(), and main_task().

279 {
281  const char *now_str;
282 
283  if (quiet == GNUNET_NO)
284  {
285  if (GNUNET_YES == watch)
286  {
288  fprintf (stdout,
289  "%24s%s %s%s%12s%s %s%50s%s%s %16llu\n",
290  now_str,
292  is_persistent ? "!" : " ",
294  subsystem,
296  (0 == strlen (csv_separator) ? "" : "\""), /* quotes if csv */
297  _ (name),
298  (0 == strlen (csv_separator) ? "" : "\""), /* quotes if csv */
299  (0 == strlen (csv_separator) ? ":" : csv_separator),
300  (unsigned long long) value);
301  }
302  else
303  {
304  fprintf (stdout,
305  "%s%s%12s%s %s%50s%s%s %16llu\n",
306  is_persistent ? "!" : " ",
308  subsystem,
310  (0 == strlen (csv_separator) ? "" : "\""), /* quotes if csv */
311  _ (name),
312  (0 == strlen (csv_separator) ? "" : "\""), /* quotes if csv */
313  (0 == strlen (csv_separator) ? ":" : csv_separator),
314  (unsigned long long) value);
315  }
316  }
317  else
318  fprintf (stdout, "%llu\n", (unsigned long long) value);
319 
320  return GNUNET_OK;
321 }
static char * subsystem
Set to subsystem that we&#39;re going to get stats for (or NULL for all).
static char * csv_separator
Separator string for csv.
#define GNUNET_NO
Definition: gnunet_common.h:78
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
static char * name
Set to the specific stat value that we are after (or NULL for all).
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
static char * value
Value of the record to add/remove.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
Definition: time.c:118
static int watch
Watch value continuously.
Time for absolute times used by GNUnet, in microseconds.
#define GNUNET_YES
Definition: gnunet_common.h:77
static int quiet
Quiet mode.
const char * GNUNET_STRINGS_absolute_time_to_string(struct GNUNET_TIME_Absolute t)
Like asctime, except for GNUnet time.
Definition: strings.c:742
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clean_node()

static void clean_node ( void *  cls)
static

Clean all data structures related to given node.

Also clears global structures if we are the last node to clean.

Parameters
clsthe index of the node

Definition at line 332 of file gnunet-statistics.c.

References Node::conf, Node::gh, GNUNET_array_grow, GNUNET_assert, GNUNET_CONFIGURATION_destroy(), GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_NO, GNUNET_OK, GNUNET_STATISTICS_destroy(), GNUNET_STATISTICS_get_cancel(), GNUNET_STATISTICS_watch_cancel(), GNUNET_YES, h, Node::handle, Node::index_node, name, nodes, num_nodes, num_nodes_ready_shutdown, path_testbed, printer_watch(), subsystem, and watch.

Referenced by continuation_print(), and main_task().

333 {
334  const unsigned index_node = *(unsigned *) cls;
335  struct GNUNET_STATISTICS_Handle *h;
337 
338  if ((NULL != path_testbed) && /* were issued with -t <testbed-path> option */
339  (NULL != nodes[index_node].conf))
340  {
341  GNUNET_CONFIGURATION_destroy (nodes[index_node].conf);
342  nodes[index_node].conf = NULL;
343  }
344 
345  h = nodes[index_node].handle;
346  gh = nodes[index_node].gh;
347 
348  if (NULL != gh)
349  {
351  gh = NULL;
352  }
353  if (GNUNET_YES == watch)
354  {
355  GNUNET_assert (
356  GNUNET_OK ==
358  subsystem,
359  name,
360  &printer_watch,
361  &nodes[index_node].index_node));
362  }
363 
364  if (NULL != h)
365  {
367  h = NULL;
368  }
369 
372  {
375  }
376 }
static char * subsystem
Set to subsystem that we&#39;re going to get stats for (or NULL for all).
static struct GNUNET_CONTAINER_MultiHashMap * values
Collection of all values (represented with ValueSet).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
void GNUNET_STATISTICS_get_cancel(struct GNUNET_STATISTICS_GetHandle *gh)
Cancel a GNUNET_STATISTICS_get request.
struct GNUNET_STATISTICS_GetHandle * gh
Handle for pending GET operation.
Linked list of things we still need to do.
#define GNUNET_NO
Definition: gnunet_common.h:78
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
static char * path_testbed
The path of the testbed data.
void GNUNET_STATISTICS_destroy(struct GNUNET_STATISTICS_Handle *h, int sync_first)
Destroy a handle (free all state associated with it).
Handle for the service.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:99
static char * name
Set to the specific stat value that we are after (or NULL for all).
static struct Node * nodes
#define GNUNET_array_grow(arr, size, tsize)
Grow a well-typed (!) array.
void GNUNET_CONTAINER_multihashmap_destroy(struct GNUNET_CONTAINER_MultiHashMap *map)
Destroy a hash map.
void GNUNET_CONFIGURATION_destroy(struct GNUNET_CONFIGURATION_Handle *cfg)
Destroy configuration object.
struct GNUNET_CONFIGURATION_Handle * conf
Configuration handle for this node.
static unsigned num_nodes
Number of configurations of all (testbed) nodes.
static int watch
Watch value continuously.
int GNUNET_STATISTICS_watch_cancel(struct GNUNET_STATISTICS_Handle *handle, const char *subsystem, const char *name, GNUNET_STATISTICS_Iterator proc, void *proc_cls)
Stop watching statistics from the peer.
static struct GNUNET_TRANSPORT_HelloGetHandle * gh
Pending GNUNET_TRANSPORT_hello_get() operation.
static int num_nodes_ready_shutdown
Number of nodes that have their values ready.
#define GNUNET_YES
Definition: gnunet_common.h:77
struct GNUNET_STATISTICS_Handle * handle
Statistics handle nodes.
static int printer_watch(void *cls, const char *subsystem, const char *name, uint64_t value, int is_persistent)
Callback function to process statistic values.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_finish()

static void print_finish ( void *  cls)
static

Print and shutdown.

Parameters
clsunused

Definition at line 385 of file gnunet-statistics.c.

References GNUNET_CONTAINER_multihashmap_iterate(), GNUNET_SCHEDULER_shutdown(), and printer().

Referenced by continuation_print().

386 {
389 }
static struct GNUNET_CONTAINER_MultiHashMap * values
Collection of all values (represented with ValueSet).
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:526
static int printer(void *cls, const struct GNUNET_HashCode *key, void *value)
Print the (collected) values.
int GNUNET_CONTAINER_multihashmap_iterate(struct GNUNET_CONTAINER_MultiHashMap *map, GNUNET_CONTAINER_MulitHashMapIteratorCallback it, void *it_cls)
Iterate over all entries in the map.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ continuation_print()

static void continuation_print ( void *  cls,
int  success 
)
static

Called once all statistic values are available.

Implements GNUNET_STATISTICS_Callback

Parameters
clsClosure - The index of the node.
succesWhether statistics were obtained successfully.

Definition at line 401 of file gnunet-statistics.c.

References _, clean_node(), Node::gh, GNUNET_OK, GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_cancel(), Node::index_node, nodes, num_nodes, num_nodes_ready, print_finish(), remote_host, remote_port, ret, and Node::shutdown_task.

Referenced by main_task().

402 {
403  const unsigned index_node = *(unsigned *) cls;
404 
405  nodes[index_node].gh = NULL;
406  if (GNUNET_OK != success)
407  {
408  if (NULL == remote_host)
409  fprintf (stderr, "%s", _ ("Failed to obtain statistics.\n"));
410  else
411  fprintf (stderr,
412  _ ("Failed to obtain statistics from host `%s:%llu'\n"),
413  remote_host,
414  remote_port);
415  ret = 1;
416  }
417  if (NULL != nodes[index_node].shutdown_task)
418  {
419  GNUNET_SCHEDULER_cancel (nodes[index_node].shutdown_task);
420  nodes[index_node].shutdown_task = NULL;
421  }
422  GNUNET_SCHEDULER_add_now (clean_node, &nodes[index_node].index_node);
423  num_nodes_ready++;
424  if (num_nodes_ready == num_nodes)
425  {
427  }
428 }
static char * remote_host
Remote host.
static unsigned long long remote_port
Remote host&#39;s port.
struct GNUNET_STATISTICS_GetHandle * gh
Handle for pending GET operation.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
static void print_finish(void *cls)
Print and shutdown.
static int ret
Final status code.
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
static struct Node * nodes
static struct GNUNET_SCHEDULER_Task * shutdown_task
Shutdown task.
Definition: gnunet-ats.c:141
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1280
static unsigned num_nodes
Number of configurations of all (testbed) nodes.
struct GNUNET_SCHEDULER_Task * shutdown_task
Identifier for shutdown task for this node.
void * cls
Closure for proc and cont.
static int num_nodes_ready
Number of nodes that have their values ready.
static void clean_node(void *cls)
Clean all data structures related to given node.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:966
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanup()

static void cleanup ( void *  cls,
int  success 
)
static

Function called last by the statistics code.

Parameters
clsclosure
successGNUNET_OK if statistics were successfully obtained, GNUNET_SYSERR if not.

Definition at line 439 of file gnunet-statistics.c.

References _, Node::gh, GNUNET_OK, GNUNET_SCHEDULER_shutdown(), nodes, num_nodes, remote_host, remote_port, and ret.

Referenced by main_task().

440 {
441  for (unsigned i = 0; i < num_nodes; i++)
442  {
443  nodes[i].gh = NULL;
444  }
445  if (GNUNET_OK != success)
446  {
447  if (NULL == remote_host)
448  fprintf (stderr, "%s", _ ("Failed to obtain statistics.\n"));
449  else
450  fprintf (stderr,
451  _ ("Failed to obtain statistics from host `%s:%llu'\n"),
452  remote_host,
453  remote_port);
454  ret = 1;
455  }
457 }
static char * remote_host
Remote host.
static unsigned long long remote_port
Remote host&#39;s port.
struct GNUNET_STATISTICS_GetHandle * gh
Handle for pending GET operation.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:526
static int ret
Final status code.
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
static struct Node * nodes
static unsigned num_nodes
Number of configurations of all (testbed) nodes.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ collector()

static int collector ( void *  cls,
const char *  subsystem,
const char *  name,
uint64_t  value,
int  is_persistent 
)
static

Iterate over statistics values and store them in values.

They will be printed once all are available.

Parameters
clsCosure - Node index.
subsystemSubsystem of the value.
nameName of the value.
valueValue itself.
is_persistentPersistence.
Returns
GNUNET_OK - continue.

Definition at line 473 of file gnunet-statistics.c.

References GNUNET_assert, GNUNET_CONTAINER_multihashmap_contains(), GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_CRYPTO_hash(), GNUNET_free, GNUNET_malloc, GNUNET_OK, GNUNET_YES, Node::index_node, key, new_value_set(), num_nodes, value, and ValueSet::values.

Referenced by main_task().

478 {
479  const unsigned index_node = *(unsigned *) cls;
480  struct GNUNET_HashCode *key;
481  struct GNUNET_HashCode hc;
482  char *subsys_name;
483  unsigned len_subsys_name;
484  struct ValueSet *value_set;
485 
486  len_subsys_name = strlen (subsystem) + 3 + strlen (name) + 1;
487  subsys_name = GNUNET_malloc (len_subsys_name);
488  sprintf (subsys_name, "%s---%s", subsystem, name);
489  key = &hc;
490  GNUNET_CRYPTO_hash (subsys_name, len_subsys_name, key);
491  GNUNET_free (subsys_name);
493  {
494  value_set = GNUNET_CONTAINER_multihashmap_get (values, key);
495  }
496  else
497  {
499  }
500  value_set->values[index_node] = value;
503  values,
504  key,
505  value_set,
507  return GNUNET_OK;
508 }
static char * subsystem
Set to subsystem that we&#39;re going to get stats for (or NULL for all).
Set of values for a combination of subsystem and name.
static struct GNUNET_CONTAINER_MultiHashMap * values
Collection of all values (represented with ValueSet).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
int is_persistent
Persistence of the values.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
int GNUNET_CONTAINER_multihashmap_contains(const struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Check if the map contains any value under the given key (including values that are NULL)...
uint64_t * values
The values.
static char * name
Set to the specific stat value that we are after (or NULL for all).
void * GNUNET_CONTAINER_multihashmap_get(const struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Given a key find a value in the map matching the key.
static char * value
Value of the record to add/remove.
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
Definition: crypto_hash.c:48
A 512-bit hashcode.
There must only be one value per key; storing a value should fail if a value under the same key alrea...
static unsigned num_nodes
Number of configurations of all (testbed) nodes.
struct GNUNET_HashCode key
The key used in the DHT.
int GNUNET_CONTAINER_multihashmap_put(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
static struct ValueSet * new_value_set(const char *subsystem, const char *name, unsigned num_values, int is_persistent)
Create a new ValueSet.
void * cls
Closure for proc and cont.
#define GNUNET_YES
Definition: gnunet_common.h:77
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main_task()

static void main_task ( void *  cls)
static

Main task that does the actual work.

Parameters
clsclosure with our configuration

Definition at line 517 of file gnunet-statistics.c.

References _, cfg, clean_node(), cleanup(), collector(), Node::conf, continuation_print(), Node::gh, GNUNET_NO, GNUNET_OK, GNUNET_SCHEDULER_add_now(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_STATISTICS_create(), GNUNET_STATISTICS_destroy(), GNUNET_STATISTICS_get(), GNUNET_STATISTICS_set(), GNUNET_STATISTICS_watch(), GNUNET_SYSERR, GNUNET_YES, Node::handle, Node::index_node, name, nodes, persistent, printer_watch(), ret, set_val, set_value, Node::shutdown_task, subsystem, and watch.

Referenced by run().

518 {
519  unsigned index_node = *(unsigned *) cls;
520  const struct GNUNET_CONFIGURATION_Handle *cfg = nodes[index_node].conf;
521 
522  if (set_value)
523  {
524  if (NULL == subsystem)
525  {
526  fprintf (stderr, "%s", _ ("Missing argument: subsystem \n"));
527  ret = 1;
528  return;
529  }
530  if (NULL == name)
531  {
532  fprintf (stderr, "%s", _ ("Missing argument: name\n"));
533  ret = 1;
534  return;
535  }
536  nodes[index_node].handle = GNUNET_STATISTICS_create (subsystem, cfg);
537  if (NULL == nodes[index_node].handle)
538  {
539  ret = 1;
540  return;
541  }
542  GNUNET_STATISTICS_set (nodes[index_node].handle,
543  name,
544  (uint64_t) set_val,
545  persistent);
546  GNUNET_STATISTICS_destroy (nodes[index_node].handle, GNUNET_YES);
547  nodes[index_node].handle = NULL;
548  return;
549  }
550  if (NULL == (nodes[index_node].handle =
551  GNUNET_STATISTICS_create ("gnunet-statistics", cfg)))
552  {
553  ret = 1;
554  return;
555  }
556  if (GNUNET_NO == watch)
557  {
558  if (NULL == (nodes[index_node].gh =
559  GNUNET_STATISTICS_get (nodes[index_node].handle,
560  subsystem,
561  name,
563  &collector,
564  &nodes[index_node].index_node)))
565  cleanup (nodes[index_node].handle, GNUNET_SYSERR);
566  }
567  else
568  {
569  if ((NULL == subsystem) || (NULL == name))
570  {
571  printf (_ ("No subsystem or name given\n"));
572  GNUNET_STATISTICS_destroy (nodes[index_node].handle, GNUNET_NO);
573  nodes[index_node].handle = NULL;
574  ret = 1;
575  return;
576  }
577  if (GNUNET_OK != GNUNET_STATISTICS_watch (nodes[index_node].handle,
578  subsystem,
579  name,
580  &printer_watch,
581  &nodes[index_node].index_node))
582  {
583  fprintf (stderr, _ ("Failed to initialize watch routine\n"));
584  nodes[index_node].shutdown_task =
585  GNUNET_SCHEDULER_add_now (&clean_node, &nodes[index_node].index_node);
586  return;
587  }
588  }
589  nodes[index_node].shutdown_task =
590  GNUNET_SCHEDULER_add_shutdown (&clean_node, &nodes[index_node].index_node);
591 }
static char * subsystem
Set to subsystem that we&#39;re going to get stats for (or NULL for all).
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
static int collector(void *cls, const char *subsystem, const char *name, uint64_t value, int is_persistent)
Iterate over statistics values and store them in values.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run on shutdown, that is when a CTRL-C signal is received, or when GNUNET_SCHEDULER_shutdown() is being invoked.
Definition: scheduler.c:1300
struct GNUNET_STATISTICS_Handle * GNUNET_STATISTICS_create(const char *subsystem, const struct GNUNET_CONFIGURATION_Handle *cfg)
Get handle for the statistics service.
#define GNUNET_NO
Definition: gnunet_common.h:78
static unsigned long long set_val
Value to set.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
void GNUNET_STATISTICS_destroy(struct GNUNET_STATISTICS_Handle *h, int sync_first)
Destroy a handle (free all state associated with it).
static char * name
Set to the specific stat value that we are after (or NULL for all).
static int ret
Final status code.
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
static void continuation_print(void *cls, int success)
Called once all statistic values are available.
static struct Node * nodes
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1280
struct GNUNET_CONFIGURATION_Handle * conf
Configuration handle for this node.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
void GNUNET_STATISTICS_set(struct GNUNET_STATISTICS_Handle *handle, const char *name, uint64_t value, int make_persistent)
Set statistic value for the peer.
static int watch
Watch value continuously.
#define GNUNET_SYSERR
Definition: gnunet_common.h:76
static void cleanup(void *cls, int success)
Function called last by the statistics code.
static int set_value
Set operation.
static int persistent
Make the value that is being set persistent.
struct GNUNET_SCHEDULER_Task * shutdown_task
Identifier for shutdown task for this node.
struct GNUNET_STATISTICS_GetHandle * GNUNET_STATISTICS_get(struct GNUNET_STATISTICS_Handle *handle, const char *subsystem, const char *name, GNUNET_STATISTICS_Callback cont, GNUNET_STATISTICS_Iterator proc, void *cls)
Get statistic from the peer.
configuration data
Definition: configuration.c:85
int GNUNET_STATISTICS_watch(struct GNUNET_STATISTICS_Handle *handle, const char *subsystem, const char *name, GNUNET_STATISTICS_Iterator proc, void *proc_cls)
Watch statistics from the peer (be notified whenever they change).
static struct GNUNET_TRANSPORT_HelloGetHandle * gh
Pending GNUNET_TRANSPORT_hello_get() operation.
static void clean_node(void *cls)
Clean all data structures related to given node.
#define GNUNET_YES
Definition: gnunet_common.h:77
struct GNUNET_STATISTICS_Handle * handle
Statistics handle nodes.
static int printer_watch(void *cls, const char *subsystem, const char *name, uint64_t value, int is_persistent)
Callback function to process statistic values.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iter_check_config()

static int iter_check_config ( void *  cls,
const char *  filename 
)
static

Iter over content of a node's directory to check for existence of a config file.

Implements GNUNET_FileNameCallback

Parameters
clspointer to indicate success
filenamefilename inside the directory of the potential node
Returns
to continue iteration or not to

Definition at line 606 of file gnunet-statistics.c.

References Node::conf, GNUNET_array_grow, GNUNET_CONFIGURATION_create(), GNUNET_CONFIGURATION_load(), GNUNET_NO, GNUNET_OK, GNUNET_STRINGS_get_short_name(), GNUNET_SYSERR, Node::index_node, nodes, and num_nodes.

Referenced by iter_testbed_path().

607 {
608  if (0 == strncmp (GNUNET_STRINGS_get_short_name (filename), "config", 6))
609  {
610  /* Found the config - stop iteration successfully */
613  nodes[num_nodes - 1].index_node = num_nodes - 1;
614  if (GNUNET_OK !=
616  {
617  fprintf (stderr, "Failed loading config `%s'\n", filename);
618  return GNUNET_SYSERR;
619  }
620  return GNUNET_NO;
621  }
622  else
623  {
624  /* Continue iteration */
625  return GNUNET_OK;
626  }
627 }
#define GNUNET_NO
Definition: gnunet_common.h:78
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_create(void)
Create a new configuration object.
int GNUNET_CONFIGURATION_load(struct GNUNET_CONFIGURATION_Handle *cfg, const char *filename)
Load configuration.
static struct Node * nodes
#define GNUNET_array_grow(arr, size, tsize)
Grow a well-typed (!) array.
static char * filename
struct GNUNET_CONFIGURATION_Handle * conf
Configuration handle for this node.
const char * GNUNET_STRINGS_get_short_name(const char *filename)
"man basename" Returns a pointer to a part of filename (allocates nothing)!
Definition: strings.c:775
static unsigned num_nodes
Number of configurations of all (testbed) nodes.
#define GNUNET_SYSERR
Definition: gnunet_common.h:76
unsigned index_node
Index of the node in this array.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iter_testbed_path()

static int iter_testbed_path ( void *  cls,
const char *  filename 
)
static

Iterates over filenames in testbed directory.

Implements GNUNET_FileNameCallback

Checks if the file is a directory for a testbed node and counts the nodes.

Parameters
clscounter of nodes
filenamefull path of the file in testbed
Returns
status whether to continue iteration

Definition at line 644 of file gnunet-statistics.c.

References GNUNET_assert, GNUNET_DISK_directory_scan(), GNUNET_OK, GNUNET_STRINGS_get_short_name(), Node::index_node, and iter_check_config().

Referenced by discover_testbed_nodes().

645 {
646  unsigned index_node;
647 
648  GNUNET_assert (NULL != filename);
649  if (1 == sscanf (GNUNET_STRINGS_get_short_name (filename), "%u", &index_node))
650  {
652  {
653  /* This is probably no directory for a testbed node
654  * Go on with iteration */
655  return GNUNET_OK;
656  }
657  return GNUNET_OK;
658  }
659  return GNUNET_OK;
660 }
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
static int iter_check_config(void *cls, const char *filename)
Iter over content of a node&#39;s directory to check for existence of a config file.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
int GNUNET_DISK_directory_scan(const char *dir_name, GNUNET_FileNameCallback callback, void *callback_cls)
Scan a directory for files.
Definition: disk.c:912
static char * filename
const char * GNUNET_STRINGS_get_short_name(const char *filename)
"man basename" Returns a pointer to a part of filename (allocates nothing)!
Definition: strings.c:775
Here is the call graph for this function:
Here is the caller graph for this function:

◆ discover_testbed_nodes()

static int discover_testbed_nodes ( const char *  path_testbed)
static

Count the number of nodes running in the testbed.

Parameters
path_testbedpath to the testbed data
Returns
number of running nodes

Definition at line 671 of file gnunet-statistics.c.

References GNUNET_DISK_directory_scan(), and iter_testbed_path().

Referenced by run().

672 {
673  int num_dir_entries;
674 
675  num_dir_entries =
677  if (-1 == num_dir_entries)
678  {
679  fprintf (stderr, "Failure during scanning directory `%s'\n", path_testbed);
680  return -1;
681  }
682  return 0;
683 }
static char * path_testbed
The path of the testbed data.
int GNUNET_DISK_directory_scan(const char *dir_name, GNUNET_FileNameCallback callback, void *callback_cls)
Scan a directory for files.
Definition: disk.c:912
static int iter_testbed_path(void *cls, const char *filename)
Iterates over filenames in testbed directory.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

static void run ( void *  cls,
char *const *  args,
const char *  cfgfile,
const struct GNUNET_CONFIGURATION_Handle cfg 
)
static

Main function that will be run by the scheduler.

Parameters
clsclosure
argsremaining command-line arguments
cfgfilename of the configuration file used (for saving, can be NULL!)
cfgconfiguration

Definition at line 695 of file gnunet-statistics.c.

References _, Node::conf, csv_separator, discover_testbed_nodes(), GNUNET_array_grow, GNUNET_CONFIGURATION_get_value_number(), GNUNET_CONFIGURATION_set_value_number(), GNUNET_CONFIGURATION_set_value_string(), GNUNET_CONTAINER_multihashmap_create(), GNUNET_NO, GNUNET_SCHEDULER_add_now(), GNUNET_SYSERR, GNUNET_YES, Node::index_node, main_task(), nodes, num_nodes, path_testbed, remote_host, remote_port, ret, set_val, set_value, and watch.

Referenced by main().

699 {
700  struct GNUNET_CONFIGURATION_Handle *c;
701 
702  c = (struct GNUNET_CONFIGURATION_Handle *) cfg;
704  if (NULL == csv_separator)
705  csv_separator = "";
706  if (NULL != args[0])
707  {
708  if (1 != sscanf (args[0], "%llu", &set_val))
709  {
710  fprintf (stderr, _ ("Invalid argument `%s'\n"), args[0]);
711  ret = 1;
712  return;
713  }
715  }
716  if (NULL != remote_host)
717  {
718  if (0 == remote_port)
719  {
721  "statistics",
722  "PORT",
723  &remote_port))
724  {
725  fprintf (stderr,
726  _ ("A port is required to connect to host `%s'\n"),
727  remote_host);
728  return;
729  }
730  }
731  else if (65535 <= remote_port)
732  {
733  fprintf (stderr,
734  _ (
735  "A port has to be between 1 and 65535 to connect to host `%s'\n"),
736  remote_host);
737  return;
738  }
739 
740  /* Manipulate configuration */
741  GNUNET_CONFIGURATION_set_value_string (c, "statistics", "UNIXPATH", "");
743  "statistics",
744  "HOSTNAME",
745  remote_host);
747  "statistics",
748  "PORT",
749  remote_port);
750  }
751  if (NULL == path_testbed)
752  {
755  nodes[0].index_node = 0;
756  nodes[0].conf = c;
757  GNUNET_SCHEDULER_add_now (&main_task, &nodes[0].index_node);
758  }
759  else
760  {
761  if (GNUNET_YES == watch)
762  {
763  printf (
764  _ ("Not able to watch testbed nodes (yet - feel free to implement)\n"));
765  ret = 1;
766  return;
767  }
770  {
771  return;
772  }
773  /* For each config/node collect statistics */
774  for (unsigned i = 0; i < num_nodes; i++)
775  {
776  GNUNET_SCHEDULER_add_now (&main_task, &nodes[i].index_node);
777  }
778  }
779 }
static char * remote_host
Remote host.
static unsigned long long remote_port
Remote host&#39;s port.
int GNUNET_CONFIGURATION_get_value_number(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, unsigned long long *number)
Get a configuration value that should be a number.
static struct GNUNET_CONTAINER_MultiHashMap * values
Collection of all values (represented with ValueSet).
static char * csv_separator
Separator string for csv.
void GNUNET_CONFIGURATION_set_value_number(struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, unsigned long long number)
Set a configuration value that should be a number.
#define GNUNET_NO
Definition: gnunet_common.h:78
static unsigned long long set_val
Value to set.
static char * path_testbed
The path of the testbed data.
static int ret
Final status code.
#define _(String)
GNU gettext support macro.
Definition: platform.h:181
static struct Node * nodes
#define GNUNET_array_grow(arr, size, tsize)
Grow a well-typed (!) array.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1280
struct GNUNET_CONFIGURATION_Handle * conf
Configuration handle for this node.
void GNUNET_CONFIGURATION_set_value_string(struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, const char *value)
Set a configuration value that should be a string.
static unsigned num_nodes
Number of configurations of all (testbed) nodes.
static int watch
Watch value continuously.
#define GNUNET_SYSERR
Definition: gnunet_common.h:76
static int set_value
Set operation.
unsigned index_node
Index of the node in this array.
configuration data
Definition: configuration.c:85
struct GNUNET_CONTAINER_MultiHashMap * GNUNET_CONTAINER_multihashmap_create(unsigned int len, int do_not_copy_keys)
Create a multi hash map.
#define GNUNET_YES
Definition: gnunet_common.h:77
static void main_task(void *cls)
Main task that does the actual work.
static int discover_testbed_nodes(const char *path_testbed)
Count the number of nodes running in the testbed.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *const *  argv 
)

The main function to obtain statistics in GNUnet.

Parameters
argcnumber of arguments from the command line
argvcommand line arguments
Returns
0 ok, 1 on error

Definition at line 790 of file gnunet-statistics.c.

References csv_separator, gettext_noop, GNUNET_free, GNUNET_free_non_null, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_filename(), GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_string(), GNUNET_GETOPT_option_ulong(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), name, path_testbed, persistent, quiet, remote_host, remote_port, ret, run(), subsystem, and watch.

791 {
794  'n',
795  "name",
796  "NAME",
797  gettext_noop ("limit output to statistics for the given NAME"),
798  &name),
799 
801  "persistent",
802  gettext_noop (
803  "make the value being set persistent"),
804  &persistent),
805 
807  "subsystem",
808  "SUBSYSTEM",
809  gettext_noop (
810  "limit output to the given SUBSYSTEM"),
811  &subsystem),
812 
814  "csv-separator",
815  "CSV_SEPARATOR",
816  gettext_noop ("use as csv separator"),
817  &csv_separator),
818 
820  't',
821  "testbed",
822  "TESTBED",
823  gettext_noop ("path to the folder containing the testbed data"),
824  &path_testbed),
825 
827  "quiet",
828  gettext_noop (
829  "just print the statistics value"),
830  &quiet),
831 
833  "watch",
834  gettext_noop ("watch value continuously"),
835  &watch),
836 
838  "remote",
839  "REMOTE",
840  gettext_noop ("connect to remote host"),
841  &remote_host),
842 
844  "port",
845  "PORT",
846  gettext_noop ("port for remote host"),
847  &remote_port),
848 
850 
851  remote_port = 0;
852  remote_host = NULL;
853  if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
854  return 2;
855 
856  ret = (GNUNET_OK ==
857  GNUNET_PROGRAM_run (argc,
858  argv,
859  "gnunet-statistics [options [value]]",
860  gettext_noop (
861  "Print statistics about GNUnet operations."),
862  options,
863  &run,
864  NULL))
865  ? ret
866  : 1;
868  GNUNET_free ((void *) argv);
869  return ret;
870 }
static char * remote_host
Remote host.
static unsigned long long remote_port
Remote host&#39;s port.
static char * subsystem
Set to subsystem that we&#39;re going to get stats for (or NULL for all).
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
int GNUNET_STRINGS_get_utf8_args(int argc, char *const *argv, int *u8argc, char *const **u8argv)
Returns utf-8 encoded arguments.
Definition: strings.c:1438
static char * csv_separator
Separator string for csv.
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:75
#define GNUNET_free_non_null(ptr)
Free the memory pointed to by ptr if ptr is not NULL.
Definition of a command line option.
static char * path_testbed
The path of the testbed data.
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
Main function that will be run by the scheduler.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition: 002.c:13
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_string(char shortName, const char *name, const char *argumentHelp, const char *description, char **str)
Allow user to specify a string.
static char * name
Set to the specific stat value that we are after (or NULL for all).
static int ret
Final status code.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_filename(char shortName, const char *name, const char *argumentHelp, const char *description, char **str)
Allow user to specify a filename (automatically path expanded).
static int watch
Watch value continuously.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_ulong(char shortName, const char *name, const char *argumentHelp, const char *description, unsigned long long *val)
Allow user to specify an unsigned long long.
static int persistent
Make the value that is being set persistent.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag(char shortName, const char *name, const char *description, int *val)
Allow user to specify a flag (which internally means setting an integer to 1/GNUNET_YES/GNUNET_OK.
int GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration, parse options).
Definition: program.c:367
static int quiet
Quiet mode.
#define GNUNET_free(ptr)
Wrapper around free.
#define gettext_noop(String)
Definition: gettext.h:69
Here is the call graph for this function:

Variable Documentation

◆ ret

int ret
static

Final status code.

Definition at line 36 of file gnunet-statistics.c.

Referenced by cleanup(), continuation_print(), main(), main_task(), and run().

◆ subsystem

char* subsystem
static

Set to subsystem that we're going to get stats for (or NULL for all).

Definition at line 41 of file gnunet-statistics.c.

Referenced by clean_node(), ego_get_subsystem(), gnunet_uri(), main(), main_task(), run(), and stat_iterator().

◆ path_testbed

char* path_testbed
static

The path of the testbed data.

Definition at line 46 of file gnunet-statistics.c.

Referenced by clean_node(), main(), and run().

◆ name

char* name
static

Set to the specific stat value that we are after (or NULL for all).

Definition at line 51 of file gnunet-statistics.c.

Referenced by clean_node(), main(), and main_task().

◆ persistent

int persistent
static

Make the value that is being set persistent.

Definition at line 56 of file gnunet-statistics.c.

Referenced by main(), main_task(), and new_value_set().

◆ watch

int watch
static

Watch value continuously.

Definition at line 61 of file gnunet-statistics.c.

Referenced by clean_node(), main(), main_task(), printer(), printer_watch(), and run().

◆ quiet

int quiet
static

Quiet mode.

Definition at line 66 of file gnunet-statistics.c.

Referenced by main(), printer(), and printer_watch().

◆ csv_separator

char* csv_separator
static

Separator string for csv.

Definition at line 71 of file gnunet-statistics.c.

Referenced by main(), printer(), printer_watch(), and run().

◆ remote_host

char* remote_host
static

Remote host.

Definition at line 76 of file gnunet-statistics.c.

Referenced by cleanup(), continuation_print(), main(), and run().

◆ remote_port

unsigned long long remote_port
static

Remote host's port.

Definition at line 81 of file gnunet-statistics.c.

Referenced by add_services(), cleanup(), continuation_print(), main(), and run().

◆ set_val

unsigned long long set_val
static

Value to set.

Definition at line 86 of file gnunet-statistics.c.

Referenced by main_task(), and run().

◆ set_value

int set_value
static

Set operation.

Definition at line 91 of file gnunet-statistics.c.

Referenced by main_task(), and run().

◆ nodes

struct Node * nodes
static

◆ num_nodes

unsigned num_nodes
static

Number of configurations of all (testbed) nodes.

Definition at line 126 of file gnunet-statistics.c.

Referenced by clean_node(), cleanup(), collector(), continuation_print(), iter_check_config(), printer(), and run().

◆ values

struct GNUNET_CONTAINER_MultiHashMap* values
static

Collection of all values (represented with ValueSet).

Definition at line 157 of file gnunet-statistics.c.

Referenced by heap_plugin_get_closest().

◆ num_nodes_ready

int num_nodes_ready
static

Number of nodes that have their values ready.

Definition at line 162 of file gnunet-statistics.c.

Referenced by continuation_print().

◆ num_nodes_ready_shutdown

int num_nodes_ready_shutdown
static

Number of nodes that have their values ready.

Definition at line 167 of file gnunet-statistics.c.

Referenced by clean_node().