|
@@ -121,10 +121,10 @@ void pcap_processor::collect_statistics() {
|
|
//int timeIntervalCounter = 1;
|
|
//int timeIntervalCounter = 1;
|
|
//int timeIntervalsNum = 100;
|
|
//int timeIntervalsNum = 100;
|
|
//std::chrono::microseconds intervalStartTimestamp = stats.getTimestampFirstPacket();
|
|
//std::chrono::microseconds intervalStartTimestamp = stats.getTimestampFirstPacket();
|
|
- //std::chrono::microseconds firstTimestamp = stats.getTimestampFirstPacket();
|
|
|
|
|
|
+ //std::chrono::microseconds firstTimestamp = stats.getTimestampFirstPacket();
|
|
std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
|
|
std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
|
|
- SnifferIterator lastpkt; //
|
|
|
|
- for (SnifferIterator j = snifferOverview.begin(); j != snifferOverview.end(); (((((((((j++)++)++)++)++)++)++)++)++)++) {lastpkt = j;}
|
|
|
|
|
|
+ SnifferIterator lastpkt;
|
|
|
|
+ for (SnifferIterator j = snifferOverview.begin(); j != snifferOverview.end(); snifferIteratorIncrement(j)) {lastpkt = j;}
|
|
std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();
|
|
std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();
|
|
auto duration = std::chrono::duration_cast<std::chrono::microseconds>( t2 - t1 ).count()*1e-6;
|
|
auto duration = std::chrono::duration_cast<std::chrono::microseconds>( t2 - t1 ).count()*1e-6;
|
|
std::cout<< "empty loop: " << duration << " sec" << std::endl;
|
|
std::cout<< "empty loop: " << duration << " sec" << std::endl;
|