fixes to gauger calls
authorNathan S. Evans <evans@in.tum.de>
Wed, 23 Feb 2011 11:19:54 +0000 (11:19 +0000)
committerNathan S. Evans <evans@in.tum.de>
Wed, 23 Feb 2011 11:19:54 +0000 (11:19 +0000)
src/core/test_core_api_reliability.c
src/datacache/perf_datacache.c
src/datastore/perf_datastore_api.c
src/dht/gnunet-dht-driver.c
src/peerinfo/perf_peerinfo_api.c
src/util/perf_crypto_hash.c

index cfb299f8348e21bd4a50be849eb4b02a9499a303..b73f01a576e76c200b9dbc6f196410794c4f8e5f 100644 (file)
@@ -132,8 +132,7 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   fprintf (stderr,
           "\nThroughput was %llu kb/s\n",
           total_bytes * 1000 / 1024 / delta);
-  GAUGER ("Core throughput_kb/s", 
-         total_bytes * 1000 / 1024 / delta);
+  GAUGER ("Core throughput/s", total_bytes * 1000 / 1024 / delta, "kbs");
   ok = 0;
 }
 
index 307fd739efff9a798912acaf584dd4e4a5c38694..8d5b4540a334671aaadf6a0246c4c5781049ba86 100644 (file)
@@ -104,11 +104,10 @@ run (void *cls,
           ITERATIONS,
           (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value);
   GNUNET_snprintf (gstr, sizeof (gstr),
-                  "Time to PUT %u items in %s-datacache_ms",
+                  "Time to PUT %u items in %s-datacache",
                   ITERATIONS,
                   plugin_name);
-  GAUGER (GNUNET_TIME_absolute_get_duration(start).rel_value,
-         gstr);  
+  GAUGER (GNUNET_TIME_absolute_get_duration(start).rel_value, gstr, "ms");
   start = GNUNET_TIME_absolute_get ();
   memset (&k, 0, sizeof (GNUNET_HashCode));
   for (i = 0; i < ITERATIONS; i++)
@@ -126,11 +125,10 @@ run (void *cls,
           (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value,
           ITERATIONS - found);
   GNUNET_snprintf (gstr, sizeof (gstr),
-                  "Time to try to GET %u items from %s-datacache_ms",
+                  "Time to try to GET %u items from %s-datacache",
                   ITERATIONS,
                   plugin_name);
-  GAUGER (GNUNET_TIME_absolute_get_duration(start).rel_value,
-         gstr);  
+  GAUGER (GNUNET_TIME_absolute_get_duration(start).rel_value, gstr, "ms");
           
   GNUNET_DATACACHE_destroy (h);
   ASSERT (ok == 0);
index 3d59a88d13035cdffe1e4809af82380668e6a8e2..ad7dc86ef2a588bd7d757513215d92fa5a74be99 100644 (file)
@@ -301,10 +301,10 @@ run_continuation (void *cls,
       break;
     case RP_DONE:
       GNUNET_snprintf (gstr, sizeof (gstr),
-                      "PUT operations in %s-datastore_op/s",
+                      "PUT operations in %s-datastore",
                       plugin_name);
       if (crc->i == ITERATIONS)
-       GAUGER (gstr, 1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).rel_value));
+       GAUGER (gstr, 1000 * stored_ops / (1 + GNUNET_TIME_absolute_get_duration(start_time).rel_value), "ops");
       GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES);
       GNUNET_free (crc);
       ok = 0;
index 98cf12fc7115dc9e6b9adde5d58f723e9d373233..636f02dcb075963fac99cf5ca5bd4f9629806f5b 100644 (file)
@@ -68,8 +68,6 @@
 
 #define DEFAULT_BUCKET_SIZE 4
 
-#define FIND_PEER_THRESHOLD 1
-
 /* If more than this many peers are added, slow down sending */
 #define MAX_FIND_PEER_CUTOFF 2000
 
@@ -2082,8 +2080,7 @@ count_peers_cb (void *cls,
                                             target_total_connections);
 
       if ((find_peer_context->last_sent < 8) ||
-          ((find_peer_context->current_peers - find_peer_context->previous_peers > FIND_PEER_THRESHOLD) &&
-          (find_peer_context->current_peers < 2 * connection_estimate(num_peers, DEFAULT_BUCKET_SIZE)) &&
+          ((find_peer_context->current_peers < 2 * connection_estimate(num_peers, DEFAULT_BUCKET_SIZE)) &&
           (GNUNET_TIME_absolute_get_remaining(find_peer_context->endtime).rel_value > 0) &&
           (find_peer_context->current_peers < target_total_connections)))
         {
index 4f1d28f5c9531c5fff50c75eda4e3e5ecfcf37c0..780333515c6e65423a15cf069b15f9eadbec26b1 100755 (executable)
@@ -187,8 +187,7 @@ check ()
           "Received %u/%u calls before timeout\n",
           numpeers,
           NUM_REQUESTS * NUM_REQUESTS / 2);
-  GAUGER ("Peerinfo lookups_peers/s",
-         numpeers/30);
+  GAUGER ("Peerinfo lookups_peers", numpeers / 30, "s");
 #if START_SERVICE
   if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
     {
index 1446aebaaef5c3d0d99f9e4e1e35a653ac5b94ee..b4d0c77246b8bd063f52eb5722a7d3b9a742ecb2 100644 (file)
@@ -60,8 +60,7 @@ main (int argc, char *argv[])
   printf ("Hash perf took %llu ms\n",
           (unsigned long long)
           GNUNET_TIME_absolute_get_duration (start).rel_value);
-  GAUGER ("Cryptographic hashing_kb/s",
-         1024 * 64 * 1024 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value));
+  GAUGER ("Cryptographic hashing", 1024 * 64 * 1024 / (1+GNUNET_TIME_absolute_get_duration (start).rel_value), "kbs");
   return 0;
 }