Changeset 169 in tracdarcs
- Timestamp:
- 05/08/10 17:10:19 (3 years ago)
- Hash name:
- 20100508151019-97f81-46b0a8ea92504dcc3f27b882a7b7091af3a4cd61
- File:
-
- 1 edited
-
tracdarcs/dbutil.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tracdarcs/dbutil.py
r168 r169 140 140 141 141 all = list(klass._timings.items()) 142 all.sort(key=lambda item: item[1][3]/item[1][0]) 143 log.debug("Executed %d different statements, ordered by average execution time:", 144 len(all)) 145 for stmt, stats in all: 146 nr, mint, maxt, tott = stats 147 if nr>1: 148 avg = tott / nr 149 log.debug("%s: %d executions in %s, fastest run %s, slowest %s, average %s", 150 stmt, nr, trepr(tott), trepr(mint), trepr(maxt), trepr(avg)) 151 else: 152 log.debug("%s: executed once in %s", stmt, trepr(tott)) 142 if all: 143 all.sort(key=lambda item: item[1][3]/item[1][0]) 144 log.debug("Executed %d different statements, ordered by average execution time:", 145 len(all)) 146 for stmt, stats in all: 147 nr, mint, maxt, tott = stats 148 if nr>1: 149 avg = tott / nr 150 log.debug("%s: %d executions in %s, fastest run %s, slowest %s, average %s", 151 stmt, nr, trepr(tott), trepr(mint), trepr(maxt), trepr(avg)) 152 else: 153 log.debug("%s: executed once in %s", stmt, trepr(tott)) 154 klass._timings.clear() 153 155 154 156 class TimedDB(object):
Note: See TracChangeset
for help on using the changeset viewer.