Changeset a7132cf
 Timestamp:
 11/20/18 15:52:18 (4 years ago)
 Branches:
 develop
 Children:
 5c46b9c
 Parents:
 7395b09
 Location:
 examples/stats
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

examples/stats/ipdistgenplot.py
r7395b09 ra7132cf 200 200 plot.stdin.write("set ylabel 'Cumulative %'\n") 201 201 plot.stdin.write("set xrange[0:255]\n") 202 plot.stdin.write("set xtics 0,10,255\n") 202 203 plot.stdin.write("set key off\n") 203 204 for x in range(len(dataFiles)): … … 217 218 plot.stdin.write("set ylabel 'Cumulative %'\n") 218 219 plot.stdin.write("set xrange[0:255]\n") 220 plot.stdin.write("set xtics 0,10,255\n") 219 221 plot.stdin.write("set key off\n") 220 222 for x in range(len(dataFiles)): … … 230 232 plot.stdin.write("\n") 231 233 232 plot.stdin.write("set title ' Timeseries mean skewness'\n")234 plot.stdin.write("set title 'Skew octet " + str(i+1) + "'\n") 233 235 plot.stdin.write("set yrange[1:1]\n") 234 plot.stdin.write("set xlabel 'Time stamp'\n")236 plot.stdin.write("set xlabel 'Time'\n") 235 237 plot.stdin.write("set ylabel 'Skewness'\n") 236 238 plot.stdin.write("set autoscale x\n") 
examples/stats/ipdistparallel.c
rd83b5e72 ra7132cf 26 26 /* Pointer to stats structure */ 27 27 struct addr_stats *stats; 28 uint64_t lost_packets; 28 29 }; 29 30 struct addr_stats { … … 400 401 tally>stats>skewness_dst[i] = 0; 401 402 } 403 tally>lost_packets = 0; 402 404 tally>lastkey = 0; 403 405 tally>packets = 0; … … 426 428 427 429 /* Finaly output the results */ 428 printf("Generating output \"%s/ipdist%lu\" \n", stats_outputdir, tick);430 printf("Generating output \"%s/ipdist%lu\" Packets lost: %lu\n", stats_outputdir, tick, tally>lost_packets); 429 431 430 432 /* Output the results */ … … 495 497 } 496 498 tally>packets += results>packets; 499 500 /* Increment lost packets counter */ 501 struct libtrace_stat_t *statistics = trace_get_statistics(trace, NULL); 502 if(statistics>dropped > tally>lost_packets) { 503 /* update lost packets to the new number of dropped packets */ 504 tally>lost_packets = statistics>dropped; 505 } 497 506 498 507 /* If the current timestamp is greater than the last printed plus the interval, output a result */
Note: See TracChangeset
for help on using the changeset viewer.