Lines 261-267
Link Here
|
261 |
// |
261 |
// |
262 |
fprintf (_fp, "Data Structure Sizes (in bytes)\n"); |
262 |
fprintf (_fp, "Data Structure Sizes (in bytes)\n"); |
263 |
fprintf (_fp, "-------------------------------\n"); |
263 |
fprintf (_fp, "-------------------------------\n"); |
264 |
fprintf (_fp, "id_t:%d aoi_t:%d msgtype_t:%d timestamp_t:%d Point:%d Node:%d Addr:%d\n\n\n", sizeof(VAST::id_t), sizeof(aoi_t), sizeof(msgtype_t), sizeof(timestamp_t), sizeof(Position), sizeof(Node), sizeof(Addr)); |
264 |
fprintf (_fp, "id_t:%ld aoi_t:%ld msgtype_t:%ld timestamp_t:%ld Point:%ld Node:%ld Addr:%ld\n\n\n", sizeof(VAST::id_t), sizeof(aoi_t), sizeof(msgtype_t), sizeof(timestamp_t), sizeof(Position), sizeof(Node), sizeof(Addr)); |
265 |
|
265 |
|
266 |
fprintf (_fp, "Simulation Parameters\n"); |
266 |
fprintf (_fp, "Simulation Parameters\n"); |
267 |
fprintf (_fp, "---------------------\n"); |
267 |
fprintf (_fp, "---------------------\n"); |
Lines 391-412
Link Here
|
391 |
fprintf (_fp, "%3.4f%%\t", (float)consistency * 100); |
391 |
fprintf (_fp, "%3.4f%%\t", (float)consistency * 100); |
392 |
|
392 |
|
393 |
// Send / Recv |
393 |
// Send / Recv |
394 |
fprintf (_fp, "%6d %-6d ", total_send/num_nodes, max_send_per_sec); |
394 |
fprintf (_fp, "%6d %-6ld ", total_send/num_nodes, max_send_per_sec); |
395 |
fprintf (_fp, "%6d %-6d ", total_recv/num_nodes, max_recv_per_sec); |
395 |
fprintf (_fp, "%6d %-6ld ", total_recv/num_nodes, max_recv_per_sec); |
396 |
|
396 |
|
397 |
// added by yuli ==================================================== |
397 |
// added by yuli ==================================================== |
398 |
|
398 |
|
399 |
// Defalted Send / Recv |
399 |
// Defalted Send / Recv |
400 |
if (_para.VAST_MODEL == VAST_MODEL_MULTICAST) |
400 |
if (_para.VAST_MODEL == VAST_MODEL_MULTICAST) |
401 |
{ |
401 |
{ |
402 |
fprintf (_fp, "%8d %-8d ", total_def_send/num_nodes, max_def_send_per_sec); |
402 |
fprintf (_fp, "%8ld %-8ld ", total_def_send/num_nodes, max_def_send_per_sec); |
403 |
fprintf (_fp, "%8d %-8d ", total_def_recv/num_nodes, max_def_recv_per_sec); |
403 |
fprintf (_fp, "%8ld %-8ld ", total_def_recv/num_nodes, max_def_recv_per_sec); |
404 |
} |
404 |
} |
405 |
|
405 |
|
406 |
// ================================================================== |
406 |
// ================================================================== |
407 |
|
407 |
|
408 |
// RS |
408 |
// RS |
409 |
fprintf (_fp, "%3.3f %-3d ", (_recovery_count > 0 ? (double)_recovery_steps/(double)_recovery_count : 0), _max_RS); |
409 |
fprintf (_fp, "%3.3f %-3ld ", (_recovery_count > 0 ? (double)_recovery_steps/(double)_recovery_count : 0), _max_RS); |
410 |
|
410 |
|
411 |
// drift distance |
411 |
// drift distance |
412 |
fprintf (_fp, "%3.3f %-3d ", (double)_total_drift / (double)_drift_nodes, (int)_max_drift); |
412 |
fprintf (_fp, "%3.3f %-3d ", (double)_total_drift / (double)_drift_nodes, (int)_max_drift); |
Lines 418-430
Link Here
|
418 |
fprintf (_fp, "%3.3f %-3d ", (double)total_CN/(double)num_nodes, max_CN); |
418 |
fprintf (_fp, "%3.3f %-3d ", (double)total_CN/(double)num_nodes, max_CN); |
419 |
|
419 |
|
420 |
// AN |
420 |
// AN |
421 |
fprintf (_fp, "%3.3f %-3d ", (double)_total_AN_visible/(double)num_samples, _max_AN); |
421 |
fprintf (_fp, "%3.3f %-3ld ", (double)_total_AN_visible/(double)num_samples, _max_AN); |
422 |
|
422 |
|
423 |
// RC |
423 |
// RC |
424 |
fprintf (_fp, "%3d %3d %3.2f%% ", _recovery_count, _inconsistent_count, (_inconsistent_count > 0 ? ((double)_recovery_count/(double)_inconsistent_count*100): 0)); |
424 |
fprintf (_fp, "%3ld %3ld %3.2f%% ", _recovery_count, _inconsistent_count, (_inconsistent_count > 0 ? ((double)_recovery_count/(double)_inconsistent_count*100): 0)); |
425 |
|
425 |
|
426 |
// TC actual data |
426 |
// TC actual data |
427 |
fprintf (_fp, " %7d %7d\n", _total_AN_visible, _total_AN_actual); |
427 |
fprintf (_fp, " %7ld %7ld\n", _total_AN_visible, _total_AN_actual); |
428 |
|
428 |
|
429 |
// store accumulated data |
429 |
// store accumulated data |
430 |
_AN_visible_accumulated += _total_AN_visible; |
430 |
_AN_visible_accumulated += _total_AN_visible; |
Lines 478-484
Link Here
|
478 |
double consistency = (double)_AN_visible_accumulated / (double)_AN_actual_accumulated; |
478 |
double consistency = (double)_AN_visible_accumulated / (double)_AN_actual_accumulated; |
479 |
|
479 |
|
480 |
fprintf (_fp, "\n\nSummary\n-------\n"); |
480 |
fprintf (_fp, "\n\nSummary\n-------\n"); |
481 |
fprintf (_fp, "Total elapsed time (seconds): %d stablized_steps: %d run_steps: %d\n", (int)(time (NULL)-_starttime), _steps_stablized, _steps); |
481 |
fprintf (_fp, "Total elapsed time (seconds): %d stablized_steps: %ld run_steps: %ld\n", (int)(time (NULL)-_starttime), _steps_stablized, _steps); |
482 |
fprintf (_fp, "Topology Consistency (overall): %3.4f%%\n", consistency * 100); |
482 |
fprintf (_fp, "Topology Consistency (overall): %3.4f%%\n", consistency * 100); |
483 |
consistency = (double)(_AN_visible_accumulated-_AN_visible_first_interval) / (double)(_AN_actual_accumulated - _AN_actual_first_interval); |
483 |
consistency = (double)(_AN_visible_accumulated-_AN_visible_first_interval) / (double)(_AN_actual_accumulated - _AN_actual_first_interval); |
484 |
fprintf (_fp, "Topology Consistency (after stablized): %3.4f%%\n\n", consistency * 100); |
484 |
fprintf (_fp, "Topology Consistency (after stablized): %3.4f%%\n\n", consistency * 100); |
Lines 490-496
Link Here
|
490 |
// transmission size stat |
490 |
// transmission size stat |
491 |
// |
491 |
// |
492 |
|
492 |
|
493 |
fprintf (_fp, "\ntransmission size (total # of bytes over %d steps)\n\n", _steps); |
493 |
fprintf (_fp, "\ntransmission size (total # of bytes over %ld steps)\n\n", _steps); |
494 |
if (_para.VAST_MODEL == VAST_MODEL_DIRECT) |
494 |
if (_para.VAST_MODEL == VAST_MODEL_DIRECT) |
495 |
fprintf (_fp, " send recv DISCONNCT ID QUERY HELLO EN MOVE MOVE_B NODE OVERCAP PAYLOAD\n"); |
495 |
fprintf (_fp, " send recv DISCONNCT ID QUERY HELLO EN MOVE MOVE_B NODE OVERCAP PAYLOAD\n"); |
496 |
else if (_para.VAST_MODEL == VAST_MODEL_MULTICAST) |
496 |
else if (_para.VAST_MODEL == VAST_MODEL_MULTICAST) |
Lines 499-505
Link Here
|
499 |
for (i=0; i<(int)_simnodes.size (); i++) |
499 |
for (i=0; i<(int)_simnodes.size (); i++) |
500 |
{ |
500 |
{ |
501 |
SimNode *node = _simnodes[i]; |
501 |
SimNode *node = _simnodes[i]; |
502 |
fprintf (_fp, "[%4d] %10d %10d\t%s\n", (int)node->get_id (), node->accumulated_send (), node->accumulated_recv (), node->vnode->getstat ()); |
502 |
fprintf (_fp, "[%4d] %10ld %10ld\t%s\n", (int)node->get_id (), node->accumulated_send (), node->accumulated_recv (), node->vnode->getstat ()); |
503 |
} |
503 |
} |
504 |
|
504 |
|
505 |
// |
505 |
// |