You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2014/09/24 14:21:49 UTC

svn commit: r1627292 - /felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.benchmark/README

Author: pderop
Date: Wed Sep 24 12:21:48 2014
New Revision: 1627292

URL: http://svn.apache.org/r1627292
Log:
fixed some comments

Modified:
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.benchmark/README

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.benchmark/README
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.benchmark/README?rev=1627292&r1=1627291&r2=1627292&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.benchmark/README (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dependencymanager.benchmark/README Wed Sep 24 12:21:48 2014
@@ -3,7 +3,7 @@ Installation:
 
 - Eclipse Kepler SR2 + java8 support or Eclipse Luna.
 - BndTools
-- Install java7 + java8 JREs in eclipse, and set default Jvm to java 7.
+- Install java7 + java8 JREs in eclipse, and set default Jvm to java 7. 
 - checkout DM4: checkout http://svn.apache.org/repos/asf/felix/sandbox/pderop/dependencymanager-prototype dependencymanager-prototype
 - import dependencymanager-prototype in Eclipse. Check if the org.apache.felix.dm.benchmark bundle compiles correctly (if not, possibly
 adjust the project specific setting and check if it's using your installed java 8.
@@ -14,13 +14,14 @@ How to launch the stress test under bndt
 
 The stress test performs two kind of tests on different Felix DI framework (currently, we support DM4, Parallel DM4, and Felix SCR):
 
-1) first kind of test: starts/stops several times each tested bundles. When started, the test bundle is expected to register/unregister several services.
-And no processing is done at all in each component activation/deactivation methods (start/stop methods).
+1) first kind of test: starts/stops several times each tested bundles. When started, the test bundle
+is expected to register/unregister several services. And no processing is done at all in each
+component activation/deactivation methods (start/stop methods). 
 
 2) second kind of test: same as before, but some processing is done in each component start/stop methods.
 
-To launch the stress test under BndTools, click on the bnd.bnd file of the "org.apache.felix.dm.benchmark" project, 
-then click on "Run", then in "Run OSGi".
+To launch the stress test under BndTools, click on the bnd.bnd file of the
+"org.apache.felix.dm.benchmark" project, then click on "Run", then in "Run OSGi". 
 
 You should see something like that in the eclipse console:
 
@@ -57,17 +58,6 @@ Benchmarking bundle: org.apache.felix.dm
   results=3257080433,3260117641,3271632555,3308487828,3330361529
 -----------------------------------------------------------------------------------------------------------------
 
-Test bundles
-============
-
-- org.apache.felix.dm.benchmark.dependencymanager: components are declared using dependency manager API to run the scenario.
-
-- org.apache.felix.dm.benchmark.dependencymanager.parallel: uses parallel dependency manager where components 
-dependency management and components activation/deactivation processing is performed concurrently, using a fixed
-thread pool.
-
-- org.apache.felix.dm.benchmark.scr: components are declared using declarative service.
-
 How to interpret results:
 ========================
 
@@ -76,53 +66,66 @@ for example: 
 
   results=165645599,240534693,250335703,276343059,458505648
 
-Here is how to interpret the results: when testing a bundle, the benchmark controller starts/stops it many times, then the 
-elapsed time used to start the bundle, activate/deactivate all services, and stop the bundle is recorded in a list.
-Then this list is sorted: the first entry is the fastest execution time, the last entry is the slowest. the middle one is the
-average.
-We display the first entry (fastest), the entry at 1/4 of the list, the middle of the list, the entry at 3/4 of the list, 
+Here is how to interpret the results: when testing a bundle, the benchmark controller starts/stops
+it many times, then the elapsed time used to start the bundle, activate/deactivate all services, and
+stop the bundle is recorded in a list. Then this list is sorted: the first entry is the fastest
+execution time, the last entry is the slowest. the middle one is the average. We display the first
+entry (fastest), the entry at 1/4 of the list, the middle of the list, the entry at 3/4 of the list,
 and the last entry (slowest time).
 
