From f23d1bec5cb23fe3c4fd64b817b3c0e3b4a31718 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Mon, 28 Jun 2010 21:19:46 +0000 Subject: [PATCH] my changes --- Robust/TransSim/FileSim.java | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/Robust/TransSim/FileSim.java b/Robust/TransSim/FileSim.java index 68b19c76..7223dc00 100644 --- a/Robust/TransSim/FileSim.java +++ b/Robust/TransSim/FileSim.java @@ -129,6 +129,8 @@ public class FileSim { ls14=null; } + int[] policies=new int[]{FlexScheduler.LAZY, FlexScheduler.COMMIT, FlexScheduler.ATTACK, FlexScheduler.SUICIDE, FlexScheduler.TIMESTAMP, FlexScheduler.LOCK, FlexScheduler.LOCKCOMMIT, FlexScheduler.RANDOM, FlexScheduler.KARMA, FlexScheduler.POLITE, FlexScheduler.ERUPTION, FlexScheduler.THREAD, FlexScheduler.ATTACKTIME, FlexScheduler.ATTACKTHREAD}; + public static void main(String[] args) throws Exception { //time between transactions //split objects @@ -141,13 +143,23 @@ public class FileSim { String filename=args[0]; Executor e=new Executor(filename); System.out.println(e.maxTime()); - if (args.length==1||args[1].equals("1")) - p1(e); - if (args.length==1||args[1].equals("2")) - p2(e); - if (args.length==1||args[1].equals("3")) - p3(e); - if (args.length==1||args[1].equals("4")) - p4(e); + + FlexScheduler fsarray[]=new FlexScheduler[args.length-1]; + + for(int i=1;i