Mercurial > kallithea
comparison rhodecode/lib/timerproxy.py @ 1360:1f47adeb67c2 beta
Bumped sqlalchemy version to 0.7, replaced timerproxy with new event system for sqlalchemy.
TimerProxy is now longer valid profilling method for sqlalchemy
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 04 Jun 2011 20:34:30 +0200 |
parents | c1516b35f91d |
children | bf263968da47 |
comparison
equal
deleted
inserted
replaced
1359:54fc83f2192c | 1360:1f47adeb67c2 |
---|---|
8 | 8 |
9 def color_sql(sql): | 9 def color_sql(sql): |
10 COLOR_SEQ = "\033[1;%dm" | 10 COLOR_SEQ = "\033[1;%dm" |
11 COLOR_SQL = YELLOW | 11 COLOR_SQL = YELLOW |
12 normal = '\x1b[0m' | 12 normal = '\x1b[0m' |
13 return COLOR_SEQ % COLOR_SQL + sql + normal | 13 return ''.join([COLOR_SEQ % COLOR_SQL, sql, normal]) |
14 | 14 |
15 | 15 |
16 class TimerProxy(ConnectionProxy): | 16 class TimerProxy(ConnectionProxy): |
17 | 17 |
18 def __init__(self): | 18 def __init__(self): |