Ignore:
Timestamp:
03/01/18 17:10:50 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, etsilive, master, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
43b773a
Parents:
207e288
Message:

Don't count ERF provenance records during tracestats, tracertstats

Or any other records with 0 wire length for that matter.

This was especially off-putting when using filters as provenance
records automatically match all filters, so you could get some
very misleading results.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracertstats/tracertstats.c

    ra8cfe71 r02d13cb  
    197197        thread_data_t *td = (thread_data_t *)tls;
    198198        int i;
     199        size_t wlen;
    199200
    200201        if (IS_LIBTRACE_META_PACKET(packet)) {
     
    212213                                sizeof(statistic_t) * filter_count);
    213214        }
     215        wlen = trace_get_wire_length(packet);
     216        if (wlen == 0) {
     217                /* Don't count ERF provenance and similar packets */
     218                return packet;
     219        }
    214220        for(i=0;i<filter_count;++i) {
    215221                if(trace_apply_filter(filters[i].filter, packet)) {
    216222                        td->results->filters[i].count++;
    217                         td->results->filters[i].bytes+=trace_get_wire_length(packet);
     223                        td->results->filters[i].bytes+=wlen;
    218224                }
    219225        }
    220226
    221227        td->results->total.count++;
    222         td->results->total.bytes +=trace_get_wire_length(packet);
     228        td->results->total.bytes += wlen;
    223229        return packet;
    224230}
Note: See TracChangeset for help on using the changeset viewer.