Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
W
workload-API
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
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
mowgli
workload-API
Commits
6a430a62
Commit
6a430a62
authored
May 14, 2020
by
Daniel Seybold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some fixes
parent
0048f2d9
Pipeline
#81142
passed with stage
in 18 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
src/main/java/de/uulm/omi/workload/tsbs/Runner.java
src/main/java/de/uulm/omi/workload/tsbs/Runner.java
+23
-4
No files found.
src/main/java/de/uulm/omi/workload/tsbs/Runner.java
View file @
6a430a62
...
...
@@ -23,7 +23,7 @@ public class Runner implements Runnable {
private
static
final
String
TSBS_BINARY
=
"/opt/workloads/tsbs/bin/"
;
//checking interval for TSBS commands
private
final
int
CHECKING_INTERVAL
=
500
0
;
private
final
int
CHECKING_INTERVAL
=
500
;
private
TSBSWorkload
workload
;
private
String
taskId
;
...
...
@@ -94,6 +94,7 @@ public class Runner implements Runnable {
}
LOGGER
.
debug
(
"Phase 2: query generation finished with exit code: "
+
workloadProcess
.
getExitCode
());
if
(
workloadProcess
.
getExitCode
()
!=
0
){
LOGGER
.
error
(
"Phase 3 finished with error exit code "
+
workloadProcess
.
getExitCode
());
Thread
.
currentThread
().
interrupt
();
return
;
}
...
...
@@ -151,11 +152,13 @@ public class Runner implements Runnable {
LOGGER
.
debug
(
"Load phase in process..."
);
Thread
.
sleep
(
CHECKING_INTERVAL
);
}
catch
(
InterruptedException
e
)
{
LOGGER
.
error
(
e
.
getMessage
());
e
.
printStackTrace
();
}
}
LOGGER
.
debug
(
"Phase 3: load phase finished with exit code: "
+
workloadProcess
.
getExitCode
());
if
(
workloadProcess
.
getExitCode
()
!=
0
){
LOGGER
.
error
(
"Phase 3 finished with error exit code "
+
workloadProcess
.
getExitCode
());
Thread
.
currentThread
().
interrupt
();
return
;
}
...
...
@@ -166,7 +169,7 @@ public class Runner implements Runnable {
//Execute Queries
String
executeQueriesCommand
=
TSBSCommandBuilder
.
executeQueriesCommand
(
TSBS_BINARY
,
properties
.
getProperty
(
WorkloadApiProperties
.
WORKLOAD_DATA_FOLDER
),
workload
.
getDbms
(),
workload
.
getTsbsQueryExecution
(),
workload
.
getDbEndpoints
()
);
executeQueriesCommand
+=
" &> "
+
properties
.
getProperty
(
WorkloadApiProperties
.
WORKLOAD_RESULTS_FOLDER
)
+
TSBS_RESULT_FOLDER
+
taskId
.
trim
()
+
".txt"
;
LOGGER
.
debug
(
load
Command
);
LOGGER
.
debug
(
executeQueries
Command
);
/*
commandToLog = executeQueriesCommand + System.getProperty("line.separator");
try {
...
...
@@ -177,12 +180,28 @@ public class Runner implements Runnable {
return;
}
*/
workloadProcess
=
WorkloadProcess
.
getInstance
();
workloadProcess
.
startWorkload
(
TSBS_BINARY
,
UNIX_SHELL
,
UNIX_COMMAND_PARAM
,
executeQueriesCommand
,
taskId
,
workloadTimestamp
);
while
(
workloadProcess
.
isRunning
())
{
try
{
LOGGER
.
debug
(
"Query phase in process..."
);
Thread
.
sleep
(
CHECKING_INTERVAL
);
}
catch
(
InterruptedException
e
)
{
LOGGER
.
error
(
e
.
getMessage
());
e
.
printStackTrace
();
}
}
if
(
workloadProcess
.
getExitCode
()
!=
0
){
LOGGER
.
error
(
"Phase 4 finished with error exit code "
+
workloadProcess
.
getExitCode
());
Thread
.
currentThread
().
interrupt
();
return
;
}
LOGGER
.
debug
(
"Phase 4: query execution finished"
);
}
}
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