[kepler-dev] [Bug 5571] user request: show execution time in runtime window

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Thu Feb 2 14:46:52 PST 2012


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5571

Christopher Brooks <cxh at eecs.berkeley.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cxh at eecs.berkeley.edu

--- Comment #1 from Christopher Brooks <cxh at eecs.berkeley.edu> 2012-02-02 14:46:52 PST ---
BTW - How Ptolemy II does reports the usage time is that execute() method in
ptolemy.actor.Manager calls

        // Make a record of the time execution starts.                          
        long startTime = (new Date()).getTime();

and then calls

            // Wrapup may throw an exception, so put the following              
           // statement inside the finally block.                               
           if (_printTimeAndMemory) {
                    System.out.println(timeAndMemory(startTime));
                }

timeAndMemory(long) is a method that prints out the elapsed time in
milliseconds and the amount of memory.

In Vergil, ptolemy.gui.Top has a report() method that updates the status bar.

ptolemy/vergil/basic/RunnableGraphController.java has
 managerStateChanged(Manager manager) 

which calls:
 getFrame().report(manager.getState().getDescription());

So, one way to do this would be to have one of the states, probably
Manager.IDLE report statistics from the last run.
Manager would also need to be modified to keep the statistics from the last
run.

However, I'm not sure if it is a good thing to have the statistics appear in
status bar.

The statistics appear in stdout by default.

If someone is really interested in the statistics, then it is better to run
from a command line.  Ptolemy II has
ptolemy/actor/gui/MoMLSimpleStatisticalApplication.java
that
"An application that executes non-graphical models specified on
   the command line and prints out statistics."


Kepler's command line interface is documented at
https://kepler-project.org/developers/reference/executing-kepler-from-the-command-line
Presumably it reports run statistics to stdout.

ant run
-Dworkflow=../outreach-2.2/workflows/demos/getting-started/01-SimpleAddition.xml

does report:
      [run] 34 ms. Memory: 116116K Free: 45970K (40%)

One other thing is that the first run usually takes longer that successive
runs.

-- 
Configure bugmail: http://bugzilla.ecoinformatics.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Kepler-dev mailing list