Ignore:
Timestamp:
07/30/14 19:17:14 (7 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
f9a70ca
Parents:
a49a9eb
Message:

Fixs statistic counters for parallel traces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace_parallel.c

    ra49a9eb rbe3f75b  
    279279        t->recorded_first = false;
    280280        t->perpkt_num = -1;
     281        t->accepted_packets = 0;
    281282}
    282283
     
    12481249                                                libtrace->snaplen);
    12491250                        }
    1250                         trace_packet_set_order(packet, libtrace->accepted_packets);
    1251                         ++libtrace->accepted_packets;
     1251                       
     1252                        ++t->accepted_packets;
     1253                        // TODO look into this better
     1254                        trace_packet_set_order(packet, trace_get_erf_timestamp(packet));
     1255                        //trace_packet_set_order(packet, libtrace->accepted_packets);
     1256                        //++libtrace->accepted_packets;
    12521257                        return ret;
    12531258                } while(1);
     
    14701475                libtrace_deque_init(&t->deque, sizeof(libtrace_result_t));
    14711476                libtrace_message_queue_init(&t->messages, sizeof(libtrace_message_t));
    1472                 t->tmp_key = 0;
    1473                 t->tmp_data = NULL;
    14741477                t->recorded_first = false;
    1475                 ASSERT_RET(pthread_spin_init(&t->tmp_spinlock, 0), == 0);
    14761478                t->tracetime_offset_usec = 0;;
    14771479        }
     
    16021604
    16031605        if (trace_supports_parallel(libtrace) && !trace_has_dedicated_hasher(libtrace)) {
     1606                uint64_t tmp_stats;
     1607                libtrace->dropped_packets = trace_get_dropped_packets(libtrace);
     1608                libtrace->received_packets = trace_get_received_packets(libtrace);
     1609                if (libtrace->format->get_filtered_packets) {
     1610                        if ((tmp_stats = libtrace->format->get_filtered_packets(libtrace)) != UINT64_MAX) {
     1611                                libtrace->filtered_packets += tmp_stats;
     1612                        }
     1613                }
    16041614                libtrace->started = false;
    16051615                if (libtrace->format->ppause_input)
Note: See TracChangeset for help on using the changeset viewer.