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
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
Paul Graydon
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
Show 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):
"another process, flushing remaining results..."
)
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
,
self
.
_username
,
self
.
_password
,
...
...
@@ -87,8 +88,8 @@ class BenchmarkProcess(multiprocessing.Process):
except
StopIteration
:
raise
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
())
try
:
msg
+=
"Last response headers:
\
n
%s
\
n
Last response contents:
\
n
%s"
%
\
(
self
.
_browser
.
headers
,
self
.
_browser
.
contents
)
...
...
@@ -115,7 +116,7 @@ class BenchmarkProcess(multiprocessing.Process):
# Clear the Browser history (which keeps (request, response))
# 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
self
.
_browser
.
mech_browser
.
clear_history
()
self
.
_browser
.
_history
.
clear
()
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