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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
erp5
Commits
991dd05d
Commit
991dd05d
authored
Sep 01, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic
parent
5fd95ced
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
erp5/util/benchmark/process.py
erp5/util/benchmark/process.py
+1
-1
erp5/util/benchmark/result.py
erp5/util/benchmark/result.py
+4
-3
No files found.
erp5/util/benchmark/process.py
View file @
991dd05d
...
@@ -121,7 +121,7 @@ class BenchmarkProcess(multiprocessing.Process):
...
@@ -121,7 +121,7 @@ class BenchmarkProcess(multiprocessing.Process):
self
.
_nb_users
,
self
.
_nb_users
,
self
.
_user_index
)
self
.
_user_index
)
self
.
_logger
=
result_instance
.
getLogger
()
self
.
_logger
=
result_instance
.
logger
# Ensure the data are flushed before exiting, handled by Result class
# Ensure the data are flushed before exiting, handled by Result class
# __exit__ block
# __exit__ block
...
...
erp5/util/benchmark/result.py
View file @
991dd05d
...
@@ -100,7 +100,8 @@ class BenchmarkResult(object):
...
@@ -100,7 +100,8 @@ class BenchmarkResult(object):
self
.
label_list
=
[]
self
.
label_list
=
[]
self
.
_logger
=
None
self
.
_logger
=
None
def
getLogger
(
self
):
@
property
def
logger
(
self
):
if
not
self
.
_logger
:
if
not
self
.
_logger
:
logging
.
basicConfig
(
stream
=
self
.
log_file
,
level
=
self
.
_log_level
)
logging
.
basicConfig
(
stream
=
self
.
log_file
,
level
=
self
.
_log_level
)
self
.
_logger
=
logging
.
getLogger
(
'erp5.util.benchmark'
)
self
.
_logger
=
logging
.
getLogger
(
'erp5.util.benchmark'
)
...
@@ -131,7 +132,7 @@ class BenchmarkResult(object):
...
@@ -131,7 +132,7 @@ class BenchmarkResult(object):
if
self
.
_first_iteration
:
if
self
.
_first_iteration
:
self
.
label_list
=
self
.
getLabelList
()
self
.
label_list
=
self
.
getLabelList
()
self
.
getLogger
()
.
debug
(
"RESULTS: %s"
%
self
.
result_list
)
self
.
logger
.
debug
(
"RESULTS: %s"
%
self
.
result_list
)
self
.
result_list
=
[]
self
.
result_list
=
[]
self
.
_first_iteration
=
False
self
.
_first_iteration
=
False
self
.
_suite_idx
=
0
self
.
_suite_idx
=
0
...
@@ -219,7 +220,7 @@ class CSVBenchmarkResult(BenchmarkResult):
...
@@ -219,7 +220,7 @@ class CSVBenchmarkResult(BenchmarkResult):
if
exc_type
and
not
issubclass
(
exc_type
,
StopIteration
):
if
exc_type
and
not
issubclass
(
exc_type
,
StopIteration
):
msg
=
"An error occured, see: %s"
%
self
.
_log_filename_path
msg
=
"An error occured, see: %s"
%
self
.
_log_filename_path
self
.
getLogger
()
.
error
(
"%s: %s"
%
(
exc_type
,
exc_value
))
self
.
logger
.
error
(
"%s: %s"
%
(
exc_type
,
exc_value
))
raise
RuntimeError
(
msg
)
raise
RuntimeError
(
msg
)
from
cStringIO
import
StringIO
from
cStringIO
import
StringIO
...
...
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