Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Joanne Hugé
slapos
Commits
ea21b1f6
Commit
ea21b1f6
authored
May 02, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/erp5/benchmarks: collect ZEO statistics
parent
44d65ce9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
software/erp5/test/test/benchmarks.py
software/erp5/test/test/benchmarks.py
+15
-1
No files found.
software/erp5/test/test/benchmarks.py
View file @
ea21b1f6
...
...
@@ -25,9 +25,12 @@
#
##############################################################################
import
contextlib
import
datetime
import
json
import
pathlib
import
socket
import
struct
import
subprocess
import
time
import
typing
...
...
@@ -68,7 +71,7 @@ class TestOrderBuildPackingListSimulation(
"mariadb"
:
{
# We use a large innodb-buffer-pool-size because the simulation
# select method used for sale packing list does not use index and
# cause sl
p
ow queries
# cause slow queries
"innodb-buffer-pool-size"
:
32
*
1024
*
1024
*
1024
,
# 32Go
},
"zope-partition-dict"
:
{
...
...
@@ -129,6 +132,16 @@ class TestOrderBuildPackingListSimulation(
self
.
getComputerPartitionPath
(
'zodb'
))
/
'srv'
/
'zodb'
/
'root.fs'
root_fs_size
=
root_fs
.
stat
().
st_size
# ZEO stats ( using ruok protocol https://github.com/zopefoundation/ZEO/commit/d5082536 )
with
contextlib
.
closing
(
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
))
as
s
:
s
.
connect
((
self
.
_ipv4_address
,
2100
))
s
.
sendall
(
b'
\
x00
\
x00
\
x00
\
x04
ruok'
)
_
=
s
.
recv
(
struct
.
unpack
(
">I"
,
s
.
recv
(
4
))[
0
])
zeo_stats
=
json
.
loads
(
s
.
recv
(
struct
.
unpack
(
">I"
,
s
.
recv
(
4
))[
0
]))
# we are supposed to have only one storage with name "root"
zeo_root_stats
=
zeo_stats
.
pop
(
'root'
)
assert
not
zeo_stats
self
.
logger
.
info
(
"Measurements for %s (after %s): "
"elapsed=%s zope_total_rss=%s / %s root_fs_size=%s"
,
...
...
@@ -147,6 +160,7 @@ class TestOrderBuildPackingListSimulation(
'zope_total_rss'
:
zope_total_rss
,
'zope_count'
:
zope_count
,
'root_fs_size'
:
root_fs_size
,
'zeo_stats'
:
zeo_root_stats
,
'now'
:
str
(
now
),
})
...
...
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