Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
duration are double in GRAS
[simgrid.git] / include / amok / bandwidth.h
index 271bb9a..a498e9a 100644 (file)
@@ -43,7 +43,7 @@
  *  get the BW between two remote hosts. The elapsed time, as long as the
  *  achieved bandwidth is returned in the last arguments of the functions.
  * 
- *  All sizes are in kilo bytes. The \a buf_size is the size of the buffer
+ *  All sizes are in bytes. The \a buf_size is the size of the buffer
  *   (this is a socket parameter set automatically). The \a exp_size is the
  *   amount of data to send during an experiment. \a msg_size is the size
  *   of each message sent. These values allow you to study phenomenon such
  *   messages of 16k will be sent (so that the total amount of data equals
  *   64k). Of course, you can use other values if you want to.
  * 
+ *  \htmlonly
+ * <img align=center src="amok_bw_test.png" alt="amok bandwidth measurement protocol"><br>
+ * \endhtmlonly
+ * 
  *  \todo Cleanup and implement the link saturation stuff.
  *
  *  @{
@@ -71,46 +75,25 @@ void amok_bw_request(const char* from_name,unsigned int from_port,
                     unsigned long int buf_size,unsigned long int exp_size,unsigned long int msg_size,
             /*OUT*/ double *sec, double*bw);
 
-/** @} */
-#if 0   
+double * amok_bw_matrix(xbt_dynar_t hosts, /* dynar of xbt_host_t */
+                        int buf_size_bw, int exp_size_bw, int msg_size_bw);
 
 /* ***************************************************************************
  * Link saturation
  * ***************************************************************************/
 
-/**
- * grasbw_saturate_start:
- * @from_name: Name of the host we are asking to do a experiment with (to_name:to_port)
- * @from_port: port on which the process we are asking for an experiment is listening
- * (for message, do not give a raw socket here. The needed raw socket will be negociated 
- * between the peers)
- * @to_name: Name of the host with which we should conduct the experiment
- * @to_port: port on which the peer process is listening for message
- * @msgSize: Size of each message sent.
- * @timeout: How long in maximum should be the saturation.
- *
- * Ask the process 'from_name:from_port' to start to saturate the link between itself
- * and to_name:to_name.
- */
-void grasbw_saturate_start(const char* from_name,unsigned int from_port,
-                                 const char* to_name,unsigned int to_port,
-                                 unsigned int msgSize, unsigned int timeout);
-
-/**
- * grasbw_saturate_stop:
- * @from_name: Name of the host we are asking to do a experiment with (to_name:to_port)
- * @from_port: port on which the process we are asking for an experiment is listening
- * (for message, do not give a raw socket here. The needed raw socket will be negociated 
- * between the peers)
- * @to_name: Name of the host with which we should conduct the experiment
- * @to_port: port on which the peer process is listening for message
- *
- * Ask the process 'from_name:from_port' to stop saturating the link between itself
- * and to_name:to_name.
- */
-void grasbw_saturate_stop(const char* from_name,unsigned int from_port,
-                                const char* to_name,unsigned int to_port);
 
+void amok_bw_saturate_start(const char* from_name,unsigned int from_port,
+                           const char* to_name,unsigned int to_port,
+                           unsigned int msg_size, double duration);
+
+void amok_bw_saturate_begin(const char* to_name,unsigned int to_port,
+                           unsigned int msg_size, double duration,
+                           /*out*/ double *elapsed, double *bw);
+
+void amok_bw_saturate_stop(const char* from_name,unsigned int from_port,
+                          /*out*/ unsigned int *time, unsigned int *bw);
+
+/** @} */
 
-#endif /* if 0 */
 #endif /* AMOK_BANDWIDTH_H */