Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
orchestrator
Commits
ecbebe7a
Commit
ecbebe7a
authored
Jul 29, 2019
by
Thanassis Tsiodras
Browse files
Report the time it takes for each command to execute.
parent
f465c242
Changes
1
Hide whitespace changes
Inline
Side-by-side
orchestrator/taste-orchestrator.py
View file @
ecbebe7a
...
...
@@ -148,9 +148,12 @@ def mysystem(x, outputDir=None):
g_log
=
open
(
outputDir
+
os
.
sep
+
"log.txt"
,
"w"
)
return
g_log
.
write
(
"From: "
+
os
.
getcwd
()
+
"
\n
"
)
g_log
.
write
(
x
+
"
\n
"
)
g_log
.
flush
()
startTime
=
time
.
time
()
while
os
.
system
(
x
)
!=
0
:
deltaTime
=
'Took %4.1f sec: '
%
(
time
.
time
()
-
startTime
)
g_log
.
write
(
deltaTime
+
x
+
"
\n
"
)
g_log
.
flush
()
startTime
=
time
.
time
()
# Save the environment that was used for the failed command under OUTPUT_FOLDER/env.txt
if
g_absOutputDir
!=
""
:
os
.
system
(
'env > "'
+
g_absOutputDir
+
os
.
sep
+
'env.txt"'
)
...
...
@@ -169,6 +172,9 @@ def mysystem(x, outputDir=None):
panic
(
"
\n
Failed to compile..."
)
else
:
panic
(
"Failed while executing:
\n
"
+
x
+
"
\n
From this directory:
\n
"
+
os
.
getcwd
())
deltaTime
=
'Took %4.1f sec: '
%
(
time
.
time
()
-
startTime
)
g_log
.
write
(
deltaTime
+
x
+
"
\n
"
)
g_log
.
flush
()
def
getSingleLineFromCmdOutput
(
cmd
):
...
...
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