exponential back-off
authorChristian Grothoff <christian@grothoff.org>
Mon, 25 Jul 2011 15:20:48 +0000 (15:20 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 25 Jul 2011 15:20:48 +0000 (15:20 +0000)
src/fs/gnunet-service-fs_pe.c
src/fs/gnunet-service-fs_pr.c
src/nse/test_nse.conf
src/nse/test_nse_multipeer.c

index b62c20005257fe6b73413470f385437db0ef71c4..b52e04712cb1df02ed3eec547252514898cb6eb1 100644 (file)
@@ -159,10 +159,13 @@ plan (struct PeerPlan *pp,
                         total_delay * 1000LL / plan_count,
                         GNUNET_NO);
   prd = GSF_pending_request_get_data_ (rp->pr);
-  // FIXME: calculate 'rp->earliest_transmission'!
-  // FIXME: claculate 'rp->priority'!  
-  delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
-                                        rp->transmission_counter);
+  // FIXME: calculate 'rp->priority'!  
+  if (rp->transmission_counter < 32)
+    delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                          1LL << rp->transmission_counter);
+  else
+    delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
+                                          UINT_MAX);
   rp->earliest_transmission 
     = GNUNET_TIME_relative_to_absolute (delay);
 #if DEBUG_FS
index fb4c7ec9eeaf02d3c59e571b67794e20f81d7762..37865d91336c5497ede420ac90337cc2376b2b66 100644 (file)
@@ -305,6 +305,10 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
              GNUNET_h2s (query),
              type);
 #endif 
+  GNUNET_STATISTICS_update (GSF_stats,
+                           gettext_noop ("# Pending requests created"),
+                           1,
+                           GNUNET_NO);
   pr = GNUNET_malloc (sizeof (struct GSF_PendingRequest));
   pr->local_result_offset = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
                                                      UINT64_MAX);                                                       
index d8440e904db0646983340beee32056f642e98bd4..475f87eaf23cbbe9821e472f1f223faecc6e4307 100644 (file)
@@ -15,8 +15,8 @@ CONFIG = $DEFAULTCONFIG
 # Overriding network settings for faster testing (do NOT use
 # these values in production just because they are here)
 WORKDELAY = 1
-INTERVAL = 15000
-WORKBITS = 8
+INTERVAL = 120000
+WORKBITS = 1
 
 HISTOGRAM = $SERVICEHOME/nse-histogram
 
@@ -58,7 +58,7 @@ EXTERNAL_ADDRESS = 127.0.0.1
 AUTOSTART = NO
 
 [testing]
-NUM_PEERS = 50
+NUM_PEERS = 100
 WEAKRANDOM = YES
 TOPOLOGY = NONE
 CONNECT_TOPOLOGY = SMALL_WORLD_RING
index 97db91fd30fa03a6e15faf6162dcbbaf6c9aa11e..277f73b21edbc07e574aef2040bcc3ab629fb1da 100644 (file)
@@ -51,7 +51,7 @@ struct NSEPeer *peer_tail;
 /**
  * How long do we run the test?
  */
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 30)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 60)
 
 static int ok;
 
@@ -270,6 +270,7 @@ check ()
   return ok;
 }
 
+
 int
 main (int argc, char *argv[])
 {