aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/test_core_api_reliability.c3
-rw-r--r--src/datacache/perf_datacache.c10
-rw-r--r--src/datastore/perf_datastore_api.c4
-rw-r--r--src/dht/gnunet-dht-driver.c5
-rwxr-xr-xsrc/peerinfo/perf_peerinfo_api.c3
-rw-r--r--src/util/perf_crypto_hash.c3
6 files changed, 10 insertions, 18 deletions
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c
index cfb299f83..b73f01a57 100644
--- a/src/core/test_core_api_reliability.c
+++ b/src/core/test_core_api_reliability.c
@@ -132,8 +132,7 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
132 fprintf (stderr, 132 fprintf (stderr,
133 "\nThroughput was %llu kb/s\n", 133 "\nThroughput was %llu kb/s\n",
134 total_bytes * 1000 / 1024 / delta); 134 total_bytes * 1000 / 1024 / delta);
135 GAUGER ("Core throughput_kb/s", 135 GAUGER ("Core throughput/s", total_bytes * 1000 / 1024 / delta, "kbs");
136 total_bytes * 1000 / 1024 / delta);
137 ok = 0; 136 ok = 0;
138} 137}
139 138
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c
index 307fd739e..8d5b4540a 100644
--- a/src/datacache/perf_datacache.c
+++ b/src/datacache/perf_datacache.c
@@ -104,11 +104,10 @@ run (void *cls,
104 ITERATIONS, 104 ITERATIONS,
105 (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value); 105 (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value);
106 GNUNET_snprintf (gstr, sizeof (gstr), 106 GNUNET_snprintf (gstr, sizeof (gstr),
107 "Time to PUT %u items in %s-datacache_ms", 107 "Time to PUT %u items in %s-datacache",
108 ITERATIONS, 108 ITERATIONS,
109 plugin_name); 109 plugin_name);
110 GAUGER (GNUNET_TIME_absolute_get_duration(start).rel_value, 110 GAUGER (GNUNET_TIME_absolute_get_duration(start).rel_value, gstr, "ms");
111 gstr);
112 start = GNUNET_TIME_absolute_get (); 111 start = GNUNET_TIME_absolute_get ();
113 memset (&k, 0, sizeof (GNUNET_HashCode)); 112 memset (&k, 0, sizeof (GNUNET_HashCode));
114 for (i = 0; i < ITERATIONS; i++) 113 for (i = 0; i < ITERATIONS; i++)
@@ -126,11 +125,10 @@ run (void *cls,
126 (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value, 125 (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value,
127 ITERATIONS - found); 126 ITERATIONS - found);
128 GNUNET_snprintf (gstr, sizeof (gstr), 127 GNUNET_snprintf (gstr, sizeof (gstr),
129 "Time to try to GET %u items from %s-datacache_ms", 128 "Time to try to GET %u items from %s-datacache",
130 ITERATIONS, 129 ITERATIONS,
131 plugin_name); 130 plugin_name);
132 GAUGER (GNUNET_TIME_absolute_get_duration(start).rel_value, 131 GAUGER (GNUNET_TIME_absolute_get_duration(start).rel_value, gstr, "ms");
133 gstr);
134 132
135 GNUNET_DATACACHE_destroy (h); 133 GNUNET_DATACACHE_destroy (h);
136 ASSERT (ok == 0); 134 ASSERT (ok == 0);
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c
index 3d59a88d1..ad7dc86ef 100644
--- a/src/datastore/perf_datastore_api.c
+++ b/src/datastore/perf_datastore_api.c
@@ -301,10 +301,10 @@ run_continuation (void *cls,
301 break; 301 break;
302 case RP_DONE: 302 case RP_DONE:
303 GNUNET_snprintf (gstr, sizeof (gstr), 303 GNUNET_snprintf (gstr, sizeof (gstr),
304 "PUT operations in %s-datastore_op/s", 304 "PUT operations in %s-datastore",
305 plugin_name); 305 plugin_name);
306 if (crc->i == ITERATIONS) 306 if (crc->i == ITERATIONS)
307 GAUGER (gstr, 1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).rel_value)); 307 GAUGER (gstr, 1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).rel_value), "ops");
308 GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES); 308 GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES);
309 GNUNET_free (crc); 309 GNUNET_free (crc);
310 ok = 0; 310 ok = 0;
diff --git a/src/dht/gnunet-dht-driver.c b/src/dht/gnunet-dht-driver.c
index 98cf12fc7..636f02dcb 100644
--- a/src/dht/gnunet-dht-driver.c
+++ b/src/dht/gnunet-dht-driver.c
@@ -68,8 +68,6 @@
68 68
69#define DEFAULT_BUCKET_SIZE 4 69#define DEFAULT_BUCKET_SIZE 4
70 70
71#define FIND_PEER_THRESHOLD 1
72
73/* If more than this many peers are added, slow down sending */ 71/* If more than this many peers are added, slow down sending */
74#define MAX_FIND_PEER_CUTOFF 2000 72#define MAX_FIND_PEER_CUTOFF 2000
75 73
@@ -2082,8 +2080,7 @@ count_peers_cb (void *cls,
2082 target_total_connections); 2080 target_total_connections);
2083 2081
2084 if ((find_peer_context->last_sent < 8) || 2082 if ((find_peer_context->last_sent < 8) ||
2085 ((find_peer_context->current_peers - find_peer_context->previous_peers > FIND_PEER_THRESHOLD) && 2083 ((find_peer_context->current_peers < 2 * connection_estimate(num_peers, DEFAULT_BUCKET_SIZE)) &&
2086 (find_peer_context->current_peers < 2 * connection_estimate(num_peers, DEFAULT_BUCKET_SIZE)) &&
2087 (GNUNET_TIME_absolute_get_remaining(find_peer_context->endtime).rel_value > 0) && 2084 (GNUNET_TIME_absolute_get_remaining(find_peer_context->endtime).rel_value > 0) &&
2088 (find_peer_context->current_peers < target_total_connections))) 2085 (find_peer_context->current_peers < target_total_connections)))
2089 { 2086 {
diff --git a/src/peerinfo/perf_peerinfo_api.c b/src/peerinfo/perf_peerinfo_api.c
index 4f1d28f5c..780333515 100755
--- a/src/peerinfo/perf_peerinfo_api.c
+++ b/src/peerinfo/perf_peerinfo_api.c
@@ -187,8 +187,7 @@ check ()
187 "Received %u/%u calls before timeout\n", 187 "Received %u/%u calls before timeout\n",
188 numpeers, 188 numpeers,
189 NUM_REQUESTS * NUM_REQUESTS / 2); 189 NUM_REQUESTS * NUM_REQUESTS / 2);
190 GAUGER ("Peerinfo lookups_peers/s", 190 GAUGER ("Peerinfo lookups_peers", numpeers / 30, "s");
191 numpeers/30);
192#if START_SERVICE 191#if START_SERVICE
193 if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) 192 if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
194 { 193 {
diff --git a/src/util/perf_crypto_hash.c b/src/util/perf_crypto_hash.c
index 1446aebaa..b4d0c7724 100644
--- a/src/util/perf_crypto_hash.c
+++ b/src/util/perf_crypto_hash.c
@@ -60,8 +60,7 @@ main (int argc, char *argv[])
60 printf ("Hash perf took %llu ms\n", 60 printf ("Hash perf took %llu ms\n",
61 (unsigned long long) 61 (unsigned long long)
62 GNUNET_TIME_absolute_get_duration (start).rel_value); 62 GNUNET_TIME_absolute_get_duration (start).rel_value);
63 GAUGER ("Cryptographic hashing_kb/s", 63 GAUGER ("Cryptographic hashing", 1024 * 64 * 1024 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value), "kbs");
64 1024 * 64 * 1024 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value));
65 return 0; 64 return 0;
66} 65}
67 66