[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14702 - gnunet/src/dht
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14702 - gnunet/src/dht |
Date: |
Thu, 24 Mar 2011 13:45:45 +0100 |
Author: nevans
Date: 2011-03-24 13:45:45 +0100 (Thu, 24 Mar 2011)
New Revision: 14702
Modified:
gnunet/src/dht/gnunet-dht-driver.c
Log:
Option for inserting gauger data
Modified: gnunet/src/dht/gnunet-dht-driver.c
===================================================================
--- gnunet/src/dht/gnunet-dht-driver.c 2011-03-24 11:59:04 UTC (rev 14701)
+++ gnunet/src/dht/gnunet-dht-driver.c 2011-03-24 12:45:45 UTC (rev 14702)
@@ -431,6 +431,11 @@
*/
static unsigned int do_find_peer;
+/**
+ * Whether or not to insert gauger data.
+ */
+static unsigned int insert_gauger_data;
+
#if ONLY_TESTING
/**
* Are we currently trying to connect two peers repeatedly?
@@ -968,7 +973,8 @@
GNUNET_asprintf (&temp_get_string,
"DHT Successful GETs (trial %d)", trial_to_run);
GNUNET_asprintf (&revision_str, "%llu", revision);
- GAUGER_ID("DHT_TESTING", temp_get_string, cumulative_successful_gets /
(double)cumulative_num_gets, "percent successful", revision_str);
+ if (GNUNET_YES == insert_gauger_data)
+ GAUGER_ID("DHT_TESTING", temp_get_string, cumulative_successful_gets /
(double)cumulative_num_gets, "percent successful", revision_str);
fprintf (
stderr,
"Finished trial, had %llu successful gets out of %llu total, %.2f
percent succeeded\n",
@@ -3096,8 +3102,12 @@
"DHT Profiler Connection failed (trial %d)",
trial_to_run);
GNUNET_asprintf (&revision_str, "%llu", revision);
- GAUGER_ID("DHT_TESTING", temp_conn_string, conns_per_sec_total,
"conns/s", revision_str);
- GAUGER_ID("DHT_TESTING", temp_conn_failed_string,
failed_conns_per_sec_total, "failed_conns", revision_str);
+
+ if (GNUNET_YES == insert_gauger_data)
+ GAUGER_ID("DHT_TESTING", temp_conn_string, conns_per_sec_total,
"conns/s", revision_str);
+ if (GNUNET_YES == insert_gauger_data)
+ GAUGER_ID("DHT_TESTING", temp_conn_failed_string,
failed_conns_per_sec_total, "failed_conns", revision_str);
+
GNUNET_free(temp_conn_string);
GNUNET_free(temp_conn_failed_string);
GNUNET_asprintf (&temp_conn_string,
@@ -3107,8 +3117,10 @@
&temp_conn_failed_string,
"DHT Profiler Total Connections failed (trial %d)",
trial_to_run);
- GAUGER_ID("DHT_TESTING", temp_conn_string, total_connections, "conns",
revision_str);
- GAUGER_ID("DHT_TESTING", temp_conn_failed_string, failed_connections,
"failed conns", revision_str);
+ if (GNUNET_YES == insert_gauger_data)
+ GAUGER_ID("DHT_TESTING", temp_conn_string, total_connections, "conns",
revision_str);
+ if (GNUNET_YES == insert_gauger_data)
+ GAUGER_ID("DHT_TESTING", temp_conn_failed_string, failed_connections,
"failed conns", revision_str);
GNUNET_free(temp_conn_string);
GNUNET_free(temp_conn_failed_string);
GNUNET_free(revision_str);
@@ -3791,6 +3803,10 @@
"do_find_peer"))
do_find_peer = GNUNET_YES;
+ if (GNUNET_NO == GNUNET_CONFIGURATION_get_value_yesno (cfg, "dht",
+
"insert_gauger_data"))
+ insert_gauger_data = GNUNET_YES;
+
if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (cfg, "dht",
"republish"))
in_dht_replication = GNUNET_YES;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14702 - gnunet/src/dht,
gnunet <=