diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-08-01 08:51:43 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-08-01 08:51:43 +0000 |
commit | 974d4e5d36f0ef1f93f7f881ec21b45ab518bdcc (patch) | |
tree | ea16b7f9dfcf726a5de43fca80637db61bf91684 /src/experimentation | |
parent | e49a562f2dd56775f3d826272fd463493baa2d23 (diff) | |
download | gnunet-974d4e5d36f0ef1f93f7f881ec21b45ab518bdcc.tar.gz gnunet-974d4e5d36f0ef1f93f7f881ec21b45ab518bdcc.zip |
renaming stats and cfg
Diffstat (limited to 'src/experimentation')
6 files changed, 25 insertions, 25 deletions
diff --git a/src/experimentation/gnunet-daemon-experimentation.c b/src/experimentation/gnunet-daemon-experimentation.c index 3a2b71c83..60a515022 100644 --- a/src/experimentation/gnunet-daemon-experimentation.c +++ b/src/experimentation/gnunet-daemon-experimentation.c | |||
@@ -35,13 +35,13 @@ | |||
35 | /** | 35 | /** |
36 | * Statistics handle shared between components | 36 | * Statistics handle shared between components |
37 | */ | 37 | */ |
38 | struct GNUNET_STATISTICS_Handle *GSE_stats; | 38 | struct GNUNET_STATISTICS_Handle *GED_stats; |
39 | 39 | ||
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Configuration handle shared between components | 42 | * Configuration handle shared between components |
43 | */ | 43 | */ |
44 | struct GNUNET_CONFIGURATION_Handle *GSE_cfg; | 44 | struct GNUNET_CONFIGURATION_Handle *GED_cfg; |
45 | 45 | ||
46 | 46 | ||
47 | /** | 47 | /** |
@@ -77,9 +77,9 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
77 | { | 77 | { |
78 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon starting ...\n")); | 78 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Experimentation daemon starting ...\n")); |
79 | 79 | ||
80 | GSE_cfg = (struct GNUNET_CONFIGURATION_Handle *) cfg; | 80 | GED_cfg = (struct GNUNET_CONFIGURATION_Handle *) cfg; |
81 | GSE_stats = GNUNET_STATISTICS_create ("experimentation", cfg); | 81 | GED_stats = GNUNET_STATISTICS_create ("experimentation", cfg); |
82 | if (NULL == GSE_stats) | 82 | if (NULL == GED_stats) |
83 | { | 83 | { |
84 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to create statistics!\n")); | 84 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to create statistics!\n")); |
85 | return; | 85 | return; |
diff --git a/src/experimentation/gnunet-daemon-experimentation.h b/src/experimentation/gnunet-daemon-experimentation.h index 9d2c62975..052005439 100644 --- a/src/experimentation/gnunet-daemon-experimentation.h +++ b/src/experimentation/gnunet-daemon-experimentation.h | |||
@@ -49,13 +49,13 @@ | |||
49 | /** | 49 | /** |
50 | * Statistics handle shared between components | 50 | * Statistics handle shared between components |
51 | */ | 51 | */ |
52 | extern struct GNUNET_STATISTICS_Handle *GSE_stats; | 52 | extern struct GNUNET_STATISTICS_Handle *GED_stats; |
53 | 53 | ||
54 | 54 | ||
55 | /** | 55 | /** |
56 | * Configuration handle shared between components | 56 | * Configuration handle shared between components |
57 | */ | 57 | */ |
58 | extern struct GNUNET_CONFIGURATION_Handle *GSE_cfg; | 58 | extern struct GNUNET_CONFIGURATION_Handle *GED_cfg; |
59 | 59 | ||
60 | 60 | ||
61 | /** | 61 | /** |
diff --git a/src/experimentation/gnunet-daemon-experimentation_capabilities.c b/src/experimentation/gnunet-daemon-experimentation_capabilities.c index d2570d387..a92d2d4bc 100644 --- a/src/experimentation/gnunet-daemon-experimentation_capabilities.c +++ b/src/experimentation/gnunet-daemon-experimentation_capabilities.c | |||
@@ -112,7 +112,7 @@ GED_capabilities_start () | |||
112 | 112 | ||
113 | /* Plugins configured */ | 113 | /* Plugins configured */ |
114 | 114 | ||
115 | if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GSE_cfg, | 115 | if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GED_cfg, |
116 | "TRANSPORT", "PLUGINS", &plugins)) | 116 | "TRANSPORT", "PLUGINS", &plugins)) |
117 | { | 117 | { |
118 | for (pos = strtok (plugins, " "); pos != NULL; pos = strtok (NULL, " ")) | 118 | for (pos = strtok (plugins, " "); pos != NULL; pos = strtok (NULL, " ")) |
@@ -139,12 +139,12 @@ GED_capabilities_start () | |||
139 | 139 | ||
140 | /* IPv6 enabled | 140 | /* IPv6 enabled |
141 | * FIXE: just having it not enabled is not really sufficient */ | 141 | * FIXE: just having it not enabled is not really sufficient */ |
142 | if (GNUNET_NO == GNUNET_CONFIGURATION_get_value_yesno (GSE_cfg, | 142 | if (GNUNET_NO == GNUNET_CONFIGURATION_get_value_yesno (GED_cfg, |
143 | "NAT", "DISABLEV6")) | 143 | "NAT", "DISABLEV6")) |
144 | GSE_node_capabilities |= HAVE_IPV6; | 144 | GSE_node_capabilities |= HAVE_IPV6; |
145 | 145 | ||
146 | /* Behind NAT */ | 146 | /* Behind NAT */ |
147 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (GSE_cfg, | 147 | if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (GED_cfg, |
148 | "NAT", "BEHIND_NAT")) | 148 | "NAT", "BEHIND_NAT")) |
149 | GSE_node_capabilities |= BEHIND_NAT; | 149 | GSE_node_capabilities |= BEHIND_NAT; |
150 | 150 | ||
diff --git a/src/experimentation/gnunet-daemon-experimentation_experiments.c b/src/experimentation/gnunet-daemon-experimentation_experiments.c index a39192c57..9e5cfd7e9 100644 --- a/src/experimentation/gnunet-daemon-experimentation_experiments.c +++ b/src/experimentation/gnunet-daemon-experimentation_experiments.c | |||
@@ -228,7 +228,7 @@ int GNUNET_EXPERIMENTATION_experiments_add (struct Issuer *i, | |||
228 | (long long unsigned int) frequency.rel_value / 1000, | 228 | (long long unsigned int) frequency.rel_value / 1000, |
229 | (long long unsigned int) duration.rel_value / 1000); | 229 | (long long unsigned int) duration.rel_value / 1000); |
230 | GNUNET_CONTAINER_multihashmap_put (experiments, &e->issuer.hashPubKey, e, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); | 230 | GNUNET_CONTAINER_multihashmap_put (experiments, &e->issuer.hashPubKey, e, GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); |
231 | GNUNET_STATISTICS_set (GSE_stats, "# experiments", GNUNET_CONTAINER_multihashmap_size (experiments), GNUNET_NO); | 231 | GNUNET_STATISTICS_set (GED_stats, "# experiments", GNUNET_CONTAINER_multihashmap_size (experiments), GNUNET_NO); |
232 | 232 | ||
233 | return GNUNET_OK; | 233 | return GNUNET_OK; |
234 | } | 234 | } |
@@ -367,7 +367,7 @@ GED_experiments_start () | |||
367 | struct GNUNET_HashCode hash; | 367 | struct GNUNET_HashCode hash; |
368 | 368 | ||
369 | /* Load valid issuer */ | 369 | /* Load valid issuer */ |
370 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (GSE_cfg, "EXPERIMENTATION", "ISSUERS", &issuers)) | 370 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (GED_cfg, "EXPERIMENTATION", "ISSUERS", &issuers)) |
371 | { | 371 | { |
372 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("No valid experiment issuers configured! Set value to peer id of issuer! Exit...\n")); | 372 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("No valid experiment issuers configured! Set value to peer id of issuer! Exit...\n")); |
373 | return GNUNET_SYSERR; | 373 | return GNUNET_SYSERR; |
@@ -398,9 +398,9 @@ GED_experiments_start () | |||
398 | GED_experiments_stop (); | 398 | GED_experiments_stop (); |
399 | return GNUNET_SYSERR; | 399 | return GNUNET_SYSERR; |
400 | } | 400 | } |
401 | GNUNET_STATISTICS_set (GSE_stats, "# issuer", GNUNET_CONTAINER_multihashmap_size (valid_issuers), GNUNET_NO); | 401 | GNUNET_STATISTICS_set (GED_stats, "# issuer", GNUNET_CONTAINER_multihashmap_size (valid_issuers), GNUNET_NO); |
402 | 402 | ||
403 | if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GSE_cfg, "EXPERIMENTATION", "PUBKEY", &pubkey)) | 403 | if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (GED_cfg, "EXPERIMENTATION", "PUBKEY", &pubkey)) |
404 | { | 404 | { |
405 | if (GNUNET_OK != GNUNET_CRYPTO_ecc_public_key_from_string(pubkey, strlen (pubkey), &pub)) | 405 | if (GNUNET_OK != GNUNET_CRYPTO_ecc_public_key_from_string(pubkey, strlen (pubkey), &pub)) |
406 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Invalid public key `%s'\n"), pubkey); | 406 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Invalid public key `%s'\n"), pubkey); |
@@ -425,7 +425,7 @@ GED_experiments_start () | |||
425 | 425 | ||
426 | experiments = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO); | 426 | experiments = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO); |
427 | /* Load experiments from file */ | 427 | /* Load experiments from file */ |
428 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (GSE_cfg, "EXPERIMENTATION", "EXPERIMENTS", &file)) | 428 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (GED_cfg, "EXPERIMENTATION", "EXPERIMENTS", &file)) |
429 | return GNUNET_OK; | 429 | return GNUNET_OK; |
430 | 430 | ||
431 | if (GNUNET_YES != GNUNET_DISK_file_test (file)) | 431 | if (GNUNET_YES != GNUNET_DISK_file_test (file)) |
diff --git a/src/experimentation/gnunet-daemon-experimentation_nodes.c b/src/experimentation/gnunet-daemon-experimentation_nodes.c index f5e2faf4c..667c9da57 100644 --- a/src/experimentation/gnunet-daemon-experimentation_nodes.c +++ b/src/experimentation/gnunet-daemon-experimentation_nodes.c | |||
@@ -71,21 +71,21 @@ struct GNUNET_CONTAINER_MultiHashMap *nodes_inactive; | |||
71 | static void update_stats (struct GNUNET_CONTAINER_MultiHashMap *m) | 71 | static void update_stats (struct GNUNET_CONTAINER_MultiHashMap *m) |
72 | { | 72 | { |
73 | GNUNET_assert (NULL != m); | 73 | GNUNET_assert (NULL != m); |
74 | GNUNET_assert (NULL != GSE_stats); | 74 | GNUNET_assert (NULL != GED_stats); |
75 | 75 | ||
76 | if (m == nodes_active) | 76 | if (m == nodes_active) |
77 | { | 77 | { |
78 | GNUNET_STATISTICS_set (GSE_stats, "# nodes active", | 78 | GNUNET_STATISTICS_set (GED_stats, "# nodes active", |
79 | GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); | 79 | GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); |
80 | } | 80 | } |
81 | else if (m == nodes_inactive) | 81 | else if (m == nodes_inactive) |
82 | { | 82 | { |
83 | GNUNET_STATISTICS_set (GSE_stats, "# nodes inactive", | 83 | GNUNET_STATISTICS_set (GED_stats, "# nodes inactive", |
84 | GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); | 84 | GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); |
85 | } | 85 | } |
86 | else if (m == nodes_requested) | 86 | else if (m == nodes_requested) |
87 | { | 87 | { |
88 | GNUNET_STATISTICS_set (GSE_stats, "# nodes requested", | 88 | GNUNET_STATISTICS_set (GED_stats, "# nodes requested", |
89 | GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); | 89 | GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); |
90 | } | 90 | } |
91 | else | 91 | else |
@@ -763,7 +763,7 @@ void | |||
763 | GED_nodes_start () | 763 | GED_nodes_start () |
764 | { | 764 | { |
765 | /* Connecting to core service to find partners */ | 765 | /* Connecting to core service to find partners */ |
766 | ch = GNUNET_CORE_connect (GSE_cfg, NULL, | 766 | ch = GNUNET_CORE_connect (GED_cfg, NULL, |
767 | &core_startup_handler, | 767 | &core_startup_handler, |
768 | &core_connect_handler, | 768 | &core_connect_handler, |
769 | &core_disconnect_handler, | 769 | &core_disconnect_handler, |
diff --git a/src/experimentation/gnunet-daemon-experimentation_scheduler.c b/src/experimentation/gnunet-daemon-experimentation_scheduler.c index 1a3a8cdbb..aaf47174e 100644 --- a/src/experimentation/gnunet-daemon-experimentation_scheduler.c +++ b/src/experimentation/gnunet-daemon-experimentation_scheduler.c | |||
@@ -93,7 +93,7 @@ request_timeout (void *cls,const struct GNUNET_SCHEDULER_TaskContext* tc) | |||
93 | 93 | ||
94 | GNUNET_assert (experiments_requested > 0); | 94 | GNUNET_assert (experiments_requested > 0); |
95 | experiments_requested --; | 95 | experiments_requested --; |
96 | GNUNET_STATISTICS_set (GSE_stats, "# experiments requested", experiments_requested, GNUNET_NO); | 96 | GNUNET_STATISTICS_set (GED_stats, "# experiments requested", experiments_requested, GNUNET_NO); |
97 | } | 97 | } |
98 | 98 | ||
99 | static void start_experiment (void *cls,const struct GNUNET_SCHEDULER_TaskContext* tc) | 99 | static void start_experiment (void *cls,const struct GNUNET_SCHEDULER_TaskContext* tc) |
@@ -127,7 +127,7 @@ static void start_experiment (void *cls,const struct GNUNET_SCHEDULER_TaskContex | |||
127 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Sending start request to peer `%s' for `%s'\n", | 127 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Sending start request to peer `%s' for `%s'\n", |
128 | GNUNET_i2s (&se->n->id), se->e->name); | 128 | GNUNET_i2s (&se->n->id), se->e->name); |
129 | experiments_requested ++; | 129 | experiments_requested ++; |
130 | GNUNET_STATISTICS_set (GSE_stats, "# experiments requested", experiments_requested, GNUNET_NO); | 130 | GNUNET_STATISTICS_set (GED_stats, "# experiments requested", experiments_requested, GNUNET_NO); |
131 | return; | 131 | return; |
132 | } | 132 | } |
133 | else if (REQUESTED == se->state) | 133 | else if (REQUESTED == se->state) |
@@ -230,7 +230,7 @@ GED_scheduler_add (struct Node *n, struct Experiment *e) | |||
230 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Added experiment `%s' for node to be scheduled\n", | 230 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Added experiment `%s' for node to be scheduled\n", |
231 | e->name, GNUNET_i2s(&se->n->id)); | 231 | e->name, GNUNET_i2s(&se->n->id)); |
232 | experiments_scheduled ++; | 232 | experiments_scheduled ++; |
233 | GNUNET_STATISTICS_set (GSE_stats, "# experiments scheduled", experiments_scheduled, GNUNET_NO); | 233 | GNUNET_STATISTICS_set (GED_stats, "# experiments scheduled", experiments_scheduled, GNUNET_NO); |
234 | } | 234 | } |
235 | 235 | ||
236 | /** | 236 | /** |
@@ -266,7 +266,7 @@ GED_scheduler_stop () | |||
266 | GNUNET_free (cur); | 266 | GNUNET_free (cur); |
267 | GNUNET_assert (experiments_scheduled > 0); | 267 | GNUNET_assert (experiments_scheduled > 0); |
268 | experiments_scheduled --; | 268 | experiments_scheduled --; |
269 | GNUNET_STATISTICS_set (GSE_stats, "# experiments scheduled", experiments_scheduled, GNUNET_NO); | 269 | GNUNET_STATISTICS_set (GED_stats, "# experiments scheduled", experiments_scheduled, GNUNET_NO); |
270 | } | 270 | } |
271 | 271 | ||
272 | next = running_head; | 272 | next = running_head; |
@@ -282,7 +282,7 @@ GED_scheduler_stop () | |||
282 | GNUNET_free (cur); | 282 | GNUNET_free (cur); |
283 | GNUNET_assert (experiments_running > 0); | 283 | GNUNET_assert (experiments_running > 0); |
284 | experiments_running --; | 284 | experiments_running --; |
285 | GNUNET_STATISTICS_set (GSE_stats, "# experiments running", experiments_running, GNUNET_NO); | 285 | GNUNET_STATISTICS_set (GED_stats, "# experiments running", experiments_running, GNUNET_NO); |
286 | } | 286 | } |
287 | } | 287 | } |
288 | 288 | ||