Bug 460464 - Have org.eclipse.test.performance usable in non-OSGi runtimes.
Summary: Have org.eclipse.test.performance usable in non-OSGi runtimes.
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.5 M6   Edit
Assignee: David Williams CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 434596
  Show dependency tree
 
Reported: 2015-02-20 11:49 EST by Esteban DUGUEPEROUX CLA
Modified: 2015-06-02 09:29 EDT (History)
1 user (show)

See Also:


Attachments
Patch (1.85 KB, patch)
2015-02-20 11:53 EST, Esteban DUGUEPEROUX CLA
david_williams: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.