Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
aba28bf1
Commit
aba28bf1
authored
Dec 02, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename variance mean instance attribute to a more meaningful name.
parent
ec8d291c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
erp5/util/benchmark/result.py
erp5/util/benchmark/result.py
+4
-4
No files found.
erp5/util/benchmark/result.py
View file @
aba28bf1
...
@@ -51,7 +51,7 @@ class BenchmarkResultStatistic(object):
...
@@ -51,7 +51,7 @@ class BenchmarkResultStatistic(object):
# For calculating the standard deviation
# For calculating the standard deviation
self
.
_variance_sum
=
0
self
.
_variance_sum
=
0
self
.
_mean
=
0
self
.
_
variance_
mean
=
0
def
__str__
(
self
):
def
__str__
(
self
):
return
"%s: min=%.3f, mean=%.3f (+/- %.3f), max=%.3f"
%
\
return
"%s: min=%.3f, mean=%.3f (+/- %.3f), max=%.3f"
%
\
...
@@ -74,9 +74,9 @@ class BenchmarkResultStatistic(object):
...
@@ -74,9 +74,9 @@ class BenchmarkResultStatistic(object):
self
.
_value_sum
+=
value
self
.
_value_sum
+=
value
self
.
n
+=
1
self
.
n
+=
1
delta
=
value
-
self
.
_mean
delta
=
value
-
self
.
_
variance_
mean
self
.
_mean
+=
delta
/
self
.
n
self
.
_
variance_
mean
+=
delta
/
self
.
n
self
.
_variance_sum
+=
delta
*
(
value
-
self
.
_mean
)
self
.
_variance_sum
+=
delta
*
(
value
-
self
.
_
variance_
mean
)
@
property
@
property
def
mean
(
self
):
def
mean
(
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