Changeset d994324 for tools/tracestats


Ignore:
Timestamp:
09/17/14 13:45:29 (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:
9e429e8
Parents:
2498008
Message:

Remove anything to do with the combiner from set configuration and removes any options/storage related to these such as the next expected packet.

Instead this is done using trace_set_combiner now, and the for the built-in combiners.h header. This is a lot more flexible and allows the users to specify there own combiner, and any number of options for it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracestats/tracestats_parallel.c

    r2498008 rd994324  
    5757#include "data-struct/vector.h"
    5858#include "data-struct/message_queue.h"
     59#include "combiners.h"
    5960#include <pthread.h>
    6061
     
    130131                switch (mesg->code) {
    131132                        case MESSAGE_STOPPING:
    132                                 trace_publish_result(trace, t, 0, results, RESULT_NORMAL); // Only ever using a single key 0
     133                                trace_publish_result(trace, t, 0, (libtrace_generic_types_t){.ptr = results}, RESULT_NORMAL); // Only ever using a single key 0
    133134                                fprintf(stderr, "Thread published resuslts WOWW\n");
    134135                                break;
     
    158159                /* Get the results from each core and sum 'em up */
    159160                assert(libtrace_result_get_key(result) == 0);
    160                 statistics_t * res = libtrace_result_get_value(result);
     161                statistics_t * res = libtrace_result_get_value(result).ptr;
    161162                count += res[0].count;
    162163                bytes += res[0].bytes;
     
    223224        //option = 10000;
    224225    //trace_set_hasher(trace, HASHER_CUSTOM, &rand_hash, NULL);
    225         option = 2;
    226226        //trace_parallel_config(trace, TRACE_OPTION_SET_PERPKT_THREAD_COUNT, &option);
    227227        trace_parallel_config(trace, TRACE_OPTION_SET_CONFIG, &uc);
    228         trace_parallel_config(trace, TRACE_OPTION_ORDERED, &uc);
     228        trace_set_combiner(trace, &combiner_ordered, (libtrace_generic_types_t){0});
    229229
    230230        //trace_parallel_config(trace, TRACE_OPTION_SET_MAPPER_BUFFER_SIZE, &option);
Note: See TracChangeset for help on using the changeset viewer.