|
@@ -121,9 +121,15 @@ void pcap_processor::collect_statistics() {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
- SnifferIterator lastpkt;
|
|
|
- for (SnifferIterator j = snifferOverview.begin(); j != snifferOverview.end(); j++) {lastpkt = j;}
|
|
|
+
|
|
|
+ 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;}
|
|
|
+ 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;
|
|
|
+ std::cout<< "empty loop: " << duration << " sec" << std::endl;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|