From 867340b2dd5ad83b954fb14abe54c88c7a1f10c8 Mon Sep 17 00:00:00 2001 From: jihoonl Date: Tue, 2 Feb 2010 01:22:32 +0000 Subject: [PATCH] for test --- .../Recovery/SpamFilter/SpamFilter.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Robust/src/Benchmarks/Recovery/SpamFilter/SpamFilter.java b/Robust/src/Benchmarks/Recovery/SpamFilter/SpamFilter.java index 32df643f..6c2c0bf6 100644 --- a/Robust/src/Benchmarks/Recovery/SpamFilter/SpamFilter.java +++ b/Robust/src/Benchmarks/Recovery/SpamFilter/SpamFilter.java @@ -170,7 +170,11 @@ public class SpamFilter extends Thread { } public static void parseCmdLine(String args[], SpamFilter sf) { - int i = 0; + int i = 1; + + sf.nthreads = new Integer(args[0]).intValue(); + + String arg; while (i < args.length && args[i].startsWith("-")) { arg = args[i++]; @@ -183,11 +187,15 @@ public class SpamFilter extends Thread { if(i < args.length) { sf.numemail = new Integer(args[i++]).intValue(); } - } else if(arg.equals("-t")) { //num of threads + } + + /*else if(arg.equals("-t")) { //num of threads if(i < args.length) { sf.nthreads = new Integer(args[i++]).intValue(); } - } else if(arg.equals("-h")) { + } + */ + else if(arg.equals("-h")) { sf.usage(); } } @@ -200,10 +208,9 @@ public class SpamFilter extends Thread { * The usage routine describing the program **/ public void usage() { - System.out.println("usage: ./spamfilter -n -e -t \n"); + System.out.println("usage: ./spamfilter -n -e \n"); System.out.println( " -n : num iterations"); System.out.println( " -e : number of emails"); - System.out.println( " -t : number of threads"); } /** -- 2.34.1