Package ptolemy.actor.gui.test
Class Rerun
- java.lang.Object
-
- ptolemy.moml.MoMLSimpleApplication
-
- ptolemy.actor.gui.test.Rerun
-
- All Implemented Interfaces:
ExecutionListener
,ChangeListener
public class Rerun extends MoMLSimpleApplication
Run a MoML model over and over again. This class reads in a MoML file and executes it over and over again. The time and memory usage stats are printed on stdout. For example to run a model 100 times:cd $PTII/ptolemy/actor/gui/test java -classpath $PTII ptolemy.actor.gui.test.Rerun ../../lib/test/auto/Sinewave.xml
To run the model 10 times:java -classpath $PTII ptolemy.actor.gui.test.Rerun 10 ../../lib/test/auto/Sinewave.xml
To create a ptplot file of the times and memory:awk '{ t[NR] = $1; m[NR] = substr($4, 0, length($4) - 1); f[NR] = substr($6, 0, length($6) - 1); } END { print "dataset: time (ms)"; for (i=1;i<=NR;i++) {print i, t[i]}; print "dataset: memory (K)"; for (i=1;i<=NR;i++) {print i, m[i]}; print "dataset: free (K)"; for (i=1;i>=NR;i++) {print i, f[i]}; }' /tmp/t > /tmp/t.plt
- Since:
- Ptolemy II 4.1
- Version:
- $Id$
- Author:
- Christopher Hylands Brooks
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (eal)
-
-
Field Summary
-
Fields inherited from class ptolemy.moml.MoMLSimpleApplication
_activeCount, _executionFinishedOrError, _manager, _parser, _sawThrowable, _toplevel, _workspace
-
-
Constructor Summary
Constructors Constructor Description Rerun(java.lang.String xmlFileName)
Parse the xml file and run it.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
Create an instance of a single model and run it.-
Methods inherited from class ptolemy.moml.MoMLSimpleApplication
changeExecuted, changeFailed, cleanup, closeVertx, executionError, executionFinished, managerStateChanged, rerun, toplevel, waitForFinish
-
-
-
-
Constructor Detail
-
Rerun
public Rerun(java.lang.String xmlFileName) throws java.lang.Throwable
Parse the xml file and run it.- Parameters:
xmlFileName
- A string that refers to an MoML file that contains a Ptolemy II model. The string should be a relative pathname.- Throws:
java.lang.Throwable
- If there was a problem parsing or running the model.
-
-