@@ -0,0 +1,1909 @@
+package org.jboss.msc.bench;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.concurrent.CountDownLatch;%0A%0Aimport org.jboss.msc.registry.ServiceDefinition;%0Aimport org.jboss.msc.registry.ServiceRegistrationBatchBuilder;%0Aimport org.jboss.msc.registry.ServiceRegistry;%0Aimport org.jboss.msc.service.Service;%0Aimport org.jboss.msc.service.ServiceContainer;%0Aimport org.jboss.msc.service.ServiceName;%0Aimport org.jboss.msc.service.TimingServiceListener;%0A%0Apublic class TenForwardBench %7B%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        final int totalServiceDefinitions = Integer.parseInt(args%5B0%5D);%0A%0A        final ServiceContainer container = ServiceContainer.Factory.create();%0A        ServiceRegistrationBatchBuilder batch = ServiceRegistry.Factory.create(container).batchBuilder();%0A%0A        final CountDownLatch latch = new CountDownLatch(1);%0A        final TimingServiceListener listener = new TimingServiceListener(new TimingServiceListener.FinishListener() %7B%0A            public void done(final TimingServiceListener timingServiceListener) %7B%0A                latch.countDown();%0A            %7D%0A        %7D);%0A        for (int i = 0; i %3C totalServiceDefinitions; i++) %7B%0A            List%3CServiceName%3E deps = new ArrayList%3CServiceName%3E();%0A            int numDeps = Math.min(10, totalServiceDefinitions - i - 1);%0A%0A            for (int j = 1; j %3C numDeps + 1; j++) %7B%0A                deps.add(ServiceName.of((%22test%22 + (i + j)).intern()));%0A            %7D%0A            batch.add(ServiceDefinition.build(ServiceName.of((%22test%22 + i).intern()), Service.NULL_VALUE).addListener(listener).addDependencies(deps.toArray(new ServiceName%5Bdeps.size()%5D)).create());%0A        %7D%0A        %0A        batch.install();%0A        listener.finishBatch();%0A        latch.await();%0A        System.out.println(totalServiceDefinitions + %22 : %22  + listener.getElapsedTime() / 1000.0);%0A        container.shutdown();%0A    %7D%0A%7D%0A

Add 10 -> bench