Ignore:
Timestamp:
04/27/07 14:47:30 (14 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
c20af2a
Parents:
bd4bec9
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
  • tools/tracereport/misc_report.c

    r7be3cc4 rf3576f5  
    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.