set: log set difference estimate
authorFlorian Dold <florian.dold@gmail.com>
Tue, 28 Feb 2017 23:03:51 +0000 (00:03 +0100)
committerFlorian Dold <florian.dold@gmail.com>
Tue, 28 Feb 2017 23:03:51 +0000 (00:03 +0100)
src/set/gnunet-service-set_union.c

index f46713c3102d25b403b3aea2ae369d6915a0e9d0..9ca9961ef99efb86649301874c33584dbe79ed19 100644 (file)
@@ -877,6 +877,8 @@ handle_p2p_strata_estimator (void *cls,
   if (diff > 200)
     diff = diff * 3 / 2; 
 
+
+
   strata_estimator_destroy (remote_se);
   strata_estimator_destroy (op->state->se);
   op->state->se = NULL;
@@ -885,6 +887,17 @@ handle_p2p_strata_estimator (void *cls,
        diff,
        1<<get_order_from_difference (diff));
 
+  {
+    char *set_debug;
+    set_debug = getenv ("GNUNET_SET_BENCHMARK");
+    if ( (NULL != set_debug) && (0 == strcmp (set_debug, "1")) )
+    {
+      FILE *f = fopen ("set.log", "a");
+      fprintf (f, "%llu", (unsigned long long) diff);
+      fclose (f);
+    }
+  }
+
   if ((GNUNET_YES == op->spec->byzantine) && (other_size < op->spec->byzantine_lower_bound))
   {
     GNUNET_break (0);