Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_workflow
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenjie.zheng
erp5_workflow
Commits
297fe7c8
Commit
297fe7c8
authored
Sep 01, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic
parent
991dd05d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
erp5/util/benchmark/result.py
erp5/util/benchmark/result.py
+13
-9
No files found.
erp5/util/benchmark/result.py
View file @
297fe7c8
...
...
@@ -85,10 +85,6 @@ class BenchmarkResult(object):
self
.
_argument_namespace
=
argument_namespace
self
.
_nb_users
=
nb_users
self
.
_user_index
=
user_index
self
.
_log_level
=
self
.
_argument_namespace
.
enable_debug
and
\
logging
.
DEBUG
or
logging
.
INFO
self
.
_stat_list
=
[]
self
.
_suite_idx
=
0
self
.
_result_idx
=
0
...
...
@@ -103,7 +99,10 @@ class BenchmarkResult(object):
@
property
def
logger
(
self
):
if
not
self
.
_logger
:
logging
.
basicConfig
(
stream
=
self
.
log_file
,
level
=
self
.
_log_level
)
logging
.
basicConfig
(
stream
=
self
.
log_file
,
level
=
(
self
.
_argument_namespace
.
enable_debug
and
logging
.
DEBUG
or
logging
.
INFO
))
self
.
_logger
=
logging
.
getLogger
(
'erp5.util.benchmark'
)
return
self
.
_logger
...
...
@@ -117,11 +116,16 @@ class BenchmarkResult(object):
def
__call__
(
self
,
label
,
value
):
self
.
result_list
.
append
(
value
)
if
self
.
_first_iteration
:
self
.
_stat_list
.
append
(
BenchmarkResultStatistic
(
self
.
_current_suite_name
,
label
))
self
.
_stat_list
[
self
.
_result_idx
].
add
(
value
)
try
:
result_statistic
=
self
.
_stat_list
[
self
.
_result_idx
]
except
IndexError
:
result_statistic
=
BenchmarkResultStatistic
(
self
.
_current_suite_name
,
label
)
self
.
_stat_list
.
append
(
result_statistic
)
result_statistic
.
add
(
value
)
self
.
_result_idx
+=
1
def
getLabelList
(
self
):
...
...
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