port 0 for tcp plugin is BAD
[oweals/gnunet.git] / src / datacache / perf_datacache.c
index 10efa5eee99db89ffe4c000fb1663b7c5945e97c..f325740199e503981b33d773dc7326012652a800 100644 (file)
@@ -46,7 +46,7 @@ static int
 checkIt (void *cls,
         struct GNUNET_TIME_Absolute exp,
         const GNUNET_HashCode * key,
-         uint32_t size, 
+         size_t size, 
         const char *data, 
         enum GNUNET_BLOCK_Type type)
 {
@@ -59,7 +59,6 @@ checkIt (void *cls,
 
 static void
 run (void *cls,
-     struct GNUNET_SCHEDULER_Handle *sched,
      char *const *args,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
@@ -72,8 +71,7 @@ run (void *cls,
   unsigned int i;
   
   ok = 0;
-  h = GNUNET_DATACACHE_create (sched,
-                              cfg,
+  h = GNUNET_DATACACHE_create (cfg,
                               "perfcache");
 
   if (h == NULL)
@@ -84,7 +82,7 @@ run (void *cls,
     }
   exp = GNUNET_TIME_absolute_get ();
   start = exp;
-  exp.value += 5 * 60 * 1000;
+  exp.abs_value += 5 * 60 * 1000;
   memset (&k, 0, sizeof (GNUNET_HashCode));
   for (i = 0; i < ITERATIONS; i++)
     {
@@ -102,7 +100,7 @@ run (void *cls,
   fprintf (stderr, "\n");
   fprintf (stdout, "Stored %u items in %llums\n",
           ITERATIONS,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration(start).value);
+          (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value);
   start = GNUNET_TIME_absolute_get ();
   memset (&k, 0, sizeof (GNUNET_HashCode));
   for (i = 0; i < ITERATIONS; i++)
@@ -117,7 +115,7 @@ run (void *cls,
   fprintf (stderr, "\n");
   fprintf (stdout, "Found %u/%u items in %llums (%u were deleted during storage processing)\n",
           found, ITERATIONS,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration(start).value,
+          (unsigned long long) GNUNET_TIME_absolute_get_duration(start).rel_value,
           ITERATIONS - found);
           
   GNUNET_DATACACHE_destroy (h);