Enhancement #1918

Add an option to logger monitor style to discard empty scopes

Added by J. Wienke over 7 years ago. Updated over 7 years ago.

Status:ResolvedStart date:07/18/2014
Priority:NormalDue date:
Assignee:J. Moringen% Done:


Category:Common Lisp Tools
Target version:-


Please add an option to the CL logger to remove scopes from the monitor (and possibly other comparable styles like timeline) view that have not received messages for n seconds.

Associated revisions

Revision 18940168
Added by J. Moringen over 7 years ago

Pruning of inactive sub-styles in formatting/style-mixins.lisp

fixes #1918

Sub-styles of monitor styles track their most recent activity via
`activity-tracking-mixin' and the monitor style prunes sub-styles via

  • formatting/protocol.lisp (style-prune-predicate): new generic
    function; return prune predicate of a style
    (setf style-prune-predicate): new generic function; set prune
    predicate of a style
    (prune-sub-styles): new generic function; remove sub-style according
    to prune predicate
  • formatting/style-mixins.lisp (activity-tracking-mixin): new class;
    stores time of most recent activity
    (format-event :around t activity-tracking-mixin t): new method; update
    time of most recent activity
    (sub-style-pruning-mixin): new class; adds pruning of dynamically
    created sub-styles
    (prune-sub-styles sub-style-pruning-mixin): new method; prune
    sub-styles according to prune predicate
    (format-event :before eql :trigger sub-style-pruning-mixin t): new
    method; prune sub-styles before producing output
    (activity-based-sub-style-pruning-mixin): new class; specialized
    sub-style pruning based on time of most recent activity
    (shared-initialize :after activity-based-sub-style-pruning-mixin t):
    new method; accept pruning threshold or predicate
    (prune-after): new function; helper function for constructing
    activity-time-based pruning predicates
  • formatting/event-style-monitor.lisp (basic-monitor-line-style): new
    class; statistics columns with activity tracking
    (basic-monitor-style): added superclass
    (make-sub-style-entry basic-monitor-style t): instantiate
  • formatting/package.lisp (package rsb.formatting): added exported
    symbols style-prune-predicate, prune-sub-styles,
    sub-style-pruning-mixin, activity-based-sub-style-pruning-mixin,
    activity-tracking-mixin and style-last-activity
  • test/formatting/style-mixins.lisp
    (test suite activity-based-sub-style-pruning-mixin-root): new test
    suite; for `activity-based-sub-style-pruning-mixin' class
    (test activity-based-sub-style-pruning-mixin-root::construct): new
    test; test construction of `activity-based-sub-style-pruning-mixin'
  • test/formatting/package.lisp (package rsb.formatting.test): added used
    package more-conditions

Revision 73784a7f
Added by J. Moringen over 7 years ago

Mention sub-style pruning in CL logger in news.rst

refs #1918

  • news.rst (RSB 0.11): mention that the CL logger can now prune
    sub-styles after inactivity


#1 Updated by J. Moringen over 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#2 Updated by J. Moringen over 7 years ago

Configure pruning like this:

$ rsb-loggercl --style 'monitor/type :prune-after 5' socket:

Pruning threshold is in seconds.

#3 Updated by J. Wienke over 7 years ago

Nice, thanks

Also available in: Atom PDF