Changeset 241
- Timestamp:
- 10/05/11 18:45:03 (13 years ago)
- Location:
- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench
- Files:
-
- 1 deleted
- 7 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDcalcCoverage.java
r240 r241 34 34 public void run(List<Object> parameters) { 35 35 String modelname; 36 String observedName; 36 37 String[] sequenceNames; 37 38 int minLength; 38 39 int maxLength; 39 String observedName = "sequences";40 40 try { 41 41 modelname = (String) parameters.get(0); 42 sequenceNames = (String[]) parameters.get(1); 43 minLength = Integer.parseInt((String) parameters.get(2)); 44 maxLength = Integer.parseInt((String) parameters.get(3)); 45 if (parameters.size() == 5) { 46 observedName = (String) parameters.get(4); 47 } 42 observedName = (String) parameters.get(1); 43 sequenceNames = (String[]) parameters.get(2); 44 minLength = Integer.parseInt((String) parameters.get(3)); 45 maxLength = Integer.parseInt((String) parameters.get(4)); 48 46 } catch (Exception e) { 49 47 throw new InvalidParameterException(); … … 138 136 @Override 139 137 public void help() { 140 Console.println("Usage: calcCoverage <modelname> [sequenceNames] <minCovLength> <maxCovLength>");138 Console.println("Usage: calcCoverage <modelname> <observedSequences> [sequenceNames] <minCovLength> <maxCovLength>"); 141 139 } 142 140 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateRandomSequences.java
r240 r241 33 33 String sequencesName; 34 34 int numSessions; 35 long maxIter;36 35 int minLength = 0; 37 36 int maxLength = Integer.MAX_VALUE; 37 long maxIter; 38 38 try { 39 39 modelname = (String) parameters.get(0); 40 40 sequencesName = (String) parameters.get(1); 41 41 numSessions = Integer.parseInt((String) parameters.get(2)); 42 minLength = Integer.parseInt((String) parameters.get(3)); 43 maxLength = Integer.parseInt((String) parameters.get(4)); 42 44 maxIter = numSessions * 10; 43 if (parameters.size() >= 4) {44 maxIter = Long.parseLong((String) parameters.get(3));45 }46 45 if (parameters.size() >= 5) { 47 minLength = Integer.parseInt((String) parameters.get(4)); 48 } 49 if (parameters.size() >= 6) { 50 maxLength = Integer.parseInt((String) parameters.get(5)); 46 maxIter = Long.parseLong((String) parameters.get(5)); 51 47 } 52 48 } catch (Exception e) { … … 94 90 @Override 95 91 public void help() { 96 Console.println("Usage: generateRandomSequenecs <modelName> <sequencesName> <numSessions> {<maxIter> <minLength> <maxLength>}");92 Console.println("Usage: generateRandomSequenecs <modelName> <sequencesName> <numSessions> <minLength> <maxLength> {<maxIter>}"); 97 93 } 98 94 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateReplayfile.java
r240 r241 30 30 @Override 31 31 public void help() { 32 Console.println("Usage: generateReplayfile <filename> {<sequences>}");32 Console.println("Usage: generateReplayfile <filename> <sequences>"); 33 33 } 34 34 … … 41 41 @Override 42 42 public void run(List<Object> parameters) { 43 if (parameters.size() < 1) { 43 String filename; 44 String sequencesName; 45 try { 46 filename = (String) parameters.get(0); 47 sequencesName = (String) parameters.get(1); 48 } catch (Exception e) { 44 49 throw new InvalidParameterException(); 45 }46 String filename = (String) parameters.get(0);47 String sequencesName = "sequences";48 if (parameters.size() == 2) {49 sequencesName = (String) parameters.get(1);50 50 } 51 51 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDload.java
r211 r241 56 56 @Override 57 57 public void help() { 58 Console.println("Usage: load Object<filename>");58 Console.println("Usage: load <filename>"); 59 59 } 60 60 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsave.java
r211 r241 54 54 @Override 55 55 public void help() { 56 Console.println("Usage: save Object<filename>");56 Console.println("Usage: save <filename>"); 57 57 } 58 58 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsequenceStatistics.java
r240 r241 1 1 package de.ugoe.cs.eventbench.commands; 2 2 3 import java.security.InvalidParameterException; 3 4 import java.util.Collection; 4 5 import java.util.List; … … 33 34 @Override 34 35 public void run(List<Object> parameters) { 35 String sequencesName = "sequences";36 if (parameters.size() == 1){36 String sequencesName; 37 try { 37 38 sequencesName = (String) parameters.get(0); 39 } catch (Exception e) { 40 throw new InvalidParameterException(); 38 41 } 39 42 … … 52 55 53 56 sequences = (Collection<List<Event<?>>>) dataObject; 54 Console. traceln("Number of Sequences: " + sequences.size());57 Console.println("Number of Sequences: " + sequences.size()); 55 58 SortedMap<Integer, Integer> lengthMap = new TreeMap<Integer, Integer>(); 56 59 for (List<Event<?>> sequence : sequences) { … … 63 66 } 64 67 for (Entry<Integer, Integer> entry : lengthMap.entrySet()) { 65 Console. traceln("Of length " + entry.getKey() + ": "68 Console.println("Of length " + entry.getKey() + ": " 66 69 + entry.getValue()); 67 70 } … … 75 78 @Override 76 79 public void help() { 77 Console.println("Usage: sequenceStatistics {<sequencesName>}");80 Console.println("Usage: sequenceStatistics <sequencesName>"); 78 81 } 79 82 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowTimer.java
r240 r241 46 46 long startTime = (Long) dataObject; 47 47 long currentTime = System.currentTimeMillis(); 48 Console.println("" + (currentTime - startTime) + " mil iseconds");48 Console.println("" + (currentTime - startTime) + " milliseconds"); 49 49 } 50 50 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/commands/CMDloadWebSequences.java
r240 r241 23 23 * @version 1.0 24 24 */ 25 public class CMDload SessionsFromClickstreamimplements Command {25 public class CMDloadWebSequences implements Command { 26 26 27 27 /* … … 112 112 @Override 113 113 public void help() { 114 Console.println("Usage: load SessionsFromClickstream<filename> <sequencesName> {<serverUrl>} {<timeout> <minSessionLength> <maxSessionLength>} {<generateFrequentUsers> <frequentUserThreshold>}");114 Console.println("Usage: loadWebSequences <filename> <sequencesName> {<serverUrl>} {<timeout> <minSessionLength> <maxSessionLength>} {<generateFrequentUsers> <frequentUserThreshold>}"); 115 115 } 116 116
Note: See TracChangeset
for help on using the changeset viewer.