aplcache

Details

diff --git a/src/main/java/br/ufrgs/inf/prosoft/aplcache/Main.java b/src/main/java/br/ufrgs/inf/prosoft/aplcache/Main.java
index 639a57a..26463fb 100644
--- a/src/main/java/br/ufrgs/inf/prosoft/aplcache/Main.java
+++ b/src/main/java/br/ufrgs/inf/prosoft/aplcache/Main.java
@@ -35,7 +35,7 @@ public class Main {
         System.setProperty("java.util.logging.SimpleFormatter.format", "[%1$tF %1$tT+%1$tL] [%4$-7s] [APLCache] %5$s %n");
 
         if (args.length < 2) {
-            System.err.println("--trace=<TracePath> --output=<OutputPath> [--mode=<complete|hashed|partial>] [--k=<kStandardDeviation>]");
+            System.err.println("--trace=<TracePath> --output=<OutputPath> [--mode=<complete|hashed|partial>] [--k=<kStandardDeviation>] [--window=<windowSize>] [--shift=<shiftTime>]");
             System.exit(1);
         }
 
@@ -80,10 +80,22 @@ public class Main {
             }
         }
 
+        Long window = null;
+        try {
+            window = Long.valueOf(arguments.get("window"));
+        } catch (NumberFormatException ex) {
+        }
+        Long shift = null;
+        try {
+            shift = Long.valueOf(arguments.get("shift"));
+        } catch (NumberFormatException ex) {
+        }
+
         LOGGER.log(Level.INFO, "Reading traces");
-        List<Trace> traces = TraceReader.parseFile(tracePath, Mode.valueOf(mode.toUpperCase()));
+        List<Trace> traces = TraceReader.parseFile(tracePath, Mode.valueOf(mode.toUpperCase()), window, shift);
         LOGGER.log(Level.INFO, "Grouping {0} traces by methods", traces.size());
         List<Method> methods = TraceReader.groupByMethods(traces);
+        LOGGER.log(Level.INFO, "grouped traces into {1} methods", methods.size());
         FlowchartWorkFlow flowchartWorkFlow = new FlowchartWorkFlow();
         flowchartWorkFlow.setMethods(methods);
         LOGGER.log(Level.INFO, "Filtering cacheable methods");