Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
5ff28f51
Commit
5ff28f51
authored
Feb 22, 2018
by
Roque
Committed by
Klaus Wölfel
Aug 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
benchmark: minor refactoring and logs
parent
7d40ebb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
erp5/util/benchmark/process.py
erp5/util/benchmark/process.py
+3
-2
No files found.
erp5/util/benchmark/process.py
View file @
5ff28f51
...
@@ -69,6 +69,7 @@ class BenchmarkProcess(multiprocessing.Process):
...
@@ -69,6 +69,7 @@ class BenchmarkProcess(multiprocessing.Process):
"another process, flushing remaining results..."
)
"another process, flushing remaining results..."
)
def
getBrowser
(
self
,
log_file
):
def
getBrowser
(
self
,
log_file
):
self
.
_logger
.
info
(
"[BenchmarkProcess] Browser username and password: %s - %s"
%
(
self
.
_username
,
self
.
_password
))
return
Browser
(
self
.
_argument_namespace
.
erp5_base_url
,
return
Browser
(
self
.
_argument_namespace
.
erp5_base_url
,
self
.
_username
,
self
.
_username
,
self
.
_password
,
self
.
_password
,
...
@@ -87,8 +88,8 @@ class BenchmarkProcess(multiprocessing.Process):
...
@@ -87,8 +88,8 @@ class BenchmarkProcess(multiprocessing.Process):
except
StopIteration
:
except
StopIteration
:
raise
raise
except
Exception
,
e
:
except
Exception
,
e
:
self
.
_logger
.
info
(
"Exception while running target suite for user %s: %s"
%
(
self
.
_browser
.
_username
,
str
(
e
)))
msg
=
"%s: %s"
%
(
target
,
traceback
.
format_exc
())
msg
=
"%s: %s"
%
(
target
,
traceback
.
format_exc
())
try
:
try
:
msg
+=
"Last response headers:
\
n
%s
\
n
Last response contents:
\
n
%s"
%
\
msg
+=
"Last response headers:
\
n
%s
\
n
Last response contents:
\
n
%s"
%
\
(
self
.
_browser
.
headers
,
self
.
_browser
.
contents
)
(
self
.
_browser
.
headers
,
self
.
_browser
.
contents
)
...
@@ -115,7 +116,7 @@ class BenchmarkProcess(multiprocessing.Process):
...
@@ -115,7 +116,7 @@ class BenchmarkProcess(multiprocessing.Process):
# Clear the Browser history (which keeps (request, response))
# Clear the Browser history (which keeps (request, response))
# otherwise it will consume a lot of memory after some time. Also it
# otherwise it will consume a lot of memory after some time. Also it
# does make sense to keep it as suites are independent of each other
# does make sense to keep it as suites are independent of each other
self
.
_browser
.
mech_browser
.
clear_history
()
self
.
_browser
.
_history
.
clear
()
result
.
exitSuite
(
with_error
)
result
.
exitSuite
(
with_error
)
...
...
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