Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
eraser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenLicht
eraser
Commits
c159c0a6
Commit
c159c0a6
authored
5 years ago
by
BBQ
Browse files
Options
Downloads
Patches
Plain Diff
wait 1 sek after set the sensor values
parent
e81f3469
No related branches found
No related tags found
1 merge request
!19
dev to master
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmark/src/main/java/de/tudresden/inf/st/eraser/benchmark/Benchmark.java
+2
-3
2 additions, 3 deletions
.../java/de/tudresden/inf/st/eraser/benchmark/Benchmark.java
with
2 additions
and
3 deletions
benchmark/src/main/java/de/tudresden/inf/st/eraser/benchmark/Benchmark.java
+
2
−
3
View file @
c159c0a6
...
@@ -49,7 +49,6 @@ public class Benchmark {
...
@@ -49,7 +49,6 @@ public class Benchmark {
void
start
(){
void
start
(){
String
PREFERENCE_URL
=
"http://localhost:4567/model/items/iris1_item/state"
;
String
PREFERENCE_URL
=
"http://localhost:4567/model/items/iris1_item/state"
;
String
ACTIVITY_URL
=
"http://localhost:4567/activity/current"
;
String
ACTIVITY_URL
=
"http://localhost:4567/activity/current"
;
int
TIME_PERIOD
=
5000
;
File
a_file
;
File
a_file
;
File
p_file
;
File
p_file
;
FileReader
a_file_reader
;
FileReader
a_file_reader
;
...
@@ -73,7 +72,6 @@ public class Benchmark {
...
@@ -73,7 +72,6 @@ public class Benchmark {
i
++;
i
++;
}
}
else
{
else
{
try
{
Thread
.
sleep
(
TIME_PERIOD
);}
catch
(
InterruptedException
e
){
e
.
printStackTrace
();}
String
[]
values
=
Arrays
.
copyOf
(
a_next_record
,
12
);
String
[]
values
=
Arrays
.
copyOf
(
a_next_record
,
12
);
setNewValue
(
values
,
ACTIVITY_ITEM_NAME
,
"activity"
);
setNewValue
(
values
,
ACTIVITY_ITEM_NAME
,
"activity"
);
HttpResponse
response
=
Request
.
Get
(
ACTIVITY_URL
).
execute
().
returnResponse
();
HttpResponse
response
=
Request
.
Get
(
ACTIVITY_URL
).
execute
().
returnResponse
();
...
@@ -94,7 +92,6 @@ public class Benchmark {
...
@@ -94,7 +92,6 @@ public class Benchmark {
getCSVHeader
(
Arrays
.
copyOf
(
p_next_record
,
2
),
"p"
);
getCSVHeader
(
Arrays
.
copyOf
(
p_next_record
,
2
),
"p"
);
j
++;
j
++;
}
else
{
}
else
{
try
{
Thread
.
sleep
(
TIME_PERIOD
);}
catch
(
InterruptedException
e
){
e
.
printStackTrace
();}
String
[]
values1
=
Arrays
.
copyOf
(
p_next_record
,
2
);
String
[]
values1
=
Arrays
.
copyOf
(
p_next_record
,
2
);
setNewValue
(
values1
,
PREFERENCE_ITEM_NAME
,
"preference"
);
setNewValue
(
values1
,
PREFERENCE_ITEM_NAME
,
"preference"
);
HttpResponse
response1
=
Request
.
Get
(
PREFERENCE_URL
).
execute
().
returnResponse
();
HttpResponse
response1
=
Request
.
Get
(
PREFERENCE_URL
).
execute
().
returnResponse
();
...
@@ -116,6 +113,7 @@ public class Benchmark {
...
@@ -116,6 +113,7 @@ public class Benchmark {
}
}
private
void
setNewValue
(
String
[]
values
,
String
[]
name
,
String
file_typ
){
private
void
setNewValue
(
String
[]
values
,
String
[]
name
,
String
file_typ
){
int
TIME_PERIOD
=
1000
;
if
(
file_typ
.
equals
(
"activity"
))
if
(
file_typ
.
equals
(
"activity"
))
{
{
int
i
=
0
;
int
i
=
0
;
...
@@ -152,6 +150,7 @@ public class Benchmark {
...
@@ -152,6 +150,7 @@ public class Benchmark {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
try
{
Thread
.
sleep
(
TIME_PERIOD
);}
catch
(
InterruptedException
e
){
e
.
printStackTrace
();}
}
}
private
void
getCSVHeader
(
String
[]
a_values
,
String
csv_typ
){
private
void
getCSVHeader
(
String
[]
a_values
,
String
csv_typ
){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment