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
Kirill Smelkov
ZODB
Commits
ac2e2e33
Commit
ac2e2e33
authored
Aug 27, 2001
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got cache_detail and cache_extreme_detail working again and added links
from the debugging information screen.
parent
09b74cf0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
trunk/src/ZODB/DB.py
trunk/src/ZODB/DB.py
+14
-8
No files found.
trunk/src/ZODB/DB.py
View file @
ac2e2e33
...
@@ -84,8 +84,8 @@
...
@@ -84,8 +84,8 @@
##############################################################################
##############################################################################
"""Database objects
"""Database objects
$Id: DB.py,v 1.3
2 2001/05/22 23:01:45 jeremy
Exp $"""
$Id: DB.py,v 1.3
3 2001/08/27 19:25:19 shane
Exp $"""
__version__
=
'$Revision: 1.3
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
3
$'
[
11
:
-
2
]
import
cPickle
,
cStringIO
,
sys
,
POSException
,
UndoLogCompatible
import
cPickle
,
cStringIO
,
sys
,
POSException
,
UndoLogCompatible
from
Connection
import
Connection
from
Connection
import
Connection
...
@@ -237,22 +237,28 @@ class DB(UndoLogCompatible.UndoLogCompatible):
...
@@ -237,22 +237,28 @@ class DB(UndoLogCompatible.UndoLogCompatible):
def
cacheExtremeDetail
(
self
):
def
cacheExtremeDetail
(
self
):
detail
=
[]
detail
=
[]
def
f
(
con
,
detail
=
detail
,
rc
=
sys
.
getrefcount
):
conn_no
=
[
0
]
# A mutable reference to a counter
def
f
(
con
,
detail
=
detail
,
rc
=
sys
.
getrefcount
,
conn_no
=
conn_no
):
conn_no
[
0
]
=
conn_no
[
0
]
+
1
cn
=
conn_no
[
0
]
for
oid
,
ob
in
con
.
_cache
.
items
():
for
oid
,
ob
in
con
.
_cache
.
items
():
id
=
oid
id
=
''
if
hasattr
(
ob
,
'__dict__'
):
if
hasattr
(
ob
,
'__dict__'
):
d
=
ob
.
__dict__
d
=
ob
.
__dict__
if
d
.
has_key
(
'id'
):
if
d
.
has_key
(
'id'
):
id
=
"%s (%s)"
%
(
oid
,
d
[
'id'
])
id
=
d
[
'id'
]
elif
d
.
has_key
(
'__name__'
):
elif
d
.
has_key
(
'__name__'
):
id
=
"%s (%s)"
%
(
oid
,
d
[
'__name__'
])
id
=
d
[
'__name__'
]
detail
.
append
({
detail
.
append
({
'oid'
:
id
,
'conn_no'
:
cn
,
'oid'
:
oid
,
'id'
:
id
,
'klass'
:
"%s.%s"
%
(
ob
.
__class__
.
__module__
,
'klass'
:
"%s.%s"
%
(
ob
.
__class__
.
__module__
,
ob
.
__class__
.
__name__
),
ob
.
__class__
.
__name__
),
'rc'
:
rc
(
ob
)
-
4
,
'rc'
:
rc
(
ob
)
-
4
,
'references'
:
con
.
references
(
oid
),
'state'
:
ob
.
_p_changed
,
#'references': con.references(oid),
})
})
self
.
_connectionMap
(
f
)
self
.
_connectionMap
(
f
)
...
...
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