gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 79/164: Added perf monitoring of operation mode


From: gnunet
Subject: [gnunet] 79/164: Added perf monitoring of operation mode
Date: Fri, 30 Jul 2021 15:32:25 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit a6835036cc64681708739b2785688565971bcd25
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Tue May 11 17:08:51 2021 +0200

    Added perf monitoring of operation mode
---
 src/setu/gnunet-service-setu.c | 31 +++++++++++++++++--------------
 src/setu/perf_setu_api.c       |  2 +-
 2 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index d52a75149..9e9a9cbbd 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -464,10 +464,15 @@ struct Operation
 
    unsigned int active_passive_switches;
 
-   /*
+   /**
     * Local peer element count
     */
     uint32_t local_element_count;
+
+    /**
+     * Mode of operation that was chosen by the algorithm
+     */
+    uint8_t mode_of_operation;
 };
 
 
@@ -726,6 +731,7 @@ struct perf_rtt_struct
     int se_diff_remote;
     int se_diff_local;
     int active_passive_switches;
+    uint8_t mode_of_operation;
 };
 
 struct perf_rtt_struct perf_rtt;
@@ -857,7 +863,7 @@ calculate_perf_rtt() {
 
 
     FILE *out1 = fopen("perf_failure_bucket_number_factor.csv", "a");
-    fprintf(out1, 
"%d,%f,%d,%d,%f,%d,%d,%d,%d\n",num_per_bucket,factor,decoded,ibf_bytes_transmitted,rtt,perf_rtt.se_diff,bytes_transmitted,perf_rtt.se_diff_local,perf_rtt.se_diff_remote);
+    fprintf(out1, 
"%d,%f,%d,%d,%f,%d,%d,%d,%d,%d\n",num_per_bucket,factor,decoded,ibf_bytes_transmitted,rtt,perf_rtt.se_diff,bytes_transmitted,perf_rtt.se_diff_local,perf_rtt.se_diff_remote,
 perf_rtt.mode_of_operation);
     fclose(out1);
 
 
@@ -1779,12 +1785,9 @@ handle_union_p2p_strata_estimator (void *cls,
   uint64_t total_decoded = remote_elements_decoded + local_elements_decoded;
   uint64_t diff_remote = ((float)remote_elements_decoded / 
(float)total_decoded) * diff;
   uint64_t diff_local = ((float)local_elements_decoded / (float)total_decoded) 
* diff;
-  perf_rtt.se_diff_local = diff_local;
-  perf_rtt.se_diff_remote = diff_remote;
-  perf_rtt.se_diff = diff;
 
 
-  uint8_t mode_of_operation = estimate_best_mode_of_operation(32,
+  op->mode_of_operation = estimate_best_mode_of_operation(32,
                                                               
GNUNET_CONTAINER_multihashmap_size (
                                                                       
op->set->content->elements),
                                                               
op->remote_element_count,
@@ -1793,6 +1796,10 @@ handle_union_p2p_strata_estimator (void *cls,
                                                               0,
                                                               
op->ibf_bucket_number_factor);
 
+  perf_rtt.se_diff_local = diff_local;
+  perf_rtt.se_diff_remote = diff_remote;
+  perf_rtt.se_diff = diff;
+  perf_rtt.mode_of_operation = op->mode_of_operation;
 
   strata_estimator_destroy (remote_se);
   strata_estimator_destroy (op->se);
@@ -1828,10 +1835,10 @@ handle_union_p2p_strata_estimator (void *cls,
    * Added rtt_bandwidth_tradeoff directly need future improvements
    */
   if ((GNUNET_YES == op->force_full) ||
-      ( mode_of_operation != DIFFERENTIAL_SYNC) ||
+      ( op->mode_of_operation != DIFFERENTIAL_SYNC) ||
       (0 == other_size))
   {
-    LOG (GNUNET_ERROR_TYPE_ERROR,
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Deciding to go for full set transmission (diff=%d, own set=%llu)\n",
          diff,
          (unsigned long long) op->initial_size);
@@ -1839,18 +1846,16 @@ handle_union_p2p_strata_estimator (void *cls,
                               "# of full sends",
                               1,
                               GNUNET_NO);
-    if ((mode_of_operation == FULL_SYNC_LOCAL_SENDING_FIRST) ||
+    if ((op->mode_of_operation == FULL_SYNC_LOCAL_SENDING_FIRST) ||
         (0 == other_size))
     {
-        LOG (GNUNET_ERROR_TYPE_ERROR,
-             "SENDING OWN SET\n");
       send_full_set (op);
     }
     else
     {
       struct GNUNET_MQ_Envelope *ev;
 
-      LOG (GNUNET_ERROR_TYPE_ERROR,
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
            "Telling other peer that we expect its full set\n");
       op->phase = PHASE_FULL_RECEIVING;
       perf_rtt.request_full.sent += 1;
@@ -1862,8 +1867,6 @@ handle_union_p2p_strata_estimator (void *cls,
   }
   else
   {
-      LOG (GNUNET_ERROR_TYPE_ERROR,
-           "DIFFERENTIAL\n");
     GNUNET_STATISTICS_update (_GSS_statistics,
                               "# of ibf sends",
                               1,
diff --git a/src/setu/perf_setu_api.c b/src/setu/perf_setu_api.c
index ddc9fb297..a3df3d157 100644
--- a/src/setu/perf_setu_api.c
+++ b/src/setu/perf_setu_api.c
@@ -404,7 +404,7 @@ run (void *cls,
                 "Running real set-reconciliation\n");
     //init_set1 ();
     // limit ~23800 element total
-    initRandomSets(100, 500,500,32);
+    initRandomSets(0, 500,500,32);
 }
 
 void perf_thread() {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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