Changeset 62b3c4e for tools/tracertstats


Ignore:
Timestamp:
03/05/15 15:44:30 (6 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:
ab3fa18
Parents:
b023181
Message:

Update the reporter method to match with the per_pkt method.

We now treat a result as a type of message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracertstats/tracertstats_parallel.c

    rb023181 r62b3c4e  
    138138
    139139static uint64_t last_ts = 0;
    140 static void process_result(libtrace_t *trace UNUSED, libtrace_result_t *result, libtrace_message_t *mesg UNUSED)  {
     140static void process_result(libtrace_t *trace UNUSED, int mesg,
     141                           libtrace_generic_t data,
     142                           libtrace_thread_t *sender UNUSED) {
    141143        static uint64_t ts = 0;
    142 
    143         if (result) {
    144                 int j;
    145                 result_t *res;
    146                 ts = libtrace_result_get_key(result);
    147                 res = libtrace_result_get_value(result).ptr;
     144        int j;
     145        result_t *res;
     146
     147        switch (mesg) {
     148                case MESSAGE_RESULT:
     149                ts = libtrace_result_get_key(data.res);
     150                res = libtrace_result_get_value(data.res).ptr;
    148151                if (last_ts == 0)
    149152                        last_ts = ts;
     
    274277                return;
    275278
    276         trace = trace_create(uri);
     279        trace = trace_create(uri);
    277280        if (trace_is_err(trace)) {
    278281                trace_perror(trace,"trace_create");
     
    291294        }*/
    292295        int i = 1;
    293         trace_set_combiner(trace, &combiner_ordered, (libtrace_generic_types_t){0});
     296        trace_set_combiner(trace, &combiner_ordered, (libtrace_generic_t){0});
    294297        /* trace_parallel_config(trace, TRACE_OPTION_TRACETIME, &i); */
    295298        //trace_set_hasher(trace, HASHER_CUSTOM, &bad_hash, NULL);
Note: See TracChangeset for help on using the changeset viewer.