[tor-commits] [nyx/master] Rewrite log panel

atagar at torproject.org atagar at torproject.org
Tue May 5 05:42:06 UTC 2015


commit 1ef21851fabb44d4df83cde2df64e490f31848f7
Merge: 4517746 454803d
Author: Damian Johnson <atagar at torproject.org>
Date:   Mon May 4 22:36:43 2015 -0700

    Rewrite log panel
    
    Overhaul our log panel. Cleaner code, decent test coverage, but probably
    neatest for users is that our deduplication logic is no longer painfully
    inefficient. Previously it was a O(n^2) operation essentially every time we
    logged an event (so pretty much O(n^3). This was so bad the panel turned off
    deduplication when it became too slow.
    
    New version is O(n^2) over the lifetime of our process, and we can make it
    linear with just a bit more work.

 nyx/config/attributes.cfg                 |   18 +
 nyx/config/dedup.cfg                      |   68 +-
 nyx/config/strings.cfg                    |    1 +
 nyx/controller.py                         |   10 +-
 nyx/graph_panel.py                        |    3 +-
 nyx/header_panel.py                       |    5 +-
 nyx/log_panel.py                          | 1309 +++++------------------------
 nyx/menu/actions.py                       |    6 +-
 nyx/util/__init__.py                      |    9 +-
 nyx/util/log.py                           |  452 ++++++++++
 nyx/util/panel.py                         |   36 +-
 nyx/util/ui_tools.py                      |   27 +-
 nyxrc.sample                              |    7 -
 run_tests.py                              |   10 +-
 test/util/__init__.py                     |    2 +-
 test/util/log/__init__.py                 |    8 +
 test/util/log/condense_runlevels.py       |   13 +
 test/util/log/data/daybreak_deduplication |   37 +
 test/util/log/data/malformed_date         |   21 +
 test/util/log/data/malformed_line         |   21 +
 test/util/log/data/malformed_runlevel     |   21 +
 test/util/log/data/multiple_tor_instances |   33 +
 test/util/log/data/tor_log                |   21 +
 test/util/log/log_entry.py                |   27 +
 test/util/log/log_group.py                |  146 ++++
 test/util/log/read_tor_log.py             |   59 ++
 26 files changed, 1202 insertions(+), 1168 deletions(-)



More information about the tor-commits mailing list