Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Epsilon: How to measure a program's execution time
Epsilon: How to measure a program's execution time [message #1735579] Tue, 21 June 2016 10:05 Go to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 148
Registered: December 2015
Senior Member
Hi,

Is there any command to measure a program's execution time or parts of a program like an operation call, in EOL?


Best regards,
Alireza

[Updated on: Tue, 21 June 2016 10:22]

Report message to a moderator

Re: Epsilon: How to measure a program's execution time [message #1735582 is a reply to message #1735579] Tue, 21 June 2016 10:33 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Alireza,

You can use the respective option in the Profiling tab of the launch configuration dialog of your Epsilon program for this.

Cheers,
Dimitris
Re: Epsilon: How to measure a program's execution time [message #1735609 is a reply to message #1735582] Tue, 21 June 2016 12:27 Go to previous messageGo to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 148
Registered: December 2015
Senior Member
Hi Dimitris,

Thank you very much.

Kind regards,
Alireza
Re: Epsilon: How to measure a program's execution time [message #1769699 is a reply to message #1735609] Wed, 02 August 2017 18:23 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Hi,

I need to get the execution time in my EOL code. I also read [1] and [2]. However, they also show the time on the profiling tab. How can I get the execution time of EOL program in its code?

As another question, how can I get cpu and memory usage in the EOL code.

[1]. https://eclipse.org/epsilon/doc/EpsilonProfilingTools.pdf
[2]. https://www.eclipse.org/epsilon/examples/index.php?example=org.eclipse.epsilon.examples.profiling


Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: Epsilon: How to measure a program's execution time [message #1769874 is a reply to message #1769699] Fri, 04 August 2017 11:49 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

To get this information you'd need to write a custom tool [1] that uses org.eclipse.epsilon.profiling.Profiler.INSTANCE to retrieve profiling information and standard Java facilities to record memory usage.

On an unrelated note, it would be appreciated if you could use a realistic name instead of "B A" as discussed in https://www.eclipse.org/epsilon/faq/#getting-help

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/call-java-from-epsilon/
Re: Epsilon: How to measure a program's execution time [message #1777157 is a reply to message #1769874] Sat, 25 November 2017 08:41 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Hi there,
My tool has interactions with user and I am going to get the pure execution time of the EOL program without the time taken to user response.
I write the below code, However, it is still gives different times in each execution with the same inputs. Would you please help me in this regard?
var startTime = getUserTime();
.
.
.
//end of program
var stopTime = getUserTime();
var elapsedTime : Real = (stopTime - startTime) /1000000;

operation getUserTime() : Integer {
var ManagementFactory = Native("java.lang.management.ManagementFactory");
        var bean  = ManagementFactory.getThreadMXBean( );
        if (bean.isCurrentThreadCpuTimeSupported( ))
        return bean.getCurrentThreadUserTime( );
        else
        return  0;
    }


Member of MDSE Research Group
http://mdse.ui.ac.ir

[Updated on: Sat, 25 November 2017 08:45]

Report message to a moderator

Re: Epsilon: How to measure a program's execution time [message #1777249 is a reply to message #1777157] Mon, 27 November 2017 15:14 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi,

I suspect that you'll need to write custom Java tools [1] to interact with the user, which will support recording interaction time so that you can then subtract it from the time recorded by the Epsilon profiling tools.

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/call-java-from-epsilon/
Previous Topic:Error in importing Epsilon project example
Next Topic:EMF to RELATIONAL transformation using ETL and EMC-JDBC
Goto Forum:
  


Current Time: Fri Mar 29 08:34:04 GMT 2024

Powered by FUDForum. Page generated in 0.02798 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top