- Timestamp:
- 11/26/13 11:56:07 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/simulator/DataCenterWorkloadSimulator.java
r1142 r1207 14 14 import javax.swing.filechooser.FileFilter; 15 15 16 import org.apache.commons.io.FilenameUtils; 16 17 import org.apache.commons.logging.Log; 17 18 import org.apache.commons.logging.LogFactory; … … 21 22 22 23 import schedframe.Initializable; 23 import schedframe. ResourceController;24 import schedframe.SimulatedEnvironment; 24 25 import simulator.reader.ResourceReader; 25 26 import simulator.stats.AccumulatedStatistics; … … 51 52 * The name of the simulator application 52 53 */ 53 public static final String SIMULATOR_NAME = "Data Center Workload Simulator"; 54 public static final String SIMULATOR_NAME = "Data Center Workload and Resource Management Simulator"; 55 56 /** 57 * The simulation mode 58 */ 59 public static String MODE = "Standard"; 54 60 55 61 /** … … 183 189 } 184 190 185 if (log.isInfoEnabled()) 191 if (log.isInfoEnabled()){ 186 192 log.info("Done :: " + SIMULATOR_NAME + " has finished " 187 193 + noOfSimulations + " simulation runs ::"); 194 log.info("Simulation finished with status: 0"); 195 } 188 196 189 197 System.out.flush(); … … 259 267 260 268 ResourceReader resourceReader = new ResourceReader( 261 options );262 ResourceControllerrc = resourceReader.read();269 options.resdescFileName); 270 SimulatedEnvironment rc = resourceReader.read(); 263 271 eventManager = new EventManager("eventManager", rc); 264 272 … … 268 276 rc.setInitList(null); 269 277 270 DCWormsUsers wl= new DCWormsUsers("Users",278 DCWormsUsers users = new DCWormsUsers("Users", 271 279 rc.getScheduler().get_name(), workload); 272 280 281 System.out.println("Starting simulation..."); 282 273 283 GridSimWrapper.startSimulation(); 274 284 long stopSimulation = System.currentTimeMillis(); 275 285 286 System.out.println("Simulation finished"); 287 276 288 DCWormsStatistics stats = new DCWormsStatistics(simulationIdentifier, 277 options, wl, statsOutputPath, rc);289 options, users, statsOutputPath, rc); 278 290 accumulatedStatistics.add(stats); 279 291 if (log.isInfoEnabled()) … … 301 313 String wlFileName = options.inputWorkloadFileName; 302 314 315 String appProfilesFolder = options.appProfilesFolder; 303 316 if (options.inputFolder != null) { 304 317 File f = null; … … 318 331 swfReader = AbstractWAReader.getInstace(wlFileName); 319 332 320 WorkloadLoader workload = new WorkloadLoader(xmlJobReader, swfReader );333 WorkloadLoader workload = new WorkloadLoader(xmlJobReader, swfReader, appProfilesFolder); 321 334 workload.load(); 322 335 … … 346 359 prefix = options.inputFolder; 347 360 } else if (options.inputWorkloadFileName != null) { 348 prefix = new File(options.inputWorkloadFileName).getParent();361 prefix = FilenameUtils.getFullPath(new File(options.inputWorkloadFileName).getAbsolutePath()); 349 362 } else { 350 363 prefix = System.getProperty("user.dir"); 351 364 } 352 statsOutputPath = prefix + File.separator 353 + options.statsOutputSubfolderNameRerad; 365 //statsOutputPath = prefix + File.separator 366 // + options.statsOutputSubfolderNameRead; 367 statsOutputPath = options.statsOutputSubfolderNameRead; 354 368 } 355 369 statsOutputPath += File.separator;
Note: See TracChangeset
for help on using the changeset viewer.