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
Léo-Paul Géneau
erp5
Commits
ec8d291c
Commit
ec8d291c
authored
Dec 02, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add string representation of a benchmark result.
parent
89aee418
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
erp5/util/benchmark/process.py
erp5/util/benchmark/process.py
+2
-9
erp5/util/benchmark/result.py
erp5/util/benchmark/result.py
+8
-0
No files found.
erp5/util/benchmark/process.py
View file @
ec8d291c
...
...
@@ -104,17 +104,10 @@ class BenchmarkProcess(multiprocessing.Process):
else
:
for
stat
in
result
.
getCurrentSuiteStatList
():
mean
=
stat
.
mean
self
.
_logger
.
info
(
"%s: min=%.3f, mean=%.3f (+/- %.3f), max=%.3f"
%
\
(
stat
.
full_label
,
stat
.
minimum
,
mean
,
stat
.
standard_deviation
,
stat
.
maximum
))
self
.
_logger
.
info
(
str
(
stat
))
if
(
self
.
_argument_namespace
.
max_global_average
and
mean
>
self
.
_argument_namespace
.
max_global_average
):
stat
.
mean
>
self
.
_argument_namespace
.
max_global_average
):
raise
RuntimeError
(
"Stopping as mean is greater than maximum "
"global average"
)
...
...
erp5/util/benchmark/result.py
View file @
ec8d291c
...
...
@@ -53,6 +53,14 @@ class BenchmarkResultStatistic(object):
self
.
_variance_sum
=
0
self
.
_mean
=
0
def
__str__
(
self
):
return
"%s: min=%.3f, mean=%.3f (+/- %.3f), max=%.3f"
%
\
(
self
.
full_label
,
self
.
minimum
,
self
.
mean
,
self
.
standard_deviation
,
self
.
maximum
)
def
add
(
self
,
value
):
if
value
<
0
:
self
.
error_sum
+=
1
...
...
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