+ double increase;
+ if (*sec != 0.0 ) {
+ increase = (min_duration / meas_duration) * 1.1;
+ } else {
+ increase = 4;
+ }
+ /* Do not increase the exp size too fast since our decision would be based on wrong measurements*/
+ if (increase > 20)
+ increase = 20;
+
+ request->msg_size = request->msg_size * increase;
+
+ /* Do not do too large experiments messages or the sensors
+ will start to swap to store one of them.
+ And then increase the number of messages to compensate */
+ if (request->msg_size > 64*1024*1024) {
+ nb_messages = ( (request->msg_size / ((double)64*1024*1024))
+ * nb_messages ) + 1;
+ request->msg_size = 64*1024*1024;
+ }
+
+ VERB6("The experiment was too short (%f sec<%f sec). Redo it with exp_size=%lu msg_size=%lu (nb_messages=%d) (got %fkb/s)",
+ meas_duration, min_duration,
+ request->exp_size, request->msg_size, nb_messages,
+ ((double)request->exp_size) / *sec/1024);
+
+ xbt_assert0(request->exp_size > request->msg_size * nb_messages,
+ "Overflow on the experiment size! You must have a *really* fat pipe. Please fix your platform");
+ request->exp_size = request->msg_size * nb_messages;
+