From: <mar...@us...> - 2008-01-15 03:33:56
|
Revision: 83 http://gridsim.svn.sourceforge.net/gridsim/?rev=83&view=rev Author: marcos_dias Date: 2008-01-14 19:33:59 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Bug fix: + Gridlet history is created regardless the value of traceFlag Modified Paths: -------------- trunk/source/gridsim/GridSim.java trunk/source/gridsim/util/Workload.java Modified: trunk/source/gridsim/GridSim.java =================================================================== --- trunk/source/gridsim/GridSim.java 2007-12-16 23:08:32 UTC (rev 82) +++ trunk/source/gridsim/GridSim.java 2008-01-15 03:33:59 UTC (rev 83) @@ -103,6 +103,7 @@ private static Calendar calendar_ = null; // a Calendar object private static GridInformationService gis_ = null; // a GIS object private final static int NOT_FOUND = -1; // a constant + private static boolean traceFlag_; //////////////////////////////////////////////////////////////////////// @@ -542,6 +543,8 @@ Sim_system.initialise(); Sim_system.set_trc_level(1); Sim_system.set_auto_trace(traceFlag); + + traceFlag_ = traceFlag; // Set the current Wall clock time as the starting time of simulation calendar_ = cal; @@ -2131,6 +2134,15 @@ return GridSim.isResourceExist(id); } + + /** + * Checks whether simulation's statistics of other log should be created + * @return <tt>true</tt> if the information should be logged + * or <tt>false</tt> otherwise. + */ + public static boolean isTraceEnabled() { + return traceFlag_; + } /** * Gets the total number of PEs (Processing Elements) from a resource Modified: trunk/source/gridsim/util/Workload.java =================================================================== --- trunk/source/gridsim/util/Workload.java 2007-12-16 23:08:32 UTC (rev 82) +++ trunk/source/gridsim/util/Workload.java 2008-01-15 03:33:59 UTC (rev 83) @@ -738,7 +738,7 @@ { // create the gridlet int len = runTime * rating_; // calculate a job length for each PE - Gridlet gl = new Gridlet(id, len, size_, size_); + Gridlet gl = new Gridlet(id, len, size_, size_, GridSim.isTraceEnabled()); gl.setUserID( super.get_id() ); // set the owner ID gl.setNumPE(numProc); // set the requested num of proc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |