gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r13290 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r13290 - gnunet/src/fs
Date: Mon, 18 Oct 2010 13:29:48 +0200

Author: grothoff
Date: 2010-10-18 13:29:48 +0200 (Mon, 18 Oct 2010)
New Revision: 13290

Modified:
   gnunet/src/fs/gnunet-service-fs.c
   gnunet/src/fs/perf_gnunet_service_fs_p2p.c
Log:
stuff

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2010-10-18 05:52:29 UTC (rev 13289)
+++ gnunet/src/fs/gnunet-service-fs.c   2010-10-18 11:29:48 UTC (rev 13290)
@@ -3019,6 +3019,9 @@
   struct PutMessage *pm;
   struct ConnectedPeer *cp;
   struct GNUNET_TIME_Relative cur_delay;
+#if SUPPORT_DELAYS  
+struct GNUNET_TIME_Relative art_delay;
+#endif
   size_t msize;
 
 #if DEBUG_FS
@@ -3210,10 +3213,15 @@
       reply->cont = &transmit_reply_continuation;
       reply->cont_cls = pr;
 #if SUPPORT_DELAYS
+      art_delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS,
+                                                GNUNET_CRYPTO_random_u32 
(GNUNET_CRYPTO_QUALITY_WEAK,
+                                                                          
TTL_DECREMENT));
       reply->delay_until 
-       = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_MILLISECONDS,
-                                                                          
GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
-                                                                               
                     TTL_DECREMENT)));
+       = GNUNET_TIME_relative_to_absolute (art_delay);
+      GNUNET_STATISTICS_update (stats,
+                               gettext_noop ("cummulative artificial delay 
introduced (ms)"),
+                               art_delay.value,
+                               GNUNET_NO);
 #endif
       reply->msize = msize;
       reply->priority = UINT32_MAX; /* send replies first! */

Modified: gnunet/src/fs/perf_gnunet_service_fs_p2p.c
===================================================================
--- gnunet/src/fs/perf_gnunet_service_fs_p2p.c  2010-10-18 05:52:29 UTC (rev 
13289)
+++ gnunet/src/fs/perf_gnunet_service_fs_p2p.c  2010-10-18 11:29:48 UTC (rev 
13290)
@@ -32,7 +32,7 @@
 /**
  * File-size we use for testing.
  */
-#define FILESIZE (1024 * 1024 * 1)
+#define FILESIZE (1024 * 1024 * 10)
 
 /**
  * How long until we give up on transmitting the message?
@@ -82,15 +82,21 @@
  */
 static struct StatValues stats[] =
   {
-    { "fs", "queries forwarded"},
-    { "fs", "replies received and matched"},
-    { "core", "bytes decrypted"},
-    { "core", "bytes encrypted"},
-    { "transport", "bytes received via TCP"},
-    { "transport", "bytes transmitted via TCP"},
-    { "datacache", "bytes stored"},
-    { "dht", "DHT ROUTE Requests Seen"},
-    { "dht", "DHT ROUTE Requests Forwarded"},
+    { "fs", "# queries forwarded"},
+    { "fs", "# replies received and matched"},
+    { "fs", "# results found locally"},
+    { "fs", "# requests forwarded due to high load"},
+    { "fs", "# requests done for free (low load)"},
+    { "fs", "# P2P searches received"},
+    { "fs", "# replies received for local clients"},
+    { "fs", "cummulative artificial delay introduced (ms)"},
+    { "core", "# bytes decrypted"},
+    { "core", "# bytes encrypted"},
+    { "transport", "# bytes received via TCP"},
+    { "transport", "# bytes transmitted via TCP"},
+    { "datacache", "# bytes stored"},
+    { "dht", "# DHT ROUTE Requests Seen"},
+    { "dht", "# DHT ROUTE Requests Forwarded"},
     { NULL, NULL}
   };
 
@@ -114,7 +120,7 @@
 {
   struct StatMaster *sm = cls;
   fprintf (stderr,
-          "Peer %3u: %8s/%40s = %llu\n",
+          "Peer %2u: %12s/%50s = %4llu\n",
           sm->daemon,
           subsystem,
           name,
@@ -154,8 +160,12 @@
   if (stats[sm->value].name != NULL)
     {
       GNUNET_STATISTICS_get (sm->stat,
+#if 0
+                            NULL, NULL, 
+#else
                             stats[sm->value].subsystem,
                             stats[sm->value].name,
+#endif
                             GNUNET_TIME_UNIT_FOREVER_REL,
                             &get_done,
                             &print_stat, sm);
@@ -326,7 +336,7 @@
     GNUNET_GETOPT_OPTION_END
   };
 
-  GNUNET_DISK_directory_remove ("/tmp/gnunet-perf-fs-lib/");
+  GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-lib/");
   GNUNET_log_setup ("perf_gnunet_service_fs_p2p", 
 #if VERBOSE
                    "DEBUG",
@@ -337,7 +347,7 @@
   GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1,
                       argvx, "perf-gnunet-service-fs-p2p",
                      "nohelp", options, &run, NULL);
-  GNUNET_DISK_directory_remove ("/tmp/gnunet-perf-fs-lib/");
+  GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-lib/");
   return ok;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]