From b65cd89989ead7082089bf6f333e56b03f619606 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Thu, 13 Jul 2017 20:21:01 +0200 Subject: HONEYCOMB-360 - Restconf Northbound Intefaces provider separation - Restconf configuration included under restconf.json Change-Id: I45f503d3ef383bd6e3d356308d3212c7314b7a28 Signed-off-by: Jan Srnicek --- .../benchmark/memory/MemoryFootprintBenchmark.java | 33 ++-------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java') diff --git a/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java b/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java index a51819a7c..ea83359c5 100644 --- a/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java +++ b/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java @@ -18,20 +18,10 @@ package io.fd.honeycomb.benchmark.memory; import com.google.common.collect.ImmutableSet; import com.google.inject.Injector; -import com.google.inject.Module; import io.fd.honeycomb.benchmark.memory.config.BindableCfgAttrsModule; -import io.fd.honeycomb.benchmark.memory.config.StaticHoneycombManagementModule; -import io.fd.honeycomb.benchmark.memory.write.NoopWritersModule; +import io.fd.honeycomb.benchmark.memory.config.StaticActivationModule; import io.fd.honeycomb.infra.distro.Main; import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration; -import io.fd.honeycomb.infra.distro.data.ConfigAndOperationalPipelineModule; -import io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule; -import io.fd.honeycomb.infra.distro.initializer.InitializerPipelineModule; -import io.fd.honeycomb.infra.distro.netconf.NetconfModule; -import io.fd.honeycomb.infra.distro.netconf.NetconfReadersModule; -import io.fd.honeycomb.infra.distro.restconf.RestconfModule; -import io.fd.honeycomb.infra.distro.schema.SchemaModule; -import io.fd.honeycomb.infra.distro.schema.YangBindingProviderModule; import io.fd.honeycomb.management.jmx.JMXBeanProvider; import org.eclipse.jetty.server.Server; import org.slf4j.Logger; @@ -50,23 +40,6 @@ public class MemoryFootprintBenchmark implements JMXBeanProvider, BenchmarkFiles private static final Logger LOG = LoggerFactory.getLogger(MemoryFootprintBenchmark.class); - /** - * All modules from infra to load.Not static to not persist state - */ - private final Set BASE_MODULES = ImmutableSet.of( - new YangBindingProviderModule(), - new SchemaModule(), - new ConfigAndOperationalPipelineModule(), - new ContextPipelineModule(), - new InitializerPipelineModule(), - new NetconfModule(), - new NetconfReadersModule(), - new RestconfModule(), - // to enable jmx - new StaticHoneycombManagementModule(), - //adds noop writers - new NoopWritersModule()); - // configuration class used to run benchmark, allows us to switch between honeycomb with data, or on rest private final HoneycombConfiguration configuration; @@ -94,9 +67,7 @@ public class MemoryFootprintBenchmark implements JMXBeanProvider, BenchmarkFiles */ private Injector startHoneycomb() { LOG.info("Starting embedded server with configuration {}", configuration); - return Main.init(ImmutableSet.builder() - .add(new BindableCfgAttrsModule(configuration)) - .addAll(BASE_MODULES).build()); + return Main.init(new StaticActivationModule(new BindableCfgAttrsModule(configuration))); } /** -- cgit 1.2.3-korg