summaryrefslogtreecommitdiffstats
path: root/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2017-07-13 20:21:01 +0200
committerMarek Gradzki <mgradzki@cisco.com>2017-07-14 12:20:49 +0000
commitb65cd89989ead7082089bf6f333e56b03f619606 (patch)
treec80952fdaead46627ca861d1b3edb68dc4b87f47 /infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java
parent32771868ab8f9d2fdad236c049ec1c3fc3c76ba0 (diff)
HONEYCOMB-360 - Restconf Northbound Intefaces provider separation
- Restconf configuration included under restconf.json Change-Id: I45f503d3ef383bd6e3d356308d3212c7314b7a28 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java')
-rw-r--r--infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java33
1 files changed, 2 insertions, 31 deletions
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<Module> 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.<Module>builder()
- .add(new BindableCfgAttrsModule(configuration))
- .addAll(BASE_MODULES).build());
+ return Main.init(new StaticActivationModule(new BindableCfgAttrsModule(configuration)));
}
/**