Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZODB
Commits
ecca6dff
Commit
ecca6dff
authored
Dec 05, 2008
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the output of connectionDebugInfo to make it platform
independent.
parent
d15d3a93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
src/ZODB/DB.py
src/ZODB/DB.py
+3
-1
src/ZODB/tests/testDB.py
src/ZODB/tests/testDB.py
+6
-6
No files found.
src/ZODB/DB.py
View file @
ecca6dff
...
...
@@ -758,7 +758,9 @@ class DB(object):
d
=
"%s (%s)"
%
(
d
,
len
(
c
.
_cache
))
result
.
append
({
'opened'
:
o
and
(
"%s (%.2fs)"
%
(
time
.
ctime
(
o
),
t
-
o
)),
'opened'
:
o
and
(
"%s (%.2fs)"
%
(
time
.
strftime
(
"%Y-%m-%dT%H:%M:%S"
,
time
.
localtime
(
o
)),
t
-
o
)),
'info'
:
d
,
'before'
:
c
.
before
,
})
...
...
src/ZODB/tests/testDB.py
View file @
ecca6dff
...
...
@@ -104,7 +104,7 @@ def test_invalidateCache():
>>> db.close()
"""
def
test_
connectionDebugInfo
():
def
connectionDebugInfo
():
r"""DB.connectionDebugInfo provides information about connections.
>>> import time
...
...
@@ -133,14 +133,14 @@ def test_connectionDebugInfo():
>>> import pprint
>>> pprint.pprint(sorted(info, key=lambda i: str(i['opened'])), width=1)
[{'before': None,
'info': ' (0)',
'opened': None},
{'before': None,
'info': 'test info (2)',
'opened': '
Thu Dec 04 15:40:44 2008
(1.40s)'},
'opened': '
2008-12-04T15:40:44
(1.40s)'},
{'before': '\x03zY\xd8\xc0m9\xdd',
'info': ' (0)',
'opened': 'Thu Dec 04 15:40:45 2008 (0.30s)'}]
'opened': '2008-12-04T15:40:45 (0.30s)'},
{'before': None,
'info': ' (0)',
'opened': None}]
>>> time.time = real_time
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment