From: <nik...@us...> - 2015-11-17 17:00:24
|
Revision: 2403 http://sourceforge.net/p/jsbml/code/2403 Author: niko-rodrigue Date: 2015-11-17 17:00:21 +0000 (Tue, 17 Nov 2015) Log Message: ----------- removed some debug outputs or comments Modified Paths: -------------- trunk/core/src/org/sbml/jsbml/AbstractSBase.java trunk/core/test/org/sbml/jsbml/test/PerformanceTest.java trunk/test/org/sbml/jsbml/test/PackageVersionTests.java Modified: trunk/core/src/org/sbml/jsbml/AbstractSBase.java =================================================================== --- trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2015-11-17 13:13:46 UTC (rev 2402) +++ trunk/core/src/org/sbml/jsbml/AbstractSBase.java 2015-11-17 17:00:21 UTC (rev 2403) @@ -2173,8 +2173,6 @@ parentPackageVersion = parentPlugin.getPackageVersion(); } - System.out.println("setPackageVersion - packageVersion = " + packageVersion + ", parentPackageVersion = " + parentPackageVersion); - if (packageVersion != -1 && parentPackageVersion != -1 && packageVersion != parentPackageVersion) { if (parentPlugin != null) { throw new LevelVersionError(parentPlugin, this); Modified: trunk/core/test/org/sbml/jsbml/test/PerformanceTest.java =================================================================== --- trunk/core/test/org/sbml/jsbml/test/PerformanceTest.java 2015-11-17 13:13:46 UTC (rev 2402) +++ trunk/core/test/org/sbml/jsbml/test/PerformanceTest.java 2015-11-17 17:00:21 UTC (rev 2403) @@ -25,7 +25,9 @@ import java.io.File; import java.io.FileFilter; import java.io.IOException; +import java.util.ArrayList; import java.util.Calendar; +import java.util.List; import javax.xml.stream.XMLStreamException; @@ -41,6 +43,9 @@ */ public class PerformanceTest { + private static final double THRESHOLD = 1; + private static final List<String> modelLongerThanThresholdList = new ArrayList<String>(); + /** * Test class used to check the jsbml speed to read and write SBML models. * @@ -146,12 +151,20 @@ System.out.println("Reading: " + nbSecondsRead + " seconds."); System.out.println("Writing: " + nbSecondsWrite + " seconds."); + if (nbSeconds > THRESHOLD) { + modelLongerThanThresholdList.add(fileName); + } + if (files.length == 1) { System.out.println((int)nbMilliseconds); } } + if (modelLongerThanThresholdList.size() > 0) { + System.out.println("Models longer than '" + THRESHOLD + "' secondes: " + modelLongerThanThresholdList); + } + if (files.length > 1) { double globalNbMilliseconds = globalEnd - globalInit; @@ -163,6 +176,7 @@ System.out.println((int)globalNbMilliseconds); } + } } Modified: trunk/test/org/sbml/jsbml/test/PackageVersionTests.java =================================================================== --- trunk/test/org/sbml/jsbml/test/PackageVersionTests.java 2015-11-17 13:13:46 UTC (rev 2402) +++ trunk/test/org/sbml/jsbml/test/PackageVersionTests.java 2015-11-17 17:00:21 UTC (rev 2403) @@ -170,10 +170,7 @@ tr1.createOutput("Q_O1"); qualModel.createTransition("Q_T2", new Input("Q_I2"), new Output("Q_O2")); - // check and fix package version and namespaces - // TODO - update when jsbml will be fixed to set properly package version and namespace - - // now the fix is done in SBMLCoreParser#processEndDocument when reading a file - // PackageUtil.checkPackages(doc, true, true); + // check package version and namespaces System.out.println("Checking packages:"); PackageUtil.checkPackages(doc, false, false); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |