fx
authorChristian Grothoff <christian@grothoff.org>
Sat, 25 Jul 2009 10:30:50 +0000 (10:30 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 25 Jul 2009 10:30:50 +0000 (10:30 +0000)
src/datastore/gnunet-service-datastore.c
src/datastore/perf_datastore_api.c
src/datastore/test_datastore_api_data.conf

index cedad3649e657f3bb056e9001472fae8234d4d09..77047dc8a14a7867bff45a381e20bbe04334d985 100644 (file)
@@ -276,6 +276,11 @@ expired_processor (void *cls,
       return GNUNET_SYSERR;
     }
   plugin->api->next_request (next_cls, GNUNET_NO);
+#if DEBUG_DATASTORE
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Deleting content that expired %llu ms ago\n",
+             (unsigned long long) (now.value - expiration.value));
+#endif
   return GNUNET_NO; /* delete */
 }
 
@@ -345,6 +350,12 @@ manage (void *cls,
     *need -= size + GNUNET_DATASTORE_ENTRY_OVERHEAD;
   plugin->api->next_request (next_cls, 
                             (0 == *need) ? GNUNET_YES : GNUNET_NO);
+#if DEBUG_DATASTORE
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Deleting %llu bytes of low-priority content (still trying to recover %llu bytes)\n",
+             size + GNUNET_DATASTORE_ENTRY_OVERHEAD,
+             *need);
+#endif
   return GNUNET_NO;
 }
 
@@ -366,6 +377,11 @@ manage_space (unsigned long long need)
 {
   unsigned long long *n;
 
+#if DEBUG_DATASTORE
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Asked to recover %llu bytes of cache space\n",
+             need);
+#endif
   n = GNUNET_malloc (sizeof(unsigned long long));
   *n = need;
   plugin->api->iter_low_priority (plugin->api->cls,
@@ -416,10 +432,6 @@ transmit_callback (void *cls,
     tcc->tc (tcc->tc_cls, GNUNET_OK);
   if (GNUNET_YES == tcc->end)
     {
-#if DEBUG_DATASTORE
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                 "Request completed, ready for the next request!\n");
-#endif
       GNUNET_SERVER_receive_done (tcc->client, GNUNET_OK);
     }
   else
index d488cef4cf5f7b7478fc85f2e372bd702d3a2acf..5a966358db4131a642bac242cf5c9ff79a62d73c 100644 (file)
@@ -380,7 +380,7 @@ main (int argc, char *argv[])
   GNUNET_DISK_directory_remove ("/tmp/test-gnunetd-datastore");
   GNUNET_log_setup ("perf-datastore-api",
 #if VERBOSE
-                    "DEBUG",
+                   "DEBUG",
 #else
                     "WARNING",
 #endif
index 849c322c9c8384b2e33fe26f52889b58df3099d8..815bce0b808a0fac275b2526d92719b8b1df12a4 100644 (file)
@@ -10,7 +10,7 @@ BINARY = gnunet-service-datastore
 ACCEPT_FROM = 127.0.0.1;
 ACCEPT_FROM6 = ::1;
 ALLOW_SHUTDOWN = YES
-QUOTA = 1000000
+QUOTA = 10000000
 BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
 DATABASE = sqlite
 # USERNAME =