Changeset cc9c9de for lib/libtrace_int.h


Ignore:
Timestamp:
05/18/18 11:39:59 (4 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, etsilive, master, rc-4.0.4, ringdecrementfix, ringperformance
Children:
1e0a804
Parents:
e732393
git-author:
Shane Alcock <salcock@…> (04/17/18 16:45:58)
git-committer:
Shane Alcock <salcock@…> (05/18/18 11:39:59)
Message:

Add new config option for trace_event() -- REPLAY_SPEEDUP

This allows users to specify a "speedup factor" when using
trace_event() to replay trace files, i.e. all inter-packet
gaps will be divided by the speedup factor. This allows traces
to be replayed faster, while still preserving the same relative
gaps between packets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace_int.h

    rdf87f00 rcc9c9de  
    152152//#define RP_BUFSIZE 65536U
    153153
     154#define LIBTRACE_MAX_REPLAY_SPEEDUP 1000
     155
    154156/** Data about the most recent event from a trace file */
    155157struct libtrace_event_status_t {
    156158        /** A libtrace packet to store the packet when a PACKET event occurs */
    157159        libtrace_packet_t *packet;
    158         /** Time between the timestamp for the current packet and the current
    159          * walltime */
    160         double tdelta;
    161         /** The timestamp of the previous PACKET event */
    162         double trace_last_ts;
     160
     161        /* The walltime when we processed the first packet from the trace */
     162        double first_now;
     163
     164        /* The tracetime of the first packet in the trace */
     165        double first_ts;
     166
    163167        /** The size of the current PACKET event */
    164168        int psize;
     
    313317         * used only if the capture format does not support snapping natively */
    314318        size_t snaplen;                 
     319        /** Speed up the packet rate when using trace_event() to process trace
     320         * files by this factor. */
     321        int replayspeedup;
    315322        /** Count of the number of packets returned to the libtrace user */
    316323        uint64_t accepted_packets;
Note: See TracChangeset for help on using the changeset viewer.