use of com.linkedin.d2.balancer.simulator.SimpleLoadBalancerSimulation in project rest.li by linkedin.
the class SimpleLoadBalancerTest method testLoadBalancerSimulationRandomLarge.
@Test(enabled = false, groups = { "large", "back-end" })
public void testLoadBalancerSimulationRandomLarge() throws URISyntaxException, IOException, ServiceUnavailableException, InterruptedException {
SimpleLoadBalancerSimulation simulator = new SimpleLoadBalancerSimulation(new RandomLoadBalancerStrategyFactory());
simulator.simulateMultithreaded(1, 1000, 20);
simulator.reset();
simulator.simulateMultithreaded(1, 10000, 20);
simulator.reset();
simulator.simulateMultithreaded(8, 10000, 750);
simulator.reset();
simulator.simulateMultithreaded(50, 10000, 100);
simulator.reset();
simulator.simulateMultithreaded(50, 10000, 100);
simulator.reset();
}
use of com.linkedin.d2.balancer.simulator.SimpleLoadBalancerSimulation in project rest.li by linkedin.
the class SimpleLoadBalancerTest method testLoadBalancerSimulationDegrader.
@Test(groups = { "medium", "back-end" })
public void testLoadBalancerSimulationDegrader() throws URISyntaxException, IOException, ServiceUnavailableException, InterruptedException {
SimpleLoadBalancerSimulation simulator = new SimpleLoadBalancerSimulation(new DegraderLoadBalancerStrategyFactoryV3());
simulator.simulateMultithreaded(1, 1000, 20);
simulator.reset();
simulator.simulateMultithreaded(50, 10000, 20);
simulator.reset();
}
use of com.linkedin.d2.balancer.simulator.SimpleLoadBalancerSimulation in project rest.li by linkedin.
the class SimpleLoadBalancerTest method testLoadBalancerSimulationRandom.
@Test(groups = { "medium", "back-end" }, enabled = false)
public void testLoadBalancerSimulationRandom() throws URISyntaxException, IOException, ServiceUnavailableException, InterruptedException {
SimpleLoadBalancerSimulation simulator = new SimpleLoadBalancerSimulation(new RandomLoadBalancerStrategyFactory());
simulator.simulateMultithreaded(1, 1000, 20);
simulator.reset();
simulator.simulateMultithreaded(50, 10000, 20);
simulator.reset();
}
use of com.linkedin.d2.balancer.simulator.SimpleLoadBalancerSimulation in project rest.li by linkedin.
the class SimpleLoadBalancerSimulation method main.
public static void main(String[] args) throws Exception {
SimpleLoadBalancerTest test = new SimpleLoadBalancerTest();
test.doOneTimeSetUp();
System.err.println(2);
test.testLoadBalancerSimulationRandom();
System.err.println(3);
test.testLoadBalancerSimulationRandomLarge();
System.err.println(4);
test.testLoadBalancerSimulationDegrader();
System.err.println(5);
test.testLoadBalancerSimulationDegraderLarge();
System.err.println(6);
test.testLoadBalancerSimulationDegraderWithFileStore();
System.err.println(7);
test.testLoadBalancerSimulationDegraderWithFileStoreLarge();
System.err.println(8);
test.doOneTimeTearDown();
new SimpleLoadBalancerSimulation(new DegraderLoadBalancerStrategyFactoryV3()).simulateMultithreaded(50, 1000000, 999999999);
}
use of com.linkedin.d2.balancer.simulator.SimpleLoadBalancerSimulation in project rest.li by linkedin.
the class SimpleLoadBalancerTest method testLoadBalancerSimulationDegraderWithFileStore.
@Test(groups = { "medium", "back-end" })
public void testLoadBalancerSimulationDegraderWithFileStore() throws URISyntaxException, IOException, ServiceUnavailableException, InterruptedException {
SimpleLoadBalancerSimulation simulator = new SimpleLoadBalancerSimulation(new DegraderLoadBalancerStrategyFactoryV3(), new FileStoreTestFactory<ClusterProperties>("cluster", new ClusterPropertiesJsonSerializer()), new FileStoreTestFactory<ServiceProperties>("service", new ServicePropertiesJsonSerializer()), new FileStoreTestFactory<UriProperties>("uri", new UriPropertiesJsonSerializer()));
simulator.simulateMultithreaded(1, 1000, 20);
simulator.reset();
simulator.simulateMultithreaded(50, 10000, 20);
simulator.reset();
}
Aggregations