Changeset d242ea8 for tools/tracestats/tracestats.c
- Timestamp:
- 02/07/07 16:46:43 (15 years ago)
- 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:
- 43ab7b3
- Parents:
- 205809b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/tracestats/tracestats.c
rd5a27e8 rd242ea8 100 100 101 101 for(i=0;i<filter_count;++i) { 102 if(trace_apply_filter(filters[i].filter,packet)) { 102 if (filters[i].filter == NULL) 103 continue; 104 if(trace_apply_filter(filters[i].filter,packet) > 0) { 103 105 ++filters[i].count; 104 106 filters[i].bytes+=trace_get_wire_length(packet); 107 } 108 if (trace_is_err(trace)) { 109 trace_perror(trace, "trace_apply_filter"); 110 fprintf(stderr, "Removing filter from filterlist\n"); 111 filters[i].filter = NULL; 105 112 } 106 113 } … … 110 117 } 111 118 119 printf("%-30s\t%12s\t%12s\t%7s\n","filter","count","bytes","%"); 112 120 for(i=0;i<filter_count;++i) { 113 121 printf("%30s:\t%12"PRIu64"\t%12"PRIu64"\t%7.03f\n",filters[i].expr,filters[i].count,filters[i].bytes,filters[i].count*100.0/count); … … 165 173 } 166 174 167 printf("%-30s\t%12s\t%12s\t%7s\n","filter","count","bytes","%");168 175 for(i=optind;i<argc;++i) { 169 176 run_trace(argv[i]);
Note: See TracChangeset
for help on using the changeset viewer.