felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1662903 [1/4] - in /felix/sandbox/pderop/dependencymanager: ./ cnf/localrepo/ cnf/localrepo/org.apache.felix.eventadmin/ cnf/localrepo/org.apache.felix.http.api/ cnf/localrepo/org.apache.felix.http.servlet-api/ cnf/releaserepo/ org.apache....
Date Sat, 28 Feb 2015 07:23:22 GMT
Author: pderop
Date: Sat Feb 28 07:23:20 2015
New Revision: 1662903

URL: http://svn.apache.org/r1662903
Log:
Added Dependency Manager samples and benchmark modules.
(work in progress: still need to check license headers in files).

Having the samples in the DM workspace makes it easier to check if samples are working when DM core is modified.
And having the benchmark in the DM workspace makes it easier to make non regressions tests regarding performance.

Also, the samples are now part of the released artifacts, but only in the org.apache.felix.dependencymanager-r<n>-src.zip (source artifact).
(the samples binaries are not provided in the binary convenience ("-bin") artifact.

The benchmark is not part of the released artifacts because it requires java8 and that would complicate a bit the release process.


Added:
    felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.eventadmin/
    felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.eventadmin/org.apache.felix.eventadmin-1.4.3.jar   (with props)
    felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.http.api/
    felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.http.api/org.apache.felix.http.api-2.3.0.jar   (with props)
    felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.http.servlet-api/
    felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.http.servlet-api/org.apache.felix.http.servlet-api-1.0.0.jar   (with props)
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.classpath   (with props)
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.gitignore
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.project   (with props)
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.settings/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.settings/org.eclipse.jdt.core.prefs
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/bin/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/bin_test/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/bnd.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/controller.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/dependencymanager.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/dependencymanager.parallel.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/generated/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/index.bndrun
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/noindex.bndrun
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/scenario.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/.gitignore
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/ScenarioController.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/ScenarioControllerImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/packageinfo
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/Benchmark.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/ParallelActivator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Album.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Artist.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Helper.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Track.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Unchecked.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/AlbumImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/ArtistImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/TrackImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/packageinfo
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/packageinfo
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/test/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/test/.gitignore
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/.classpath   (with props)
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/.gitignore
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/.project   (with props)
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/README.samples
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/bin/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/bin_test/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/bnd.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/composite.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/compositefactory.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/conf.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/customdep.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/device.annot.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/device.api.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.annot.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.api.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.annot.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.api.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/generated/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/hello.annot.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/hello.api.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/.gitignore
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/hello.annot.bnd
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/composite/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/composite/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/composite/Provider.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/composite/ProviderImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/composite/ProviderParticipant1.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/composite/ProviderParticipant2.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/composite/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/compositefactory/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/compositefactory/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/compositefactory/CompositionManager.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/compositefactory/Provider.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/compositefactory/ProviderImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/compositefactory/ProviderParticipant1.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/compositefactory/ProviderParticipant2.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/compositefactory/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/conf/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/conf/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/conf/Configurator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/conf/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/PathDependency.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/PathDependencyImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/PathTracker.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/customdep/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/Device.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAccess.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAccessConsumer.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAccessImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAndParameterFactory.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceParameter.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceParameterImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/Device.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/DeviceAccess.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/DeviceAccessConsumer.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/DeviceAccessImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/DeviceImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/DeviceParameter.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/DeviceParameterImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspect.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspectConfiguration.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryConfiguration.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryService.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/SpellChecker.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryAspect.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryAspectConfiguration.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryConfiguration.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/DictionaryService.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/SpellChecker.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/DynamicDependency.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/DynamicDependencyConfiguration.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/FileStorage.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/MapDBStorage.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/Storage.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/DynamicDependency.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/DynamicDependencyConfiguration.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/FileStorage.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/MapDBStorage.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/api/Storage.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/annot/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/annot/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/annot/ServiceConsumer.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/annot/ServiceProvider.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/annot/ServiceProviderImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/api/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/api/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/api/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/api/ServiceConsumer.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/api/ServiceProvider.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/api/ServiceProviderImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/tpool/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/tpool/Activator.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/tpool/ComponentExecutorFactoryImpl.java
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/tpool/README
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/test/
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/test/.gitignore
    felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.samples/tpool.bnd
Modified:
    felix/sandbox/pderop/dependencymanager/README
    felix/sandbox/pderop/dependencymanager/cnf/localrepo/index.xml
    felix/sandbox/pderop/dependencymanager/cnf/localrepo/index.xml.sha
    felix/sandbox/pderop/dependencymanager/cnf/releaserepo/index.xml
    felix/sandbox/pderop/dependencymanager/cnf/releaserepo/index.xml.sha
    felix/sandbox/pderop/dependencymanager/release/README.release
    felix/sandbox/pderop/dependencymanager/release/build.gradle
    felix/sandbox/pderop/dependencymanager/release/resources/src/README.src

Modified: felix/sandbox/pderop/dependencymanager/README
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/README?rev=1662903&r1=1662902&r2=1662903&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager/README (original)
+++ felix/sandbox/pderop/dependencymanager/README Sat Feb 28 07:23:20 2015
@@ -26,7 +26,7 @@ Please refer to release/resources/src/RE
 Building and testing Apache Felix Dependency Manager
 ====================================================
 
-The build instructions can be found from release/resources/src/README
+The build instructions can be found from release/resources/src/README.src
 
 Getting Started
 ===============
@@ -36,9 +36,8 @@ getting started guide for users:
 
   http://felix.apache.org/documentation/subprojects/apache-felix-dependency-manager.html
 
-Many examples are also available from the dependency manager examples:
-
-  http://svn.apache.org/repos/asf/felix/trunk/examples/dependencymanager-samples
+Many examples are also available from the dependency manager examples, in the org.apache.felix.dependencymanager.samples module
+See org.apache.felix.dependencymanager.samples/README.samples
 
 Many thanks for using Apache Felix Dependency Manager.
 

Modified: felix/sandbox/pderop/dependencymanager/cnf/localrepo/index.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/cnf/localrepo/index.xml?rev=1662903&r1=1662902&r2=1662903&view=diff
==============================================================================
Binary files - no diff available.

Modified: felix/sandbox/pderop/dependencymanager/cnf/localrepo/index.xml.sha
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/cnf/localrepo/index.xml.sha?rev=1662903&r1=1662902&r2=1662903&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager/cnf/localrepo/index.xml.sha (original)
+++ felix/sandbox/pderop/dependencymanager/cnf/localrepo/index.xml.sha Sat Feb 28 07:23:20 2015
@@ -1 +1 @@
-bd328d86b8850f7f9a0150594693c1afeb51bfaf2ef0738d340ae264a276222b
\ No newline at end of file
+9b68aa69bffd0c542d0d6310501b8bb4affeaddd3d2357c3ee6a85b8ce78f531
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.eventadmin/org.apache.felix.eventadmin-1.4.3.jar
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.eventadmin/org.apache.felix.eventadmin-1.4.3.jar?rev=1662903&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.eventadmin/org.apache.felix.eventadmin-1.4.3.jar
------------------------------------------------------------------------------
    svn:mime-type = application/zip

Added: felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.http.api/org.apache.felix.http.api-2.3.0.jar
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.http.api/org.apache.felix.http.api-2.3.0.jar?rev=1662903&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.http.api/org.apache.felix.http.api-2.3.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/zip

Added: felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.http.servlet-api/org.apache.felix.http.servlet-api-1.0.0.jar
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.http.servlet-api/org.apache.felix.http.servlet-api-1.0.0.jar?rev=1662903&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager/cnf/localrepo/org.apache.felix.http.servlet-api/org.apache.felix.http.servlet-api-1.0.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/zip

Modified: felix/sandbox/pderop/dependencymanager/cnf/releaserepo/index.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/cnf/releaserepo/index.xml?rev=1662903&r1=1662902&r2=1662903&view=diff
==============================================================================
Binary files - no diff available.

Modified: felix/sandbox/pderop/dependencymanager/cnf/releaserepo/index.xml.sha
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/cnf/releaserepo/index.xml.sha?rev=1662903&r1=1662902&r2=1662903&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager/cnf/releaserepo/index.xml.sha (original)
+++ felix/sandbox/pderop/dependencymanager/cnf/releaserepo/index.xml.sha Sat Feb 28 07:23:20 2015
@@ -1 +1 @@
-d5225b66128dd91d6773cfe3682262eb46200255a27213613883d1e522c6b1b1
\ No newline at end of file
+db66f4b995335b80f4d94fefea5b31844fb0ae8ce715d2c21f95db5b3f4c6690
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.classpath
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.classpath?rev=1662903&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.classpath
------------------------------------------------------------------------------
    svn:mime-type = application/xml

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.gitignore
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.gitignore?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.gitignore (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.gitignore Sat Feb 28 07:23:20 2015
@@ -0,0 +1,3 @@
+/bin/
+/bin_test/
+/generated/

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.project
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.project?rev=1662903&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.project
------------------------------------------------------------------------------
    svn:mime-type = application/xml

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.settings/org.eclipse.jdt.core.prefs?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.settings/org.eclipse.jdt.core.prefs (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/.settings/org.eclipse.jdt.core.prefs Sat Feb 28 07:23:20 2015
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/README
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/README?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/README (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/README Sat Feb 28 07:23:20 2015
@@ -0,0 +1,165 @@
+Installation:
+============
+
+- see toplevel README on how to import dependencymanager into bndtools
+
+How to launch the stress test under bndtools:
+============================================
+
+The stress test performs two kind of tests on DM and parallel DM.
+
+1) first kind of tests: starts/stops several times each tested bundle (DM/Parallel DM). When
+started, the test bundle is expected to register/unregister several services. And no processing is
+done at all in each component start methods).
+
+2) second kind of tests: same as before, but some processing is done in each component start methods.
+
+To launch the stress test under BndTools, click on the noindex.bndrun 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:
+
+>> --------------------------------------------------------------------------------------------------------------
+g! Starting benchmarks (each tested bundle will add/remove 630 components during bundle activation).
+
+	[Starting benchmarks with no processing done in components start methods]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager ....................
+-> results in nanos: [189,130,687 | 205,730,144 | 312,092,102 | 357,470,857 | 871,419,487]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager.parallel ....................
+-> results in nanos: [85,158,366 | 103,439,337 | 122,633,515 | 157,082,407 | 284,332,202]
+
+	[Starting benchmarks with processing done in components start methods]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager .....
+-> results in nanos: [2,748,431,149 | 2,750,475,610 | 2,756,254,193 | 2,772,447,115 | 2,774,345,245]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager.parallel .....
+-> results in nanos: [687,259,058 | 696,725,568 | 700,220,615 | 704,310,739 | 740,325,481]
+-----------------------------------------------------------------------------------------------------------------
+
+You can also possibly run the same test using optimized DM filter indices.
+To do so, run "index.bndrun"
+but using DM filter indices has a CPU cost and are useful if you have many service dependencies.
+To test filter indices, first increase the number of components created/removed during bundle
+startup. To do so, edit the Artist.java and change the "Artists" when is by default set to 30, and set it to 300.
+
+You should then observe some significant performance improvements:
+
+for example, with Artist.ARTISTS=300, you should observe the following:
+
+noindex.bndrun (no filter indices used):
+
+>> --------------------------------------------------------------------------------------------------------------
+ g! Starting benchmarks (each tested bundle will add/remove 6300 components during bundle activation).
+
+        [Starting benchmarks with no processing done in components start methods]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager .....
+-> results in nanos: [17,436,869,644 | 17,525,534,346 | 18,080,624,001 | 18,246,597,908 | 20,715,696,669]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager.parallel .....
+-> results in nanos: [9,660,520,501 | 9,810,057,488 | 9,870,295,166 | 10,014,334,906 | 10,628,193,815]
+
+        [Starting benchmarks with processing done in components start methods]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager .....
+-> results in nanos: [42,700,651,438 | 43,207,156,615 | 43,653,372,523 | 43,869,438,994 | 44,715,701,457]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager.parallel .....
+-> results in nanos: [15,021,876,153 | 15,091,340,552 | 15,202,305,936 | 15,248,728,826 | 15,398,221,492]
+-----------------------------------------------------------------------------------------------------------------
+ 
+and with index.bndrun (using DM filter indices):
+
+>> --------------------------------------------------------------------------------------------------------------
+g! Starting benchmarks (each tested bundle will add/remove 6300 components during bundle activation).
+
+        [Starting benchmarks with no processing done in components start methods]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager .....
+-> results in nanos: [3,142,869,517 | 3,564,970,695 | 4,023,603,870 | 6,206,640,362 | 6,918,113,818]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager.parallel .....
+-> results in nanos: [2,868,554,914 | 2,873,491,201 | 2,897,439,973 | 2,913,317,331 | 3,890,123,728]
+
+        [Starting benchmarks with processing done in components start methods]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager .....
+-> results in nanos: [28,515,623,505 | 28,558,774,886 | 28,661,315,061 | 28,808,682,302 | 28,915,519,208]
+
+Benchmarking bundle: org.apache.felix.dependencymanager.benchmark.dependencymanager.parallel .....
+-> results in nanos: [7,702,400,991 | 7,749,145,806 | 7,760,650,323 | 7,832,386,237 | 7,854,739,136]
+-----------------------------------------------------------------------------------------------------------------
+ 
+
+How to interpret results:
+========================
+
+for each tested bundle, the time spent is displayed in nanos.
+for example: 
+
+	-> results in nanos: [85,158,366 | 103,439,337 | 122,633,515 | 157,082,407 | 284,332,202]
+
+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 don't 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: 
+
+"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.
+
+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 specific bundles (DM, Parallel DM).
+
+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).
+
+Test bundles (DM, parallel DM)
+==============================
+
+- 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 where components dependency management and
+components activation processing is performed concurrently, using a fixed thread pool.
+
+The org.apache.felix.dm.benchmark.controller bundle, when started, first stops all tested bundles.
+Then for each one, it performs the following test (multiple times):
+
+- start the tested bundle
+- wait for all expected services to be registered (Artists/Albums/Tracks)
+- stop the tested bundle.
+- wait for all expected services to be unregistered
+
+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).

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/bnd.bnd?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/bnd.bnd (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/bnd.bnd Sat Feb 28 07:23:20 2015
@@ -0,0 +1,11 @@
+javac.source:          1.8
+javac.target:          1.8
+-buildpath:  \
+	org.apache.felix.dependencymanager;version=latest,\
+	osgi.core;version=4.2,\
+	osgi.cmpn;version=4.2
+
+-sub:  \
+	*.bnd
+Export-Package:  \
+	org.apache.felix.dm.benchmark.scenario.impl

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/controller.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/controller.bnd?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/controller.bnd (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/controller.bnd Sat Feb 28 07:23:20 2015
@@ -0,0 +1,5 @@
+Private-Package:  \
+	org.apache.felix.dm.benchmark.controller.impl
+Bundle-Activator: org.apache.felix.dm.benchmark.controller.impl.Activator
+Export-Package:  \
+	org.apache.felix.dm.benchmark.controller
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/dependencymanager.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/dependencymanager.bnd?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/dependencymanager.bnd (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/dependencymanager.bnd Sat Feb 28 07:23:20 2015
@@ -0,0 +1,3 @@
+Private-Package:  \
+	org.apache.felix.dm.benchmark.dependencymanager
+Bundle-Activator: org.apache.felix.dm.benchmark.dependencymanager.Activator
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/dependencymanager.parallel.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/dependencymanager.parallel.bnd?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/dependencymanager.parallel.bnd (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/dependencymanager.parallel.bnd Sat Feb 28 07:23:20 2015
@@ -0,0 +1,3 @@
+Bundle-Activator: org.apache.felix.dm.benchmark.dependencymanager.ParallelActivator
+Private-Package:  \
+	org.apache.felix.dm.benchmark.dependencymanager
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/index.bndrun
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/index.bndrun?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/index.bndrun (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/index.bndrun Sat Feb 28 07:23:20 2015
@@ -0,0 +1,24 @@
+-runbundles:  \
+	org.apache.felix.dependencymanager;version=latest,\
+	org.apache.felix.dependencymanager.shell;version=latest,\
+	org.apache.felix.metatype;version=1.0.10,\
+	org.apache.felix.log;version=1.0.1,\
+	org.apache.felix.gogo.command;version=0.12.0,\
+	org.apache.felix.gogo.shell;version=0.10.0,\
+	org.apache.felix.gogo.runtime;version=0.10.0,\
+	org.apache.felix.configadmin;version=1.8.0,\
+	org.apache.felix.dependencymanager.benchmark.scenario,\
+	org.apache.felix.dependencymanager.benchmark.dependencymanager,\
+    org.apache.felix.dependencymanager.benchmark.dependencymanager.parallel,\
+    org.apache.felix.dependencymanager.benchmark.controller
+	
+-runfw: org.apache.felix.framework;version='[4.4.0,4.4.0]'
+
+-runproperties:  \
+	ds.loglevel=warn,\
+	org.osgi.framework.bootdelegation='sun.*,com.sun.*,org.netbeans.*',\
+	org.apache.felix.dependencymanager.filterindex=objectClass,id
+-runvm: -server -Xmx1024m -Xms1024m
+-runee: JavaSE-1.8
+javac.source:          1.8
+javac.target:          1.8

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/noindex.bndrun
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/noindex.bndrun?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/noindex.bndrun (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/noindex.bndrun Sat Feb 28 07:23:20 2015
@@ -0,0 +1,23 @@
+-runbundles:  \
+	org.apache.felix.dependencymanager;version=latest,\
+	org.apache.felix.dependencymanager.shell;version=latest,\
+	org.apache.felix.metatype;version=1.0.10,\
+	org.apache.felix.log;version=1.0.1,\
+	org.apache.felix.gogo.command;version=0.12.0,\
+	org.apache.felix.gogo.shell;version=0.10.0,\
+	org.apache.felix.gogo.runtime;version=0.10.0,\
+	org.apache.felix.configadmin;version=1.8.0,\
+	org.apache.felix.dependencymanager.benchmark.scenario,\
+	org.apache.felix.dependencymanager.benchmark.dependencymanager,\
+    org.apache.felix.dependencymanager.benchmark.dependencymanager.parallel,\
+    org.apache.felix.dependencymanager.benchmark.controller
+	
+-runfw: org.apache.felix.framework;version='[4.4.0,4.4.0]'
+
+-runproperties:  \
+	ds.loglevel=warn,\
+	org.osgi.framework.bootdelegation='sun.*,com.sun.*,org.netbeans.*'
+-runvm: -server -Xmx1024m -Xms1024m
+-runee: JavaSE-1.8
+javac.source:          1.8
+javac.target:          1.8

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/scenario.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/scenario.bnd?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/scenario.bnd (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/scenario.bnd Sat Feb 28 07:23:20 2015
@@ -0,0 +1,4 @@
+
+Export-Package:  \
+	org.apache.felix.dm.benchmark.scenario.impl,\
+	org.apache.felix.dm.benchmark.scenario
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/.gitignore
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/.gitignore?rev=1662903&view=auto
==============================================================================
    (empty)

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/ScenarioController.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/ScenarioController.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/ScenarioController.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/ScenarioController.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,44 @@
+package org.apache.felix.dm.benchmark.controller;
+
+import org.apache.felix.dm.benchmark.scenario.Album;
+import org.apache.felix.dm.benchmark.scenario.Artist;
+import org.apache.felix.dm.benchmark.scenario.Track;
+
+/**
+ * This service is injected in each scenario bundle. All scenario bundle components must depend on this 
+ * service, and must invoke the xxAdded() method once the component is fully initialized, and 
+ * the xxRemoved() method when the component is stopped.
+ * This benchmark expect scenario bundles to register some "Artists" components. Each "Artist" component is
+ * then expected to depend on many "Albums", and each "Album" then depends on many music "Tracks".
+ */
+public interface ScenarioController {
+    /**
+     * An Artist is added (service is started)
+     */
+    void artistAdded(Artist artist);
+
+    /**
+     * An Artist is removed (service is stopped)
+     */
+    void artistRemoved(Artist artist);
+
+    /**
+     * An Album is added (service is started)
+     */
+    void albumAdded(Album artist);
+ 
+    /**
+     * An Album is removed (service is stopped)
+     */
+    void albumRemoved(Album artist);
+ 
+    /**
+     * A Music Track is added (service is started)
+     */
+    void trackAdded(Track artist);
+  
+    /**
+     * A Music Track is removed (service is stopped)
+     */
+    void trackRemoved(Track artist);
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/Activator.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/Activator.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/Activator.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/Activator.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,16 @@
+package org.apache.felix.dm.benchmark.controller.impl;
+
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
+import org.osgi.framework.BundleContext;
+
+/**
+ * This activator triggers the scenario controller thread, which will do some microbenchmarks for a given
+ * set of scenario bundles. The controller thread is fired only once the framework is started.
+ */
+public class Activator extends DependencyActivatorBase {
+    @Override
+    public void init(BundleContext context, DependencyManager m) throws Exception {
+        m.add(createComponent().setImplementation(ScenarioControllerImpl.class));
+    }
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/ScenarioControllerImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/ScenarioControllerImpl.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/ScenarioControllerImpl.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/impl/ScenarioControllerImpl.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,279 @@
+package org.apache.felix.dm.benchmark.controller.impl;
+
+import static java.lang.System.out;
+import static java.util.stream.Collectors.joining;
+import static java.util.stream.Collectors.toList;
+import static org.apache.felix.dm.benchmark.scenario.Artist.ALBUMS;
+import static org.apache.felix.dm.benchmark.scenario.Artist.ARTISTS;
+import static org.apache.felix.dm.benchmark.scenario.Artist.TRACKS;
+import static org.apache.felix.dm.benchmark.scenario.Helper.debug;
+
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.text.NumberFormat;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Locale;
+import java.util.Optional;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Consumer;
+import java.util.stream.LongStream;
+import java.util.stream.Stream;
+
+import org.apache.felix.dm.benchmark.controller.ScenarioController;
+import org.apache.felix.dm.benchmark.scenario.Album;
+import org.apache.felix.dm.benchmark.scenario.Artist;
+import org.apache.felix.dm.benchmark.scenario.Helper;
+import org.apache.felix.dm.benchmark.scenario.Track;
+import org.apache.felix.dm.benchmark.scenario.Unchecked;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The controller which perform microbenchmarks on some scenario bundles.
+ */
+public class ScenarioControllerImpl implements Runnable, ScenarioController {
+    /**
+     * List of bundles to be executed by the benchmark.
+     */
+    final List<String> TESTS = Arrays.asList(
+        "org.apache.felix.dependencymanager.benchmark.dependencymanager",
+        "org.apache.felix.dependencymanager.benchmark.dependencymanager.parallel"
+    );
+    
+    /**
+     * Our injected bundle context, used to lookup the bundles to benchmark.
+     */
+    private volatile BundleContext m_bctx;
+    
+    /**
+     * Latches used to detect when expected services are registered, or unregistered.
+     */
+    private volatile CountDownLatch m_startLatch, m_stopLatch;
+
+    /**
+     * When a components is called in its start or stop method, we'll perform some processing if the following
+     * attribute is true.
+     */
+    private volatile boolean m_doProcessingInStartStop;
+        
+    /**
+     * Our component is starting: we'll first stop all bundles participating in the benchmark, then we'll 
+     * fire a thread, and from that thread we'll iterate on all bundles in order to do a benchmark on each.
+     * (we'll call start/stop N times, and will display the elapsed times for each bundle).
+     */
+    void start() {
+        new Thread(this).start();
+    }
+    
+    void stop() {
+    }
+    
+    @Override
+    public void run() {
+        // wait a bit in order to let the gogo banner be displayed before we start the bench.
+        Unchecked.run(() -> Thread.sleep(500)); 
+        
+        out.println("Starting benchmarks (each tested bundle will add/remove " + (ARTISTS + (ARTISTS * (ALBUMS + (ALBUMS * TRACKS)))) 
+           + " components during bundle activation).");
+       
+        // Stop all tested bundles.
+        forEachScenarioBundle(TESTS, Unchecked.consumer(bundle -> {
+            debug(() -> "Stopping bundle " + bundle.getSymbolicName());
+            bundle.stop();
+        }));
+        
+        // Register our controller service
+        m_bctx.registerService(ScenarioController.class.getName(), this, null);
+        
+        // Start/stop several times the tested bundles. (no processing done in components start methods).
+        m_doProcessingInStartStop = false;
+        out.println("\n\t[Starting benchmarks with no processing done in components start methods]");
+        startStopScenarioBundles(TESTS, 50);
+       
+        // Start/stop several times the tested bundles (processing is done in components start methods).
+        m_doProcessingInStartStop = true;
+        out.println("\n\t[Starting benchmarks with processing done in components start methods]");
+        startStopScenarioBundles(TESTS, 5);
+    }
+
+    @Override
+    public void artistAdded(Artist artist) {
+        int size = artist.getAlbums().size();
+        if (size != Artist.ALBUMS) {
+            throw new IllegalStateException("Artist has not created expected number of albums:" + size);
+        }
+        artist.play();
+        componentAdded();
+        Helper.debug(() -> "Artist added : " + artist);
+    }
+    
+    @Override
+    public void artistRemoved(Artist artist) {
+        componentRemoved();
+        Helper.debug(() -> "Artist removed : " + artist);
+    }
+    
+    @Override
+    public void albumAdded(Album album) {
+        int size = album.getMusicTracks().size();
+        if (size != Artist.TRACKS) {
+            throw new IllegalStateException("Album does not contain expected number of music tracks:" + size);
+        }
+        componentAdded();
+        Helper.debug(() -> "Album added : " + album);
+    }
+    
+    @Override
+    public void albumRemoved(Album album) {
+        componentRemoved();
+        Helper.debug(() -> "Album removed : " + album);
+    }
+    
+    @Override
+    public void trackAdded(Track track) {
+        componentAdded();
+        Helper.debug(() -> "Track added : " + track);
+    }
+    
+    @Override
+    public void trackRemoved(Track track) {
+        componentRemoved();
+        Helper.debug(() -> "Track removed : " + track);
+    }
+            
+    // ------------------- Private methods -----------------------------------------------------
+        
+    private void startStopScenarioBundles(List<String> tests, int iterations) {
+        forEachScenarioBundle(tests, bundle -> {
+            out.print("\nBenchmarking bundle: " + bundle.getSymbolicName() + " ");            
+            List<Long> sortedResults = LongStream.range(0, iterations)
+                .peek(i -> out.print("."))
+                .map(n -> durationOf(() -> startAndStop(bundle)))
+                .sorted().boxed().collect(toList());
+            out.println();
+            displaySortedResults(sortedResults);
+            Unchecked.run(() -> Thread.sleep(500));
+        });        
+    }
+
+    /**
+     * Displays meaningful values in the sorted results (first=fastest, midle=average, last entry=slowest)
+     * @param sortedResults
+     */
+    private void displaySortedResults(List<Long> sortedResults) {
+        // We don't display an average of the duration times; Instead, we sort the results,
+        // and we display the significant results (the first entry is the fastest, the middle entry is the
+        // average, the last entry is the slowest ...)
+        out.printf("-> results in nanos: [%s]%n",  
+            Stream.of(0f, 24.99f, 49.99f, 74.99f, 99.99f)
+                .mapToInt(perc -> (int) (perc * sortedResults.size() / 100))
+                .mapToObj(sortedResults::get)
+                .map(this::formatNano)
+                .collect(joining(" | ")));
+    }
+    
+    /**
+     * Displays a nanosecond value using thousands separator. 
+     * Example: 1000000 -> 1,000,000
+     */
+    private String formatNano(Long nanoseconds) {
+		DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);
+		DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();
+		symbols.setGroupingSeparator(',');
+		return formatter.format(nanoseconds);
+    }
+
+    private void componentAdded() {
+        doProcessing();
+        m_startLatch.countDown();
+    }
+
+    private void componentRemoved() {
+        //doProcessing();
+        m_stopLatch.countDown();
+    }
+
+    private void doProcessing() {
+        if (m_doProcessingInStartStop) {
+            long duration = TimeUnit.MILLISECONDS.toNanos(ThreadLocalRandom.current().nextLong(5));
+            long t1 = System.nanoTime();
+            while (System.nanoTime() - t1 < duration)
+                ;
+        }
+    }
+    
+    /**
+     * Maps a function to all bundles participating in the benchmark.
+     */
+    private void forEachScenarioBundle(List<String> tests, Consumer<Bundle> consumer) {
+        tests.stream().forEach(test -> {
+            Optional<Bundle> bundle = Stream.of(m_bctx.getBundles()).filter(b -> b.getSymbolicName().equals(test)).findFirst();
+            bundle.ifPresent(b -> {
+                consumer.accept(b);
+            });
+        });   
+    }
+    
+   /**
+     * This function does this:
+     * 
+     * 1) start a bundle, and register the ScenarioController service (this will trigger all components activation)
+     * 2) wait for all expected components to be fully started
+     * 3) stop the bundle and wait for all expected components to be fully stopped
+     * 
+     * @param b the benchmarked scenario bundle
+     */
+    void startAndStop(Bundle b) {
+        try {
+            initLatches();
+
+            debug(() -> "starting bundle " + b.getSymbolicName());
+            b.start();
+                                    
+            if (! m_startLatch.await(60, TimeUnit.SECONDS)) {
+                out.println("Could not start components timely: current start latch=" + m_startLatch.getCount() + ", stop latch=" + m_stopLatch.getCount());
+                Unchecked.run(() -> Thread.sleep(Integer.MAX_VALUE));
+            }
+                        
+            debug(() -> "stopping bundle " + b.getSymbolicName());
+            b.stop();
+            
+            // Wait for all component deactivations
+            if (! m_stopLatch.await(60, TimeUnit.SECONDS)) {
+                out.println("Could not stop components timely: current start latch=" + m_startLatch.getCount() + ", stop latch=" + m_stopLatch.getCount());
+                Unchecked.run(() -> Thread.sleep(Integer.MAX_VALUE));
+            }            
+        } catch (Throwable t) {
+            t.printStackTrace();
+        }
+    }
+    
+    /**
+     * Initialize the latches used to track when all scenario bundle components are started or stopped.
+     */
+    private void initLatches() {
+        m_startLatch = new CountDownLatch(ARTISTS
+            + (ARTISTS * (ALBUMS + (ALBUMS * TRACKS))));
+        
+        m_stopLatch = new CountDownLatch(ARTISTS
+            + (ARTISTS * (ALBUMS + (ALBUMS * TRACKS))));
+    }
+
+    /**
+     * Returns the time consumed by the given runnable, ²ch is executed by this method.
+     */
+    private long durationOf(Runnable scenario) {
+        long start = System.nanoTime();
+        long end = 0;
+        try {
+            scenario.run();
+            end = System.nanoTime();
+        } catch (Throwable t) {
+            t.printStackTrace();
+        }
+        return (end - start);
+    }
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/packageinfo
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/packageinfo?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/packageinfo (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/controller/packageinfo Sat Feb 28 07:23:20 2015
@@ -0,0 +1 @@
+version 1.0
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/Activator.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/Activator.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/Activator.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/Activator.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,19 @@
+package org.apache.felix.dm.benchmark.dependencymanager;
+
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
+import org.apache.felix.dm.benchmark.controller.ScenarioController;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Activator for a scenario based on Dependency Manager 4.0
+ * We'll create many Artists, each one is depending on many Albums, and each Album depends on many Tracks.
+ */
+public class Activator extends DependencyActivatorBase {
+    @Override
+    public void init(BundleContext context, DependencyManager dm) throws Exception {  
+        dm.add(createComponent()
+            .setImplementation(Benchmark.class)
+            .add(createServiceDependency().setService(ScenarioController.class).setRequired(true)));
+    }
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/Benchmark.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/Benchmark.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/Benchmark.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/Benchmark.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,87 @@
+package org.apache.felix.dm.benchmark.dependencymanager;
+
+import static org.apache.felix.dm.benchmark.scenario.Artist.ALBUMS;
+import static org.apache.felix.dm.benchmark.scenario.Artist.ARTISTS;
+import static org.apache.felix.dm.benchmark.scenario.Artist.TRACKS;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.stream.IntStream;
+import java.util.stream.Stream;
+
+import org.apache.felix.dm.Component;
+import org.apache.felix.dm.DependencyManager;
+import org.apache.felix.dm.benchmark.controller.ScenarioController;
+import org.apache.felix.dm.benchmark.scenario.Album;
+import org.apache.felix.dm.benchmark.scenario.Artist;
+import org.apache.felix.dm.benchmark.scenario.Helper;
+import org.apache.felix.dm.benchmark.scenario.Track;
+import org.apache.felix.dm.benchmark.scenario.impl.AlbumImpl;
+import org.apache.felix.dm.benchmark.scenario.impl.ArtistImpl;
+import org.apache.felix.dm.benchmark.scenario.impl.TrackImpl;
+
+public class Benchmark {
+    volatile DependencyManager m_dm;
+    volatile ScenarioController m_controller;
+    final List<Component> m_components = new ArrayList<>();
+
+    /**
+     * Initialize our Artists, Albums/Tracks, possibly using a parallel dependency manager.
+     */
+    @SuppressWarnings("unused")
+    private void start() {
+        Helper.debug(() -> "Benchmark.start");
+        
+        IntStream.range(0, ARTISTS)
+            .mapToObj(i -> createArtists(m_dm)).peek(m_components::add)
+            .flatMap(artist -> createAlbums(m_dm, artist)).peek(m_components::add)
+            .flatMap(album -> createTracks(m_dm, album)).forEach(m_components::add);
+                            
+        m_components.stream().forEach(m_dm::add);
+    }
+    
+    @SuppressWarnings("unused")
+    private void stop() {
+        m_components.forEach(m_dm::remove);
+    }
+
+    private Component createArtists(DependencyManager dm) {
+        Component artist = dm.createComponent()
+            .setInterface(Artist.class.getName(), null)
+            .setImplementation(new ArtistImpl(m_controller));
+        return artist;
+    }
+    
+    private Stream<Component> createAlbums(DependencyManager dm, Component artist) {
+        return IntStream.range(0, ALBUMS).mapToObj(i -> {
+            long id = Helper.generateId();
+            String filter = "(id=" + id + ")";
+            artist.add(dm.createServiceDependency()
+                         .setService(Album.class, filter).setRequired(true).setCallbacks("addAlbum", null));            
+            
+            Hashtable<String, Object> props = new Hashtable<>();
+            props.put("id", String.valueOf(id));
+            Component c = dm.createComponent()
+                .setInterface(Album.class.getName(), props)
+                .setImplementation(new AlbumImpl(m_controller));
+            return c;
+        });
+    }
+        
+    private Stream<Component> createTracks(DependencyManager dm, Component album) {
+        return IntStream.range(0, TRACKS).mapToObj(i -> {
+            long id = Helper.generateId();
+            String f = "(id=" + String.valueOf(id) + ")";
+            album.add(dm.createServiceDependency()
+                        .setService(Track.class, f).setRequired(true).setCallbacks("addTrack", null));
+
+            Hashtable<String, Object> p = new Hashtable<>();
+            p.put("id", String.valueOf(id));
+            Component c = dm.createComponent()
+                .setInterface(Track.class.getName(), p)
+                .setImplementation(new TrackImpl(m_controller));
+            return c;
+        });
+    }
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/ParallelActivator.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/ParallelActivator.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/ParallelActivator.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/dependencymanager/ParallelActivator.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,24 @@
+package org.apache.felix.dm.benchmark.dependencymanager;
+
+import java.util.concurrent.Executor;
+
+import org.apache.felix.dm.Component;
+import org.apache.felix.dm.ComponentExecutorFactory;
+import org.apache.felix.dm.DependencyManager;
+import org.apache.felix.dm.benchmark.scenario.Helper;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Parallel version of our default Activator.
+ */
+public class ParallelActivator extends Activator {
+    public void init(BundleContext context, DependencyManager mgr) throws Exception {
+        context.registerService(ComponentExecutorFactory.class.getName(), new ComponentExecutorFactory() {
+            @Override
+            public Executor getExecutorFor(Component component) {
+                return Helper.getThreadPool(); // Return our thread pool shared for all components
+            }
+        }, null);
+        super.init(context, mgr);
+    }
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Album.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Album.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Album.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Album.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,18 @@
+package org.apache.felix.dm.benchmark.scenario;
+
+import java.util.List;
+
+/**
+ * A single release of musics, comprising some music tracks.
+ */
+public interface Album {
+    /**
+     * Returns the music tracks this Album is comprising.
+     */
+    List<Track> getMusicTracks();
+
+    /**
+     * Play all tracks from all albums.
+     */
+    void play();
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Artist.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Artist.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Artist.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Artist.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,36 @@
+package org.apache.felix.dm.benchmark.scenario;
+
+import java.util.List;
+
+/**
+ * An individual who creates musical Albums
+ */
+public interface Artist {
+    /**
+     * When a scenario bundles starts, it creates the following number of Artists (service)
+     * (you have to regenerate the SCR xml descriptor if you modify this, see README)
+     */
+    public final int ARTISTS = 30;
+    
+    /**
+     * Each Artist creates the following number of musical Albums.
+     * (you have to regenerate the SCR xml descriptor if you modify this, see README)
+     */
+    public final int ALBUMS = 5;
+    
+    /**
+     * Each Album contains the following number of musical Tracks.
+     * (you have to regenerate the SCR xml descriptor if you modify this, see README)
+     */
+    public final int TRACKS = 3;
+    
+    /**
+     * Returns the Albums that this Artist has created
+     */
+    List<Album> getAlbums();
+    
+    /**
+     * Play all tracks from all albums (this test method invocation time between services).
+     */
+    void play();
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Helper.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Helper.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Helper.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Helper.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,49 @@
+package org.apache.felix.dm.benchmark.scenario;
+
+import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.Supplier;
+
+/**
+ * Helper class containing misc functions, and constants.
+ */
+public class Helper {
+    /**
+     * Activate this flag for debugging.
+     */
+    private final static boolean DEBUG = false;
+
+    /** 
+     * Generator used to create unique identifiers.
+     */
+    private final static AtomicLong m_idGenerator = new AtomicLong();
+
+    /**
+     * Threadpool which can be optionally used by parallel scenarios.
+     */
+    private final static int CORES = Runtime.getRuntime().availableProcessors();
+    private final static ForkJoinPool TPOOL = new ForkJoinPool(CORES);
+    
+    /**
+     * Get the threadpool, possibly needed by some scenario supporting parallel mode
+     */
+    public static ForkJoinPool getThreadPool() {
+        return TPOOL;
+    }
+    
+    /**
+     * Display some debug messages.
+     */
+    public static void debug(Supplier<String> message) {
+        if (DEBUG) {
+            System.out.println(message.get());
+        }
+    }
+
+    /**
+     * Generates a unique id.
+     */
+    public static long generateId() {
+        return m_idGenerator.incrementAndGet();
+    }
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Track.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Track.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Track.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Track.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,11 @@
+package org.apache.felix.dm.benchmark.scenario;
+
+/**
+ * A piece of music
+ */
+public interface Track {
+    /**
+     * Play this single piece of music.
+     */
+    void play();
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Unchecked.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Unchecked.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Unchecked.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/Unchecked.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,83 @@
+package org.apache.felix.dm.benchmark.scenario;
+
+import java.util.function.Consumer;
+import java.util.function.Function;
+
+/**
+ * Helper functions used to work around the java.util.function.* functions, which don't support 
+ * methods throwing a checked exception.
+ */
+public class Unchecked {
+    /**
+     * Same functional interface as java.util.function.Consumer, except that the accept method may throw an exception.
+     */
+    @FunctionalInterface
+    public static interface CheckedConsumer<T> {
+        public void accept(T t) throws Exception;
+    }
+    
+    /**
+     * Same interface as Runnable, except that the run method may throw an exception.
+     */
+    @FunctionalInterface
+    public static interface CheckedRunnable {
+        public void run() throws Exception;
+    }
+    
+    /**
+     * Same interface as Function, except that the accept method may throw an exception.
+     */
+    @FunctionalInterface
+    public static interface CheckedFunction<T,U> {
+        public U apply(T t) throws Exception;
+    }
+    
+    /**
+     * Wraps a Consumer whose accept method may throw an exception behind a regular java.util.function.Consumer
+     */
+    public static <T> Consumer<T> consumer(CheckedConsumer<T> c) {
+        return (t) -> {
+            try {
+                c.accept(t);
+            }
+            catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+            catch (Throwable err) {
+                throw err;
+            }
+        };
+    }
+    
+    /**
+     * Wraps a Consumer whose accept method may throw an exception behind a regular java.util.function.Consumer
+     */
+    public static <T,U> Function<T, U> func(CheckedFunction<T, U> f) {
+        return (t) -> {
+            try {
+                return f.apply(t);
+            }
+            catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+            catch (Throwable err) {
+                throw err;
+            }
+        };
+    }
+
+    /**
+     * Runs a runnable which may throw an exception without having to catch it.
+     */
+    public static void run(CheckedRunnable r) {
+        try {
+            r.run();
+        }
+        catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+        catch (Throwable err) {
+            throw err;
+        }
+    }
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/AlbumImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/AlbumImpl.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/AlbumImpl.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/AlbumImpl.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,44 @@
+package org.apache.felix.dm.benchmark.scenario.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.felix.dm.benchmark.controller.ScenarioController;
+import org.apache.felix.dm.benchmark.scenario.Album;
+import org.apache.felix.dm.benchmark.scenario.Track;
+
+/**
+ * An album comprising several music tracks.
+ */
+public class AlbumImpl implements Album {
+    final List<Track> m_musicTracks = new ArrayList<>();
+    final ScenarioController m_controller;
+    
+    public AlbumImpl(ScenarioController controller) {
+        m_controller = controller;
+    }
+    
+    void addTrack(Track dep) {
+        m_musicTracks.add(dep);
+    }
+        
+    void start() {
+        m_controller.albumAdded(this);
+    }
+    
+    void stop() {
+        m_controller.albumRemoved(this);
+    }
+
+    @Override
+    public List<Track> getMusicTracks() {
+        return m_musicTracks;
+    }
+
+    @Override
+    public void play() {
+        for (Track track : m_musicTracks) {
+            track.play();
+        }
+    }
+}

Added: felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/ArtistImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/ArtistImpl.java?rev=1662903&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/ArtistImpl.java (added)
+++ felix/sandbox/pderop/dependencymanager/org.apache.felix.dependencymanager.benchmark/src/org/apache/felix/dm/benchmark/scenario/impl/ArtistImpl.java Sat Feb 28 07:23:20 2015
@@ -0,0 +1,43 @@
+package org.apache.felix.dm.benchmark.scenario.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.felix.dm.benchmark.controller.ScenarioController;
+import org.apache.felix.dm.benchmark.scenario.Album;
+import org.apache.felix.dm.benchmark.scenario.Artist;
+
+/**
+ * One artist who depends on multiple Albums.
+ */
+public class ArtistImpl implements Artist {
+    final List<Album> m_albums = new ArrayList<>();
+    final ScenarioController m_controller;
+    
+    public ArtistImpl(ScenarioController controller) {
+        m_controller = controller;
+    }
+    
+    void addAlbum(Album dep) {
+        m_albums.add(dep);
+    }
+
+    void start() {
+        m_controller.artistAdded(this);
+    }
+    
+    void stop() {
+        m_controller.artistRemoved(this);
+    }
+
+    @Override
+    public List<Album> getAlbums() {
+        return m_albums;
+    }
+    
+    public void play() {
+        for (Album album : m_albums) {
+            album.play();
+        }
+    }
+}



Mime
View raw message