-We don't do an average, because usually, when running benchmark, some measurements does not reflect reality, especially, when there is a full GC or when the JVM is warming up.
-(we actually do the same as in Java Chronicle: https://github.com/peter-lawrey/Java-Chronicle).
+We don't do an average, because usually, when running benchmark, some measurements does not reflect
+reality, especially, when there is a full GC or when the JVM is warming up. (we actually do the same
+as in Java Chronicle: https://github.com/peter-lawrey/Java-Chronicle). 
 
 Stress test scenario description
 --------------------------------
 
-For sake of simplicity, a simple scenario domain is used (actually, this example domain has been inspired from the "Java8 Lambdas" book, O'reilly):
-We have the following services: 
+For sake of simplicity, a simple scenario domain is used (actually, this example domain has been
+inspired from the "Java8 Lambdas" book, O'reilly): We have the following services: 
+
+"Artist" service: An Artist is an individual or group of musicians, who creates some "Albums". One
+Artist service depends on several Album services. 
+
+"Album" service: is a single release of musics, comprising several music Tracks. One Album depends
+on several Track services. 
 
-"Artist" service: An Artist is an individual or group of musicians, who creates some "Albums". One Artist service depends on several Album services.
-"Album" service: is a single release of musics, comprising several music Tracks. One Album depends on several Track services.
 "Track" service: A piece of music.
 
-By default, a scenario consists in registering 5 artists, each artist having 10 albums, and each album having 5 music tracks (~ 300 services).
+By default, a scenario consists in registering 5 artists, each artist having 10 albums, and each
+album having 5 music tracks (~ 300 services).
 
 The scenario is implemented in the following bundles
 
 - org.apache.felix.dm.benchmark.scenario: defines the interfaces.
 - org.apache.felix.dm.benchmark.scenario.impl: defines the basic implementations for the services.
 
-The Scenario Controller (see org.apache.felix.dm.benchmark.scenario/org.apache.felix.dm.benchmark.scenario.impl) is in charge of starting/stopping many times
-some DI specific bundles (DM4, SCR), which are expected to create all expected Artist/Album/Track services.
-
-By default, when a tested bundle is started, it will create several Artists (see Artists.ARTISTS constant). each Artist depends on several Albums (see Artists.ALBUMS constant),
-and each Album depends on several music Tracks (see Artists.TRACKS constants).
+The Scenario Controller (see
+org.apache.felix.dm.benchmark.scenario/org.apache.felix.dm.benchmark.scenario.impl) is in charge of
+starting/stopping many times some DI specific bundles (DM4, SCR), which are expected to create all
+expected Artist/Album/Track services. 
+
+By default, when a tested bundle is started, it will create several Artists (see Artists.ARTISTS
+constant). each Artist depends on several Albums (see Artists.ALBUMS constant), and each Album
+depends on several music Tracks (see Artists.TRACKS constants).
 
-Here is the list of bundles which are testing dependency manager, scr:
+Test bundles (DM, parallel DM, Apache SCR)
+==========================================
 
 - org.apache.felix.dm.benchmark.dependencymanager: 
 It contains a simple activator, which creates the various services using dependency manager API.
 
 - org.apache.felix.dm.benchmark.dependencymanager.parallel: 
-same as above, but using parallel dependency manager (Warning: we still have to find a way to inject the thread pool in dependency manager without having
-to modify application activators).
+same as above, but using parallel dependency manager where components dependency management and
+components activation/deactivation processing is performed concurrently, using a fixed thread pool.
 
 - org.apache.felix.dm.benchmark.scr: 
-contains a DS xml descriptor for declaring the Artist/Album/Track services. If you change the constants values of Artists.ARTISTS/Artists.ALBUMS/Artists.TRACKS in order to
-support more or less services, then you have to regenerate the xml descriptor in ./src/org/apache/felix/dm/benchmark/scr/scr.xml.
-To do so, you can modify the constants (in the Artists interface), then you have to run under eclipse the src/org/apache/felix/dm/benchmark/scr/XMLGenerator.java class.
-It will generate "/tmp/scr.xml" which you have to copy to ./src/org/apache/felix/dm/benchmark/scr/scr.xml.
+contains a DS xml descriptor for declaring the Artist/Album/Track services. If you change the
+constants values of Artists.ARTISTS/Artists.ALBUMS/Artists.TRACKS in order to support more or less
+services, then you have to regenerate the xml descriptor in
+./src/org/apache/felix/dm/benchmark/scr/scr.xml. To do so, you can modify the constants (in the
+Artists interface), then you have to run under eclipse the
+src/org/apache/felix/dm/benchmark/scr/XMLGenerator.java class. It will generate "/tmp/scr.xml" which
+you have to copy to ./src/org/apache/felix/dm/benchmark/scr/scr.xml. 
 
 The org.apache.felix.dm.benchmark.controller bundle, when starting, first stops all tested bundles.
 Then for each one, it performs the following test (multiple times):
@@ -130,11 +133,13 @@ Then for each one, it performs the follo
 - register the ScenarioController service (using the OSGi BundleContext API)
 - start the tested bundle
 - wait for all expected services to be registered
-- unregister the ScenarioController service (this will trigger a full deactivation of services, because all services are expected to depend on it).
+- unregister the ScenarioController service (this will trigger a full deactivation of services,
+because all services are expected to depend on it). 
 - wait for all expected services to be unregistered
 - stop the tested bundle.
 
 All the elapsed time (nanoseconds) used to execute each iteration is then recorded in a list.
-When enough iterations are done, the list is sorted (that is : the first entry in the list corresponds to the fastest execution time, and the
-last entry corresponds to the slowest execution time).
-Then, we display some meaningful entries in the list (like the first entry, the entry in the middle of the list (average), and the last entry (slowest).
+When enough iterations are done, the list is sorted (that is : the first entry in the list
+corresponds to the fastest execution time, and the last entry corresponds to the slowest execution
+time). Then, we display some meaningful entries in the list (like the first entry, the entry in the
+middle of the list (average), and the last entry (slowest).