Changeset 154 in tracdarcs for tracdarcs/repository.py


Ignore:
Timestamp:
08/21/09 10:02:06 (4 years ago)
Author:
lele@…
Hash name:
20090821080206-97f81-60c4a4cce30b7dc84c16663e200ebe5fce29338c
Message:

Use a wrapper around the DB connection to print a timings report
In debug mode (that is, without -O option to the interpreter) the
connection to the database is wrapped by a thin class that keeps the
statistics about any executed query, and finally prints a report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tracdarcs/repository.py

    r152 r154  
    3737from dbutil import (CHANGE_ADDED, CHANGE_EDITED, CHANGE_MOVED, 
    3838                    CHANGE_MOVED_EDITED, CHANGE_REMOVED, 
    39                     IS_TRAC_0_10_X, IS_TRAC_0_11_X, 
     39                    IS_TRAC_0_10_X, IS_TRAC_0_11_X, TimedDB, 
    4040                    IS_TRAC_0_12_OR_BETTER, NODE_DIR_TYPE, 
    4141                    NODE_FILE_TYPE, get_node_type, get_prev_path_rev, 
     
    6363    def __init__(self, db, path, log, darcscmd, possible_encodings): 
    6464        Repository.__init__(self, path, None, log) 
    65         self.db = db 
     65        self.db = TimedDB(db, log) 
    6666        self.path = path 
    6767        self.log = log 
Note: See TracChangeset for help on using the changeset viewer.