do {
if (*sec>0) {
double meas_duration=*sec;
- request->msg_size = request->msg_size * (min_duration / meas_duration);
+ request->exp_size = request->exp_size * (min_duration / meas_duration) * 1.1;
- DEBUG3("The experiment was too short (%f sec<%f sec). Redo it with msg_size=%ld",
- meas_duration,min_duration,request->msg_size);
+ DEBUG4("The experiment was too short (%f sec<%f sec). Redo it with exp_size=%ld (got %fkb/s)",
+ meas_duration,min_duration,request->exp_size,((double)exp_size) / *sec/1024);
gras_msg_rpccall(peer, 60, gras_msgtype_by_name("BW reask"),&request, NULL);
}
unsigned long int buf_size,
unsigned long int exp_size,
unsigned long int msg_size,
+ double min_duration,
/*OUT*/ double *sec, double*bw) {
gras_socket_t sock;
request->buf_size=buf_size;
request->exp_size=exp_size;
request->msg_size=msg_size;
+ request->min_duration = min_duration;
request->host.name = (char*)to_name;
request->host.port = to_port;
peer = gras_socket_client(request->host.name,request->host.port);
amok_bw_test(peer,
request->buf_size,request->exp_size,request->msg_size,
- 0,
+ request->min_duration,
&(result->sec),&(result->bw));
gras_msg_rpcreturn(240,ctx,&result);
}
double * amok_bw_matrix(xbt_dynar_t hosts,
- int buf_size_bw, int exp_size_bw, int msg_size_bw) {
+ int buf_size_bw, int exp_size_bw, int msg_size_bw,
+ double min_duration) {
double sec;
/* construct of matrixs for bandwith and Latency */
if (i!=j) {
/* Mesurements of Bandwidth */
amok_bw_request(h1->name,h1->port,h2->name,h2->port,
- buf_size_bw,exp_size_bw,msg_size_bw,&sec,&matrix_res[i*len + j]);
+ buf_size_bw,exp_size_bw,msg_size_bw,min_duration,
+ &sec,&matrix_res[i*len + j]);
}
}
}