Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Epsilon profiling tools missing?
Epsilon profiling tools missing? [message #986474] Tue, 20 November 2012 15:19 Go to next message
Joost van Pinxten is currently offline Joost van PinxtenFriend
Messages: 51
Registered: November 2012
Member
Now that I can run transformations for simple input models, it is time for me to compare the implementation to the current Java implementation. The current Java implementation (which is a full translation) runs in about 15 ms per input model and the (partial) Epsilon runs in about 150 ms; it is interesting to see a factor 10 slowdown on this transformation already. Therefore I would like to see where the time is spent and want to use the Epsilon profiling tools, as advertised on the Epsilon homepage.

However, I could not find any reference to how to profile on the Epsilon website, but Googling "epsilon profiling tools" shows http://www.eclipse.org/epsilon/doc/EpsilonProfilingTools.pdf which is a document by Dimitri from back in 2007. Unfortunately, the examples presented there do not work for me: the type "org.eclipse.epsilon.eol.builtin.ProfilerTool" is not found. Searching for a "Profil*" type shows me that there is no longer anything related to profiling included in the Epsilon repository.

So, my question is: has this profiling tool been renamed? Or has this tool become legacy (replaced by other technologies, didn't look into that yet)?
Re: Epsilon profiling tools missing? [message #986664 is a reply to message #986474] Wed, 21 November 2012 10:33 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

One thing you should keep in mind regarding Epsilon performance is that all E*L languages are interpreted. You could get better performance writing everything in Java yourself, but the resulting code would be much less concise and changes would be more difficult.

ProfilerTool should be still available from the Epsilon Core Development Tools feature: it's in plugins/org.eclipse.epsilon.eol.tools/src/org/eclipse/epsilon/eol/tools/ProfilerTool.java in the SVN repository. It is defined inside the org.eclipse.epsilon.eol.tools project and referenced by the org.eclipse.epsilon.eol.dt.tools plugin.

According to the logs, ProfilerTool hasn't been changed since 2008, except for some commit in 2011 that added profiling to server-side EGL, which shouldn't interfere with EOL.

Could you send us a minimal example that reproduces the issue?

http://eclipse.org/epsilon/doc/articles/minimal-examples/

[Updated on: Wed, 21 November 2012 10:34]

Report message to a moderator

Re: Epsilon profiling tools missing? [message #986709 is a reply to message #986664] Wed, 21 November 2012 11:56 Go to previous messageGo to next message
Joost van Pinxten is currently offline Joost van PinxtenFriend
Messages: 51
Registered: November 2012
Member
I do understand that E*L languages are interpreted and I don't think that 10x slower is that bad, but I would like to see if the profiling tool shows me what the expensive parts are, so that I can try to tune this when it gets out of hand and identify the bottlenecks, instead of guessing what the root cause is.

With the latest releases I reckon that instead of org.epsilon it should be org.eclipse.epsilon, but then the builtin package is not found (in a normal Java environment). Finally, org.eclipse.epsilon.eol.tools.ProfilerTool seems to be the correct location. However, I'm still unable to instantiate this from EGL via the standalone job. I've added the tools package to both the transformation plugin and the standalone plugin, but it is still not recognized as a type.

While making a minimal example, I created an EOL file with the content of the example in the pdf linked in the first post, but changed the native type to org.eclipse.epsilon.tools.ProfilerTool which does execute correctly for me. I will investigate why my standalone example (which uses the WorkspaceJobs as in the Epsilon Labs) does not recognize the type... It seems the job itself can actually properly instantiate the type.

So to answer my own question: yes, it has been moved, but that was only part of the problem apparently. Will follow up if my solution/actual problem is worth sharing.
Re: Epsilon profiling tools missing? [message #986732 is a reply to message #986709] Wed, 21 November 2012 13:29 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Joost,

In your standalone setup you'll need to add the following line so that tools contributed via extensions (such as the ProfilerTool) can be used:

context.getNativeTypeDelegates().add(new ExtensionPointToolNativeTypeDelegate());

Cheers,
Dimitris
Re: Epsilon profiling tools missing? [message #986750 is a reply to message #986474] Wed, 21 November 2012 14:31 Go to previous messageGo to next message
Joost van Pinxten is currently offline Joost van PinxtenFriend
Messages: 51
Registered: November 2012
Member
Hi Dimitris and Antonio,

That's spot on! Works like a charm now! I love the fast and clear responses by the way.

Attached to this response is the profiling example from the PDF, combined with the caching example, which I repackaged into the form of an "Epsilon example", I do see some files that may need to be added (i.e. launch.xml and related) but the example is complete and functional.

Hope this can make its way to the SVN and examples page so that Epsilon can be yet another example richer.

Regards,
Joost
Re: Epsilon profiling tools missing? [message #986846 is a reply to message #986750] Wed, 21 November 2012 23:43 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Joost,

Many thanks! I've uploaded the example [1] and I've added a note in my todo list to transfer the documentation related to the profiling tools from the blog/pdf to a proper article.

Cheers,
Dimitris

[1] http://eclipse.org/epsilon/examples/index.php?example=org.eclipse.epsilon.examples.profiling
Re: Epsilon profiling tools missing? [message #987120 is a reply to message #986846] Fri, 23 November 2012 15:50 Go to previous messageGo to next message
Joost van Pinxten is currently offline Joost van PinxtenFriend
Messages: 51
Registered: November 2012
Member
Hi again,

You're welcome, thought I'd give something back to the community Wink

Today, I've come across the options to automatically profile an EOL file by setting the profile options in the run configuration. However, this does not mix with normal profiling calls (see bug #394975).

What I learned from profiling my transformation is that loading templates is costly; i.e. the time it takes to load a single template is longer than the time the original transformation used to process and write everything to disk. That's okay (and somewhat expected) though, now I'm just trying to work around this, by avoiding to reload templates from files.

Also, it seems (but I'm not sure) that the profiling information in an Eclipse session launched from Eclipse cannot be more precise than 10ms (most results are a multiple of 10), while in a normal Eclipse environment it seems to be accurate to 1ms. Is this perhaps a restriction for any Eclipse WorkSpaceJob?

On another note, I've just now added the fine-grained profiling to the transformation job by using:
module.getContext().getExecutorFactory().addExecutionListener(new ProfilingExecutionListener());
from org.eclipse.epsilon.profiling.ProfilingLaunchConfigurationListener but I didn't get any output on any of the windows; apparently the listener needs to be applied _AFTER_ the module has been parsed.

Thank you for your time,
Joost

[Updated on: Fri, 23 November 2012 15:52]

Report message to a moderator

Re: Epsilon profiling tools missing? [message #987258 is a reply to message #987120] Sun, 25 November 2012 09:46 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Joost,

> Today, I've come across the options to automatically profile an EOL file by setting the profile options in the run configuration. However, this does not mix with normal profiling calls (see bug #394975).

Thanks for reporting this. I'll investigate.

> Also, it seems (but I'm not sure) that the profiling information in an Eclipse session launched from Eclipse cannot be more precise than 10ms (most results are a multiple of 10), while in a normal Eclipse environment it seems to be accurate to 1ms. Is this perhaps a restriction for any Eclipse WorkSpaceJob?

I don't think we treat the two environments differently but I'll need to double-check.

> Apparently the listener needs to be applied _AFTER_ the module has been parsed

This seems to be the case indeed. I'll investigate this too Smile

Cheers,
Dimitris
Re: Epsilon profiling tools missing? [message #987279 is a reply to message #987258] Sun, 25 November 2012 16:24 Go to previous message
Joost van Pinxten is currently offline Joost van PinxtenFriend
Messages: 51
Registered: November 2012
Member
I can zip up two sample projects for you, if you'd like.
Previous Topic:Re-using operations in multiple EGL files
Next Topic:[EVL] CritiqueLevel
Goto Forum:
  


Current Time: Tue Apr 23 12:03:44 GMT 2024

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

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

Back to the top