Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
orchestrator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
orchestrator
Commits
ecbebe7a
Commit
ecbebe7a
authored
Jul 29, 2019
by
Thanassis Tsiodras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report the time it takes for each command to execute.
parent
f465c242
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
orchestrator/taste-orchestrator.py
orchestrator/taste-orchestrator.py
+8
-2
No files found.
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
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