Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PaaSage
metrics_collector
Commits
d723265e
Commit
d723265e
authored
Oct 05, 2015
by
Kyriakos Kritikos
Browse files
small changes to MC
parent
e9e5cf66
Changes
5
Hide whitespace changes
Inline
Side-by-side
eu.paasage.executionware.metric-collector.command
View file @
d723265e
No preview for this file type
src/main/java/eu/paasage/executionware/metric_collector/MetricCollector.java
View file @
d723265e
...
...
@@ -238,6 +238,7 @@ public class MetricCollector implements MetricCollection{
String
modeStr
=
props
.
getProperty
(
"mode"
);
if
(
modeStr
==
null
||
modeStr
.
equals
(
"local"
))
mode
=
Mode
.
LOCAL
;
else
if
(
modeStr
.
equals
(
"global"
))
mode
=
Mode
.
GLOBAL
;
System
.
out
.
println
(
"Mode is: "
+
mode
);
String
pubStr
=
props
.
getProperty
(
"runServer"
);
if
(
pubStr
==
null
||
pubStr
.
equals
(
"false"
))
runServer
=
false
;
else
if
(
pubStr
.
equals
(
"true"
))
runServer
=
true
;
...
...
src/main/java/eu/paasage/executionware/metric_collector/MetricHandler.java
View file @
d723265e
...
...
@@ -110,7 +110,8 @@ public class MetricHandler implements Runnable{
else
{
Thread
.
currentThread
().
setPriority
(
Thread
.
MIN_PRIORITY
);
}
MetricStorageWithBlockingQueue
.
storeMeasurement
(
value
,
ID
,
ecID
,
measurementType
,
object
,
object2
);
//MetricStorageWithBlockingQueue.storeMeasurement(value,ID,ecID,measurementType,object,object2);
MetricStorage
.
storeMeasurement
(
value
,
ID
,
ecID
,
measurementType
,
object
,
object2
);
pw
.
println
(
""
+
value
);
pw
.
flush
();
}
...
...
src/main/java/eu/paasage/executionware/metric_collector/Test.java
View file @
d723265e
...
...
@@ -536,6 +536,7 @@ public class Test {
idArray2
[
i
]
=
(
CDOID
)
array2
[
i
];
System
.
out
.
println
(
"Second array gets: "
+
idArray2
[
i
]);
}
//mc1 = new MetricCollector("/home/kyriakos/Desktop/collector-test");
mc1
=
new
MetricCollector
(
"/home/kyriakos/Desktop/collector-test"
);
mc1
.
readMetrics
(
idArray
,
ecID
);
try
{
...
...
@@ -665,10 +666,10 @@ public class Test {
* (a) comment next line code and (b) uncomment the last
* commented lines of code
*/
runExcessiveTest
(
ids
.
iterator
().
next
());
//
runExcessiveTest(ids.iterator().next());
//ExecutorService lis = Executors.newFixedThreadPool(3);
//startCDOListeners("test",lis);
/*
ExecutorService thr = Executors.newFixedThreadPool(2);
ExecutorService
thr
=
Executors
.
newFixedThreadPool
(
2
);
startRawMetricThreads
(
"test"
,
thr
);
ExecutorService
subscribers
=
Executors
.
newFixedThreadPool
(
3
);
startSubscribers
(
"test"
,
subscribers
);
...
...
@@ -691,6 +692,6 @@ public class Test {
thr
.
shutdownNow
();
subscribers
.
shutdown
();
mc1
.
terminate
();
mc2.terminate();
*/
mc2
.
terminate
();
}
}
src/main/java/eu/paasage/executionware/metric_collector/TimeThread.java
View file @
d723265e
...
...
@@ -18,6 +18,7 @@ public class TimeThread extends Thread{
public
void
run
()
{
try
{
Thread
.
sleep
(
deadline
);
System
.
out
.
println
(
"Will now commit transaction"
);
MetricStorage
.
commitTransaction
(
true
);
}
catch
(
Exception
e
){
...
...
Write
Preview
Supports
Markdown
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