Commit d723265e authored by Kyriakos Kritikos's avatar Kyriakos Kritikos
Browse files

small changes to MC

parent e9e5cf66
......@@ -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;
......
......@@ -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();
}
......
......@@ -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();
}
}
......@@ -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){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment