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
Iliya Manolov
erp5
Commits
cee58353
Commit
cee58353
authored
Sep 06, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show the full traceback when raising an exception.
parent
b0be02a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
erp5/util/benchmark/result.py
erp5/util/benchmark/result.py
+10
-6
No files found.
erp5/util/benchmark/result.py
View file @
cee58353
...
@@ -32,6 +32,7 @@ import os
...
@@ -32,6 +32,7 @@ import os
import
csv
import
csv
import
logging
import
logging
import
signal
import
signal
import
traceback
class
BenchmarkResultStatistic
(
object
):
class
BenchmarkResultStatistic
(
object
):
def
__init__
(
self
,
suite
,
label
):
def
__init__
(
self
,
suite
,
label
):
...
@@ -165,7 +166,7 @@ class BenchmarkResult(object):
...
@@ -165,7 +166,7 @@ class BenchmarkResult(object):
self
.
_all_result_list
=
[]
self
.
_all_result_list
=
[]
@
abc
.
abstractmethod
@
abc
.
abstractmethod
def
__exit__
(
self
,
exc_type
,
exc_value
,
traceback
):
def
__exit__
(
self
,
exc_type
,
exc_value
,
traceback
_object
):
signal
.
signal
(
signal
.
SIGTERM
,
signal
.
SIG_IGN
)
signal
.
signal
(
signal
.
SIGTERM
,
signal
.
SIG_IGN
)
self
.
flush
(
partial
=
False
)
self
.
flush
(
partial
=
False
)
return
True
return
True
...
@@ -215,13 +216,15 @@ class CSVBenchmarkResult(BenchmarkResult):
...
@@ -215,13 +216,15 @@ class CSVBenchmarkResult(BenchmarkResult):
super
(
CSVBenchmarkResult
,
self
).
flush
(
partial
)
super
(
CSVBenchmarkResult
,
self
).
flush
(
partial
)
def
__exit__
(
self
,
exc_type
,
exc_value
,
traceback
):
def
__exit__
(
self
,
exc_type
,
exc_value
,
traceback_object
):
super
(
CSVBenchmarkResult
,
self
).
__exit__
(
exc_type
,
exc_value
,
traceback
)
super
(
CSVBenchmarkResult
,
self
).
__exit__
(
exc_type
,
exc_value
,
traceback_object
)
self
.
_result_file
.
close
()
self
.
_result_file
.
close
()
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
.
logger
.
error
(
"%s: %s"
%
(
exc_type
,
exc_value
))
self
.
logger
.
error
(
"%s:
\
n
%s"
%
(
exc_value
,
''
.
join
(
traceback
.
format_tb
(
traceback_object
))))
raise
RuntimeError
(
msg
)
raise
RuntimeError
(
msg
)
from
cStringIO
import
StringIO
from
cStringIO
import
StringIO
...
@@ -260,8 +263,9 @@ class ERP5BenchmarkResult(BenchmarkResult):
...
@@ -260,8 +263,9 @@ class ERP5BenchmarkResult(BenchmarkResult):
super
(
ERP5BenchmarkResult
,
self
).
flush
()
super
(
ERP5BenchmarkResult
,
self
).
flush
()
def
__exit__
(
self
,
exc_type
,
exc_value
,
traceback
):
def
__exit__
(
self
,
exc_type
,
exc_value
,
traceback_object
):
super
(
ERP5BenchmarkResult
,
self
).
__exit__
(
exc_type
,
exc_value
,
traceback
)
super
(
ERP5BenchmarkResult
,
self
).
__exit__
(
exc_type
,
exc_value
,
traceback_object
)
@
staticmethod
@
staticmethod
def
createResultDocument
(
publish_url
,
publish_project
,
repeat
,
nb_users
):
def
createResultDocument
(
publish_url
,
publish_project
,
repeat
,
nb_users
):
...
...
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