Ignore:
Timestamp:
03/12/15 17:14:42 (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:
a978dec
Parents:
b54e2da
Message:

More documentation, including some renaming and modifications to behaviour

  • Removes accessor functions for libtrace_result_t, instead directly access the structure
  • Documentation for most functions
  • Split tick into interval and count messages for the two modes of operation
  • Normalise interval and packet order to use the erf timestamp format
  • Rename trace_send_message_to_XXX to trace trace_message_XXX
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracertstats/tracertstats_parallel.c

    r6a082f8 r6a6e6a8  
    147147        switch (mesg) {
    148148                case MESSAGE_RESULT:
    149                 ts = libtrace_result_get_key(data.res);
    150                 res = libtrace_result_get_value(data.res).ptr;
     149                ts = data.res->key;
     150                res = data.res->value.ptr;
    151151                if (last_ts == 0)
    152152                        last_ts = ts;
     
    195195                        // Publish and make a new one new
    196196                        //fprintf(stderr, "Publishing result %"PRIu64"\n", last_ts);
    197                         trace_publish_result(trace, t, (uint64_t) last_ts, tmp, RESULT_NORMAL);
     197                        trace_publish_result(trace, t, (uint64_t) last_ts, tmp, RESULT_USER);
    198198                        trace_post_reporter(trace);
    199199                        results = calloc(1, sizeof(result_t) + sizeof(statistic_t) * filter_count);
     
    225225                if (results->total.count) {
    226226                        libtrace_generic_t tmp = {.ptr = results};
    227                         trace_publish_result(trace, t, (uint64_t) last_ts, tmp, RESULT_NORMAL);
     227                        trace_publish_result(trace, t, (uint64_t) last_ts, tmp, RESULT_USER);
    228228                        trace_post_reporter(trace);
    229229                        results = NULL;
     
    231231                break;
    232232
    233                 case MESSAGE_TICK:
     233        case MESSAGE_TICK_INTERVAL:
     234        case MESSAGE_TICK_COUNT:
    234235                {
    235236                        int64_t offset;
    236237                        struct timeval *tv, tv_real;
    237238                        libtrace_packet_t *first_packet = NULL;
    238                         retrive_first_packet(trace, &first_packet, &tv);
     239                        trace_get_first_packet(trace, NULL, &first_packet, &tv);
    239240                        if (first_packet != NULL) {
    240241                                // So figure out our running offset
     
    247248                                        libtrace_generic_t tmp = {.ptr = results};
    248249                                        //fprintf(stderr, "Got a tick and publishing early!!\n");
    249                                         trace_publish_result(trace, t, (uint64_t) last_ts, tmp, RESULT_NORMAL);
     250                                        trace_publish_result(trace, t, (uint64_t) last_ts, tmp, RESULT_USER);
    250251                                        trace_post_reporter(trace);
    251252                                        results = calloc(1, sizeof(result_t) + sizeof(statistic_t) * filter_count);
Note: See TracChangeset for help on using the changeset viewer.