Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
dmt
Commits
918738c9
Commit
918738c9
authored
Jul 29, 2019
by
Thanassis Tsiodras
Browse files
Add profiling option, to track where the time is spent.
parent
df4e859d
Changes
2
Hide whitespace changes
Inline
Side-by-side
dmt/aadl2glueC.py
View file @
918738c9
...
...
@@ -452,6 +452,24 @@ def main() -> None:
import
pdb
# pragma: no cover pylint: disable=wrong-import-position,wrong-import-order
pdb
.
set_trace
()
# pragma: no cover
if
"-profile"
in
sys
.
argv
:
sys
.
argv
.
remove
(
"-profile"
)
import
cProfile
import
pstats
import
io
pr
=
cProfile
.
Profile
()
pr
.
enable
()
import
atexit
def
dumpSpeedData
():
pr
.
disable
()
s
=
io
.
StringIO
()
sortby
=
'cumulative'
ps
=
pstats
.
Stats
(
pr
,
stream
=
s
).
sort_stats
(
sortby
)
ps
.
print_stats
()
print
(
s
.
getvalue
())
atexit
.
register
(
dumpSpeedData
)
if
"-v"
in
sys
.
argv
:
import
pkg_resources
# pragma: no cover
version
=
pkg_resources
.
require
(
"dmt"
)[
0
].
version
# pragma: no cover
...
...
setup.py
View file @
918738c9
...
...
@@ -11,7 +11,7 @@ from setuptools import setup, find_packages
setup
(
name
=
'dmt'
,
version
=
"2.1.3
1
"
,
version
=
"2.1.3
2
"
,
packages
=
find_packages
(),
author
=
'Thanassis Tsiodras'
,
author_email
=
'Thanassis.Tsiodras@esa.int'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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