Ignore:
Timestamp:
04/27/07 14:47:30 (6 years ago)
Author:
spa1
Message:

misc and port reports now write to files - all reports now do so
Changed almost all the %llu format strings to use PRIu64 which should reduce the warnings on 64 bit machines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/tracereport/misc_report.c

    r1191 r1204  
    6969void misc_report(void) 
    7070{ 
    71         printf("# Misc\n"); 
    72         printf("Start time: %.04f (%s)\n",starttime,ts_to_date(starttime)); 
    73         printf("End time: %.04f (%s)\n",endtime,ts_to_date(endtime)); 
    74         printf("Duration: %.04f (%s)\n",endtime-starttime, 
     71        FILE *out = fopen("misc.rpt", "w"); 
     72        if (!out) { 
     73                perror("fopen"); 
     74                return; 
     75        } 
     76        fprintf(out, "Start time: %.04f (%s)\n",starttime,ts_to_date(starttime)); 
     77        fprintf(out, "End time: %.04f (%s)\n",endtime,ts_to_date(endtime)); 
     78        fprintf(out, "Duration: %.04f (%s)\n",endtime-starttime, 
    7579                        duration(endtime-starttime)); 
    76         printf("Total Packets: %" PRIu64 "\n",packets); 
    77         printf("Average packet rate: %.02f packets/sec\n", 
     80        fprintf(out, "Total Packets: %" PRIu64 "\n",packets); 
     81        fprintf(out, "Average packet rate: %.02f packets/sec\n", 
    7882                        packets/(endtime-starttime)); 
    7983} 
Note: See TracChangeset for help on using the changeset viewer.