Changeset d994324 for tools/tracertstats


Ignore:
Timestamp:
09/17/14 13:45:29 (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:
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/tracertstats/tracertstats_parallel.c

    r2498008 rd994324  
    5959#include "data-struct/vector.h"
    6060#include "data-struct/message_queue.h"
     61#include "combiners.h"
    6162
    6263#ifndef UINT32_MAX
     
    144145                result_t *res;
    145146                ts = libtrace_result_get_key(result);
    146                 res = libtrace_result_get_value(result);
     147                res = libtrace_result_get_value(result).ptr;
    147148                if (last_ts == 0)
    148149                        last_ts = ts;
     
    177178        static __thread uint64_t last_ts = 0, ts = 0;
    178179        static __thread result_t * results = NULL;
    179        
    180180        // Unsure when we would hit this case but the old code had it, I
    181181        // guess we should keep it
     
    189189                        // Publish and make a new one new
    190190                        //fprintf(stderr, "Publishing result %"PRIu64"\n", last_ts);
    191                         trace_publish_result(trace, t, (uint64_t) last_ts, results, RESULT_NORMAL);
     191                        trace_publish_result(trace, t, (uint64_t) last_ts, (libtrace_generic_types_t){.ptr = results}, RESULT_NORMAL);
    192192                        trace_post_reporter(trace);
    193193                        results = calloc(1, sizeof(result_t) + sizeof(statistic_t) * filter_count);
     
    220220                                // Should we always post this?
    221221                                if (results->total.count) {
    222                                         trace_publish_result(trace, t, (uint64_t) last_ts, results, RESULT_NORMAL);
     222                                        trace_publish_result(trace, t, (uint64_t) last_ts, (libtrace_generic_types_t){.ptr = results}, RESULT_NORMAL);
    223223                                        trace_post_reporter(trace);
    224224                                        results = NULL;
     
    240240                                        if (next_update_time <= mesg->additional.uint64) {
    241241                                                //fprintf(stderr, "Got a tick and publishing early!!\n");
    242                                                 trace_publish_result(trace, t, (uint64_t) last_ts, results, RESULT_NORMAL);
     242                                                trace_publish_result(trace, t, (uint64_t) last_ts, (libtrace_generic_types_t){.ptr = NULL}, RESULT_NORMAL);
    243243                                                trace_post_reporter(trace);
    244244                                                results = calloc(1, sizeof(result_t) + sizeof(statistic_t) * filter_count);
     
    288288        }*/
    289289        int i = 1;
    290         trace_parallel_config(trace, TRACE_OPTION_ORDERED, &i);
     290        trace_set_combiner(trace, &combiner_ordered, (libtrace_generic_types_t){0});
    291291        /* trace_parallel_config(trace, TRACE_OPTION_TRACETIME, &i); */
    292292        //trace_set_hasher(trace, HASHER_CUSTOM, &bad_hash, NULL);
Note: See TracChangeset for help on using the changeset viewer.