Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make a log message more explicit
[simgrid.git] / src / amok / Bandwidth / saturate.c
index 1f5e2d8..bdd42d9 100644 (file)
@@ -186,7 +186,7 @@ void amok_bw_saturate_begin(const char* to_name,unsigned int to_port,
     elapsed=gras_os_time()-start;
     VERB2("elapsed %f duration %f",elapsed, duration);
 
-  } while (duration==0 || (saturate_further && elapsed < duration));
+  } while (saturate_further && (duration==0 || elapsed < duration));
 
   bw = ((double)(packet_sent*msg_size)) / elapsed;
 
@@ -227,6 +227,7 @@ static int amok_bw_cb_sat_begin(gras_msg_cb_ctx_t ctx, void *payload){
   volatile int saturate_further = 1;
   xbt_ex_t e;
   gras_socket_t measMaster=NULL,meas=NULL;
+  gras_socket_t from=gras_msg_cb_ctx_from(ctx);
 
   int port=6000;
   while (port <= 10000 && measMaster == NULL) {
@@ -267,7 +268,10 @@ static int amok_bw_cb_sat_begin(gras_msg_cb_ctx_t ctx, void *payload){
       xbt_ex_free(e);
     }
   }
-  INFO1("Saturation stopped on %s",gras_os_myname());
+  INFO3("Saturation comming from %s:%d stopped on %s",
+       gras_socket_peer_name(from),gras_socket_peer_port(from),
+       gras_os_myname());
+
   gras_socket_close(meas);
   if (gras_if_RL()) /* On SG, accepted=master */
     gras_socket_close(measMaster);