Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 460464

Summary: Have org.eclipse.test.performance usable in non-OSGi runtimes.
Product: [Eclipse Project] Platform Reporter: Esteban DUGUEPEROUX <esteban.dugueperoux>
Component: RelengAssignee: David Williams <david_williams>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david_williams
Version: 4.5   
Target Milestone: 4.5 M6   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 434596    
Attachments:
Description Flags
Patch david_williams: iplog+

Description Esteban DUGUEPEROUX CLA 2015-02-20 11:49:36 EST
In CDO project for which we have standalone performance tests, we would like to use "org.eclipse.test.performance" bundle to record memory/cpu measures in local files.
For that we provide our own PerformanceMeterFactory through system property :

-DPerformanceMeterFactory=org.eclipse.emf.cdo.tests.performance.framework.CDOPerformanceMeterFactory

but it doesn't works in standalone.
Comment 1 Esteban DUGUEPEROUX CLA 2015-02-20 11:53:29 EST
Created attachment 250975 [details]
Patch

I have attached a patch to have org.eclipse.test.performance bundle usable in standalone.
Comment 2 David Williams CLA 2015-02-20 13:12:24 EST
Thanks, I've not looked at your patch "in context", but glancing at the 'diff', seems one of the biggest changes was to remove 

if (Platform.isRunning()) { ... 

So, my immediate question is ... does it still work "from the  workbench" with your patch? (That the usual reason for checking "Platform.isRunning()".
Comment 3 Esteban DUGUEPEROUX CLA 2015-02-20 13:53:57 EST
It is not a removal but an addition and in the else clause I call "Class.forName(className)" to work in standalone.
Comment 4 David Williams CLA 2015-02-20 14:18:45 EST
(In reply to Esteban DUGUEPEROUX from comment #3)
> It is not a removal but an addition and in the else clause I call
> "Class.forName(className)" to work in standalone.

Ah, ok ... I'll take a look in context then. Thanks.
Comment 5 David Williams CLA 2015-02-23 02:04:05 EST
I've applied the patch from comment 1. 

And, also increased the 'minor' version so is not 3.11.0. 

I do so tentatively, since I've not tested in *our* normal performance runs. 

Seems like it should work the same ... but ... not 100% positive.

Also, I'd like to be more specific about "standalone". 

I believe your patch is for "non OSGi" environments, right? 

I'll change title with that assumption, if I have misunderstood, let me know.
Comment 6 David Williams CLA 2015-02-23 02:10:23 EST
(In reply to David Williams from comment #5)

> I believe your patch is for "non OSGi" environments, right? 
> 
> I'll change title with that assumption, if I have misunderstood, let me know.

I'll also add, I am assuming this one change is "all that's needed", that you've tested it, etc. 

I say this since there are some things, such as the "windows fragment" which I do not know if it is even possible to use that in a "non-OSGi" environment (say, by just adding to the classpath?) ... so ... if I had to guess, I'd guess there could be other changes needed ... in theory. If that is true, I'd hope next time to get a "complete solution". (Plus, would be nice if you updated the "how to" wiki with some info, examples, or pointers to the work you are doing). 

Much thanks, hope you can now accomplish what you need to ... and, teach me a thing or two in the process. :)
Comment 7 Esteban DUGUEPEROUX CLA 2015-02-23 02:56:47 EST
Hi David,

Thanks for your help. About the windows fragment, I have not tested being on Linux, I suppose also that adding to the classpath should be sufficient.
Yes by standalone I mean in a non OSGI environment. Ok I'll update wiki once my performance tests will be ok.

Best Regards.