Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
88da5cb8
Commit
88da5cb8
authored
Apr 24, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix cast exception error
parent
f98f2b58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
12 deletions
+25
-12
DeployService.java
.../main/java/nl/uva/sne/drip/api/service/DeployService.java
+13
-12
SysbenchCPUBenchmark.java
...e/drip/data/v1/external/ansible/SysbenchCPUBenchmark.java
+12
-0
No files found.
drip-api/src/main/java/nl/uva/sne/drip/api/service/DeployService.java
View file @
88da5cb8
...
@@ -308,10 +308,10 @@ public class DeployService {
...
@@ -308,10 +308,10 @@ public class DeployService {
Double
executionTime
=
getExecutionTime
(
out
[
14
]);
Double
executionTime
=
getExecutionTime
(
out
[
14
]);
int
totalNumberOfEvents
=
getTotalNumberOfEvents
(
out
[
15
]);
int
totalNumberOfEvents
=
getTotalNumberOfEvents
(
out
[
15
]);
long
minExecutionTimePerRequest
=
getMinExecutionTimePerRequest
(
out
[
18
]);
double
minExecutionTimePerRequest
=
getMinExecutionTimePerRequest
(
out
[
18
]);
long
avgExecutionTimePerRequest
=
getAvgExecutionTimePerRequest
(
out
[
19
]);
double
avgExecutionTimePerRequest
=
getAvgExecutionTimePerRequest
(
out
[
19
]);
long
maxExecutionTimePerRequest
=
getMaxExecutionTimePerRequest
(
out
[
20
]);
double
maxExecutionTimePerRequest
=
getMaxExecutionTimePerRequest
(
out
[
20
]);
long
approx95Percentile
=
getApprox95Percentile
(
out
[
21
]);
double
approx95Percentile
=
getApprox95Percentile
(
out
[
21
]);
double
avgEventsPerThread
=
getAvgEventsPerThread
(
out
[
24
]);
double
avgEventsPerThread
=
getAvgEventsPerThread
(
out
[
24
]);
double
stddevEventsPerThread
=
getStddevEventsPerThread
(
out
[
24
]);
double
stddevEventsPerThread
=
getStddevEventsPerThread
(
out
[
24
]);
...
@@ -333,6 +333,7 @@ public class DeployService {
...
@@ -333,6 +333,7 @@ public class DeployService {
b
.
setAvgExecTimePerThread
(
avgExecutionTimePerRequest
);
b
.
setAvgExecTimePerThread
(
avgExecutionTimePerRequest
);
b
.
setMaxExecutionTimePerRequest
(
maxExecutionTimePerRequest
);
b
.
setMaxExecutionTimePerRequest
(
maxExecutionTimePerRequest
);
b
=
(
SysbenchCPUBenchmark
)
benchmarkResultService
.
save
(
b
);
b
=
(
SysbenchCPUBenchmark
)
benchmarkResultService
.
save
(
b
);
b
.
setAnsibleOutputID
(
ansOut
.
getId
());
return
b
;
return
b
;
default
:
default
:
...
@@ -376,20 +377,20 @@ public class DeployService {
...
@@ -376,20 +377,20 @@ public class DeployService {
return
Double
.
valueOf
(
string
.
replaceAll
(
"execution time (avg/stddev):"
,
""
).
replaceAll
(
"s"
,
""
).
trim
().
split
(
"/"
)[
0
]);
return
Double
.
valueOf
(
string
.
replaceAll
(
"execution time (avg/stddev):"
,
""
).
replaceAll
(
"s"
,
""
).
trim
().
split
(
"/"
)[
0
]);
}
}
private
long
getMinExecutionTimePerRequest
(
String
string
)
{
private
double
getMinExecutionTimePerRequest
(
String
string
)
{
return
Long
.
valueOf
(
string
.
replaceAll
(
"min:"
,
""
).
replaceAll
(
"ms"
,
""
).
trim
());
return
Double
.
valueOf
(
string
.
replaceAll
(
"min:"
,
""
).
replaceAll
(
"ms"
,
""
).
trim
());
}
}
private
long
getAvgExecutionTimePerRequest
(
String
string
)
{
private
double
getAvgExecutionTimePerRequest
(
String
string
)
{
return
Long
.
valueOf
(
string
.
replaceAll
(
"avg:"
,
""
).
replaceAll
(
"ms"
,
""
).
trim
());
return
Double
.
valueOf
(
string
.
replaceAll
(
"avg:"
,
""
).
replaceAll
(
"ms"
,
""
).
trim
());
}
}
private
long
getMaxExecutionTimePerRequest
(
String
string
)
{
private
double
getMaxExecutionTimePerRequest
(
String
string
)
{
return
Long
.
valueOf
(
string
.
replaceAll
(
"max:"
,
""
).
replaceAll
(
"ms"
,
""
).
trim
());
return
Double
.
valueOf
(
string
.
replaceAll
(
"max:"
,
""
).
replaceAll
(
"ms"
,
""
).
trim
());
}
}
private
long
getApprox95Percentile
(
String
string
)
{
private
double
getApprox95Percentile
(
String
string
)
{
return
Long
.
valueOf
(
string
.
replaceAll
(
"approx. 95 percentile::"
,
""
).
replaceAll
(
"ms"
,
""
).
trim
());
return
Double
.
valueOf
(
string
.
replaceAll
(
"approx. 95 percentile::"
,
""
).
replaceAll
(
"ms"
,
""
).
trim
());
}
}
}
}
drip-api/src/main/java/nl/uva/sne/drip/data/v1/external/ansible/SysbenchCPUBenchmark.java
View file @
88da5cb8
...
@@ -38,6 +38,7 @@ public class SysbenchCPUBenchmark extends BenchmarkResult {
...
@@ -38,6 +38,7 @@ public class SysbenchCPUBenchmark extends BenchmarkResult {
private
double
avgExecutionTimePerRequest
;
private
double
avgExecutionTimePerRequest
;
private
double
maxExecutionTimePerRequest
;
private
double
maxExecutionTimePerRequest
;
private
double
approx95Percentile
;
private
double
approx95Percentile
;
private
String
ansibleOutputID
;
/**
/**
* @return the sysbenchVersion
* @return the sysbenchVersion
...
@@ -207,4 +208,15 @@ public class SysbenchCPUBenchmark extends BenchmarkResult {
...
@@ -207,4 +208,15 @@ public class SysbenchCPUBenchmark extends BenchmarkResult {
this
.
approx95Percentile
=
approx95Percentile
;
this
.
approx95Percentile
=
approx95Percentile
;
}
}
public
void
setAnsibleOutputID
(
String
ansibleOutputID
)
{
this
.
ansibleOutputID
=
ansibleOutputID
;
}
/**
* @return the ansibleOutputID
*/
public
String
getAnsibleOutputID
()
{
return
ansibleOutputID
;
}
}
}
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