Changeset 3d4fb8f for tools/tracertstats
- Timestamp:
- 03/13/06 11:01:18 (16 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:
- 32f365f
- Parents:
- 8f80e87
- Location:
- tools/tracertstats
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/tracertstats/output_csv.c
re3b0188 r3d4fb8f 46 46 47 47 struct output_type_t output_csv = { 48 name:"csv",49 init:output_csv_init,50 flush:output_csv_flush,51 destroy:output_csv_destroy,48 .name= "csv", 49 .init= output_csv_init, 50 .flush= output_csv_flush, 51 .destroy= output_csv_destroy, 52 52 }; -
tools/tracertstats/output_html.c
re3b0188 r3d4fb8f 65 65 66 66 struct output_type_t output_html = { 67 name:"html",68 init:output_html_init,69 flush:output_html_flush,70 destroy:output_html_destroy,67 .name= "html", 68 .init= output_html_init, 69 .flush= output_html_flush, 70 .destroy= output_html_destroy, 71 71 }; -
tools/tracertstats/output_png.c
re3b0188 r3d4fb8f 76 76 77 77 struct output_type_t output_png = { 78 name:"png",79 init:output_png_init,80 flush:output_png_flush,81 destroy:output_png_destroy,78 .name= "png", 79 .init= output_png_init, 80 .flush= output_png_flush, 81 .destroy= output_png_destroy, 82 82 }; -
tools/tracertstats/output_txt.c
re3b0188 r3d4fb8f 4 4 #include <inttypes.h> 5 5 #include <lt_inttypes.h> 6 #include <string.h> 6 7 7 8 #define COLWIDTH 11 … … 53 54 54 55 struct output_type_t output_txt = { 55 name:"txt",56 init:output_txt_init,57 flush:output_txt_flush,58 destroy:output_txt_destroy,56 .name= "txt", 57 .init= output_txt_init, 58 .flush= output_txt_flush, 59 .destroy= output_txt_destroy, 59 60 }; -
tools/tracertstats/tracertstats.c
rd56089a r3d4fb8f 29 29 */ 30 30 31 / /32 // This program takes a series of traces and bpf filters and outputs how many 33 // bytes/packets every time interval 31 /* This program takes a series of traces and bpf filters and outputs how many 32 * bytes/packets every time interval 33 */ 34 34 35 35 #include <stdio.h> … … 98 98 double ts = 0; 99 99 100 output=output_init(uri,output_format? :"txt");101 output_add_column(output," unix_time");100 output=output_init(uri,output_format?output_format:"txt"); 101 output_add_column(output,"ts"); 102 102 output_add_column(output,"packets"); 103 103 output_add_column(output,"bytes"); … … 113 113 114 114 trace = trace_create(uri); 115 if (trace_is_err(trace)) { 116 trace_perror(trace,"trace_create"); 117 trace_destroy(trace); 118 output_destroy(output); 119 return; 120 } 121 if (trace_start(trace)==-1) { 122 trace_perror(trace,"trace_start"); 123 trace_destroy(trace); 124 output_destroy(output); 125 return; 126 } 115 127 116 128 for (;;) { … … 141 153 } 142 154 143 if (count > packet_count) {155 if (count >= packet_count) { 144 156 report_results(ts,count,bytes); 145 157 count=0;
Note: See TracChangeset
for help on using the changeset viewer.