Changeset 98 for trunk/EventBenchConsole/src/de/ugoe/cs
- Timestamp:
- 07/04/11 11:59:17 (13 years ago)
- Location:
- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/ReplayGenerator.java
r90 r98 15 15 16 16 private IReplayDecorator decorator = null; 17 18 int sessionId = 1; 17 19 18 20 public void createLogfileMultipleSessions(List<List<ReplayableEvent<?>>> sequences, String filename) { … … 85 87 throws IOException { 86 88 if( decorator!=null ) { 87 writer.write(decorator.getSessionHeader( ));89 writer.write(decorator.getSessionHeader(sessionId)); 88 90 } 89 91 for( ReplayableEvent<?> currentAction : actions ) { … … 96 98 } 97 99 if( decorator!=null ) { 98 writer.write(decorator.getSessionFooter( ));100 writer.write(decorator.getSessionFooter(sessionId)); 99 101 } 102 sessionId++; 100 103 } 101 104 -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateReplayfile.java
r84 r98 27 27 String sequencesName = "sequences"; 28 28 if( parameters.size()==2 ) { 29 sequencesName = (String) parameters.get( 0);29 sequencesName = (String) parameters.get(1); 30 30 } 31 31 … … 36 36 sequences = (List<List<ReplayableEvent<?>>>) dataObject; 37 37 ReplayGenerator generator = new ReplayGenerator(); 38 if( sequences.size()>0 ) { 39 if( sequences.get(0).get(0) instanceof Event ) { 40 generator.createLogfileMultipleSessions(sequences, filename); 41 } else { 42 Console.printerrln("Loaded data not are not sequences!"); 43 if( sequencesName.equals("sequences") ) { 44 Console.traceln("Illegal use of \"sequences\" parameter in the GlobalDataContainer."); 45 Console.traceln("The parameter should always be of type List<List<Event>>!"); 46 } 38 if( sequences!=null && sequences.size()>0 && sequences.get(0).get(0) instanceof Event ) { 39 generator.createLogfileMultipleSessions(sequences, filename); 40 } else { 41 Console.printerrln("Loaded data not are not sequences!"); 42 if( sequencesName.equals("sequences") ) { 43 Console.traceln("Illegal use of \"sequences\" parameter in the GlobalDataContainer."); 44 Console.traceln("The parameter should always be of type List<List<Event>>!"); 47 45 } 48 46 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MFCReplayDecorator.java
r87 r98 35 35 36 36 @Override 37 public String getSessionHeader( ) {38 return " <session >" + StringTools.ENDLINE;37 public String getSessionHeader(int sessionId) { 38 return " <session id=\""+sessionId+"\">" + StringTools.ENDLINE; 39 39 } 40 40 41 41 @Override 42 public String getSessionFooter( ) {42 public String getSessionFooter(int sessionId) { 43 43 return " </session>" + StringTools.ENDLINE; 44 44 }
Note: See TracChangeset
for help on using the changeset viewer.