# babeltrace2-filter.utils.trimmer

## NAME



           babeltrace2-filter.utils.trimmer - Babeltrace 2: Trimmer filter
           component class
    


## DESCRIPTION



           A Babeltrace 2 **filter.utils.trimmer** message iterator discards all
           the consumed messages with a time less than a given beginning time
           and greater than a given end time. It effectively “cuts”, or trims
           trace streams.
    
                           +-------------------+
                           | flt.utils.trimmer |
                           |                   |
               Messages -->@ in            out @--> Less messages
                           +-------------------+
    
           See babeltrace2-intro(7) to learn more about the Babeltrace 2
           project and its core concepts.
    
           A **filter.utils.trimmer** message iterator makes its upstream message
           iterator seek the configured beginning time (see the **begin**
           parameter) before it starts to consume messages. This seeking
           operation can have an effect on the times of stream beginning,
           packet beginning, discarded events, and discarded packets messages
           so that they fall within the configured trimming time range.
    
           As such, when a **filter.utils.trimmer** message iterator consumes a
           message of which the time is greater than the configured end time
           (see the **end** parameter), it can alter the time of stream end,
           packet end, discarded events, and discarded packets messages so
           that they fall within the configured trimming time range.
    
           A **filter.utils.trimmer** message iterator requires that all the
           upstream messages it consumes have times, except for stream
           beginning and end messages, returning an error status otherwise.
    


## INITIALIZATION PARAMETERS



           **begin** =_TIME_ [optional string or signed integer]
               Set the beginning time of the trimming time range to _TIME_.
    
               If _TIME_ is a string, see below for its format. If _TIME_ is a
               signed integer, then the component converts it to a string and
               treats it as such.
    
               If you don’t specify this parameter, then the component
               discards no events until the end of the trimming time range.
    
               The format of _TIME_ when it’s a string is one of:
    
                   _YYYY_ -_MM_ -_DD HH_ :_II_[:_SS_[._NANO_]]
                   _HH_ :_II_[:_SS_[._NANO_]]
                   [-]_SEC_[._NANO_]
    
               _YYYY_
                   4-digit year.
    
               _MM_
                   2-digit month (January is **01**).
    
               _DD_
                   2-digit day.
    
               _HH_
                   2-digit hour (24-hour format).
    
               _II_
                   2-digit minute.
    
               _SS_
                   2-digit second.
    
               _NANO_
                   Nanoseconds (up to nine digits).
    
               _SEC_
                   Seconds since origin.
    
               If _TIME_ has no date information, then the message iterator
               uses the time of the first upstream message to determine the
               date.
    
           **end** =_TIME_ [optional string or signed integer]
               Set the end time of the trimming time range to _TIME_.
    
               If _TIME_ is a string, see the **begin** parameter for its format.
               If _TIME_ is a signed integer, then the component converts it to
               a string and treats it as such.
    
               If you don’t specify this parameter, then the component
               discards no events from the beginning of the trimming time
               range.
    
           **gmt** =_VAL_ [optional boolean]
               If _VAL_ is true, then set the time zone of the **begin** and **end**
               parameters to GMT instead of the local time zone.
    
               Default: false.
    


## PORTS



               +-------------------+
               | flt.utils.trimmer |
               |                   |
               @ in            out @
               +-------------------+
    
       **Input**
           **in**
               Single input port.
    
       **Output**
           **out**
               Single output port.
    


## BUGS



           If you encounter any issue or usability problem, please report it
           on the Babeltrace bug tracker (see
           <https://bugs.lttng.org/projects/babeltrace>).
    


## RESOURCES



           The Babeltrace project shares some communication channels with the
           LTTng project (see <https://lttng.org/>).
    
           •   Babeltrace website (see <https://babeltrace.org/>)
    
           •   Mailing list (see <https://lists.lttng.org>) for support and
               development: **lttng-dev@lists.lttng.org**
    
           •   IRC channel (see <irc://irc.oftc.net/lttng>): **#lttng** on
               **irc.oftc.net**
    
           •   Bug tracker (see <https://bugs.lttng.org/projects/babeltrace>)
    
           •   Git repository (see
               <https://git.efficios.com/?p=babeltrace.git>)
    
           •   GitHub project (see <https://github.com/efficios/babeltrace>)
    
           •   Continuous integration (see
               <https://ci.lttng.org/view/Babeltrace/>)
    
           •   Code review (see
               <https://review.lttng.org/q/project:babeltrace>)
    


* * *