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
alecs_myu
erp5
Commits
5f0fbd80
Commit
5f0fbd80
authored
Jan 23, 2012
by
Leonardo Rochael Almeida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid ZeroDivisionError when use-case takes less than 1 sec.
But Still store the use-case elapsed time as integer.
parent
4f0a8c34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
erp5/util/benchmark/result.py
erp5/util/benchmark/result.py
+2
-2
No files found.
erp5/util/benchmark/result.py
View file @
5f0fbd80
...
@@ -197,7 +197,7 @@ class BenchmarkResult(object):
...
@@ -197,7 +197,7 @@ class BenchmarkResult(object):
result_list
.
extend
(
missing_result_n
*
[
-
1
])
result_list
.
extend
(
missing_result_n
*
[
-
1
])
def
exitSuite
(
self
,
with_error
=
False
):
def
exitSuite
(
self
,
with_error
=
False
):
elapsed_time
=
int
(
time
.
time
()
-
self
.
_current_use_case_elapsed_time
)
elapsed_time
=
time
.
time
()
-
self
.
_current_use_case_elapsed_time
if
with_error
:
if
with_error
:
if
self
.
_current_suite_dict
[
'expected'
]
!=
-
1
:
if
self
.
_current_suite_dict
[
'expected'
]
!=
-
1
:
...
@@ -217,7 +217,7 @@ class BenchmarkResult(object):
...
@@ -217,7 +217,7 @@ class BenchmarkResult(object):
self
.
_current_suite_dict
[
'expected'
])
self
.
_current_suite_dict
[
'expected'
])
self
.
_current_suite_dict
[
'all_use_case_result_list'
].
append
(
self
.
_current_suite_dict
[
'all_use_case_result_list'
].
append
(
(
self
.
_current_use_case_counter
,
elapsed_time
))
(
self
.
_current_use_case_counter
,
int
(
elapsed_time
)
))
if
self
.
_current_use_case_counter
!=
0
:
if
self
.
_current_use_case_counter
!=
0
:
self
.
_current_suite_dict
[
'use_case_stat'
].
add
(
self
.
_current_suite_dict
[
'use_case_stat'
].
add
(
...
...
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