choreos$choreos_v-v
Client client
this.client = client;
void
void setClient(Client client)
loadGen = LoadGeneratorFactory.getInstance().<K, T> create();
void
void newLoadGenerator()
https://github.com/choreos/choreos_v-v/blob/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Fexperiments%2FExperiment.java
https://api.github.com/repos/choreos/choreos_v-v/contents/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Fexperiments%2FExperiment.java?ref=06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e
scalability_explorer/src/main/java/eu/choreos/vv/experiments/Experiment.java
import eu.choreos.vv.client.Client;
public abstract class Experiment implements Scalable {
	//private LoadGenerator<K, T> loadGen;
	private Client client;
	
	public Client getClient() {
		return client;
	}
	
	public void setClient(Client client) {
		this.client = client; 
	}
		//beforeIteration();
		//newLoadGenerator();
		//loadGen.setDelay(60000000000l / numberOfRequestsPerMinute);
		report = client.execute(numberOfRequestsPerIteration, 60000000000l / numberOfRequestsPerMinute, parameters);
		//afterIteration();
		report.setMeasurementUnit(client.getLabel());
scalability_explorer/src/main/java/eu/choreos/vv/experiments/Experiment.java
return client;
Client getClient()
Client client
scalability_explorer/src/main/java/eu/choreos/vv/experiments/Experiment.java
this.client = client;
void setClient(Client client)
import eu.choreos.vv.loadgenerator.LoadGenerator;
import eu.choreos.vv.loadgenerator.LoadGeneratorFactory;
public abstract class Experiment<K, T> implements Scalable {
	private LoadGenerator<K, T> loadGen;
	/**
	 * This method can be overridden to execute before each Iteration
	 * 
	 * @param resourceQuantity
	 *            current resource quantity
	 * @throws Exception
	 */
	public void beforeIteration() throws Exception {
	}

	/**
	 * This method can be overridden to execute before each request
	 * 
	 * @throws Exception
	 */
	public K beforeRequest() throws Exception {
		return null;
	}

	/**
	 * This method must be overridden in order to execute the proper request
	 * 
	 * @throws Exception
	 */
	public T request(K param) throws Exception {
		return null;
	}

	/**
	 * This method can be overriden to execute after each request
	 * 
	 * @throws Exception
	 */
	public void afterRequest(T param) throws Exception {
	}

	/**
	 * This method can be overriden to execute after each Iteration
	 * 
	 * @throws Expeption
	 */
	public void afterIteration() throws Exception {

	}

	private void newLoadGenerator() {
		loadGen = LoadGeneratorFactory.getInstance().<K, T> create();
	}
		beforeIteration();
		newLoadGenerator();
		loadGen.setDelay(60000000000l / numberOfRequestsPerMinute);
		report = loadGen.execute(numberOfRequestsPerIteration, this);
		afterIteration();
		report.setMeasurementUnit(loadGen.getLabel());
scalability_explorer/src/main/java/eu/choreos/vv/experiments/Experiment.java
loadGen = LoadGeneratorFactory.getInstance().<K, T> create();
void newLoadGenerator()
@@ -8,12 +8,11 @@
 import eu.choreos.vv.Scalable;
 import eu.choreos.vv.ScaleCaster;
 import eu.choreos.vv.analysis.Analyzer;
+import eu.choreos.vv.client.Client;
 import eu.choreos.vv.data.ExperimentReport;
 import eu.choreos.vv.data.ReportData;
 import eu.choreos.vv.deployment.Deployer;
 import eu.choreos.vv.experiments.strategy.ExperimentStrategy;
-import eu.choreos.vv.loadgenerator.LoadGenerator;
-import eu.choreos.vv.loadgenerator.LoadGeneratorFactory;
 import eu.choreos.vv.stop.IterationsStop;
 import eu.choreos.vv.stop.StopCriterion;
 
@@ -27,13 +26,14 @@
  * limit).
  * 
  */
-public abstract class Experiment<K, T> implements Scalable {
+public abstract class Experiment implements Scalable {
 
 	private int numberOfRequestsPerIteration;
 	private int numberOfRequestsPerMinute;
 	private Map<String, Object> parameters;
 	private StopCriterion criteria;
-	private LoadGenerator<K, T> loadGen;
+	//private LoadGenerator<K, T> loadGen;
+	private Client client;
 	private Deployer deployer;
 	private Analyzer analyzer;
 	private List<ExperimentReport> reports;
@@ -47,51 +47,6 @@ public abstract class Experiment<K, T> implements Scalable {
 	public void beforeExperiment() throws Exception {
 	}
 
-	/**
-	 * This method can be overridden to execute before each Iteration
-	 * 
-	 * @param resourceQuantity
-	 *            current resource quantity
-	 * @throws Exception
-	 */
-	public void beforeIteration() throws Exception {
-	}
-
-	/**
-	 * This method can be overridden to execute before each request
-	 * 
-	 * @throws Exception
-	 */
-	public K beforeRequest() throws Exception {
-		return null;
-	}
-
-	/**
-	 * This method must be overridden in order to execute the proper request
-	 * 
-	 * @throws Exception
-	 */
-	public T request(K param) throws Exception {
-		return null;
-	}
-
-	/**
-	 * This method can be overriden to execute after each request
-	 * 
-	 * @throws Exception
-	 */
-	public void afterRequest(T param) throws Exception {
-	}
-
-	/**
-	 * This method can be overriden to execute after each Iteration
-	 * 
-	 * @throws Expeption
-	 */
-	public void afterIteration() throws Exception {
-
-	}
-
 	/**
 	 * This method can be overriden to execute after the experiment
 	 * 
@@ -112,9 +67,6 @@ public Experiment() {
 		parameters = new HashMap<String, Object>();
 	}
 
-	private void newLoadGenerator() {
-		loadGen = LoadGeneratorFactory.getInstance().<K, T> create();
-	}
 
 	public ExperimentStrategy getStrategy() {
 		return strategy;
@@ -132,6 +84,14 @@ public Deployer getDeployer() {
 	public void setDeployer(Deployer enacter) {
 		this.deployer = enacter;
 	}
+	
+	public Client getClient() {
+		return client;
+	}
+	
+	public void setClient(Client client) {
+		this.client = client; 
+	}
 
 	public int getNumberOfRequestsPerIteration() {
 		return numberOfRequestsPerIteration;
@@ -185,13 +145,13 @@ public ReportData execute(ScaleCaster scaleCaster) throws Exception {
 
 		if (deployer != null)
 			deployer.scale(parameters);
-		beforeIteration();
+		//beforeIteration();
 
-		newLoadGenerator();
-		loadGen.setDelay(60000000000l / numberOfRequestsPerMinute);
-		report = loadGen.execute(numberOfRequestsPerIteration, this);
+		//newLoadGenerator();
+		//loadGen.setDelay(60000000000l / numberOfRequestsPerMinute);
+		report = client.execute(numberOfRequestsPerIteration, 60000000000l / numberOfRequestsPerMinute, parameters);
 
-		afterIteration();
+		//afterIteration();
 
 		return report;
 	}
@@ -244,7 +204,7 @@ public void run(String name, boolean analyse, boolean store)
 			deployer.deploy();
 		report = scaleCaster.execute();
 		report.setParameterLabels(getParameterLabels());
-		report.setMeasurementUnit(loadGen.getLabel());
+		report.setMeasurementUnit(client.getLabel());
 		afterExperiment();
 		if (store)
 			reports.add(report);
https://github.com/choreos/choreos_v-v/raw/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Fexperiments%2FExperiment.java
6b90a3a1100563d9627fe88eb5d2bdc34c13afe1
modified
https://github.com/choreos/choreos_v-v/blob/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FLoadGenerator.java
https://api.github.com/repos/choreos/choreos_v-v/contents/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FLoadGenerator.java?ref=06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e
scalability_explorer/src/main/java/eu/choreos/vv/loadgenerator/LoadGenerator.java
import eu.choreos.vv.client.Client;
	public ReportData execute(int times, Client<K, T> exec) throws Exception;
import eu.choreos.vv.experiments.Experiment;
	public ReportData execute(int times, Experiment<K, T> exec) throws Exception;
@@ -1,8 +1,8 @@
 package eu.choreos.vv.loadgenerator;
 
 import eu.choreos.vv.chart.Labeled;
+import eu.choreos.vv.client.Client;
 import eu.choreos.vv.data.ReportData;
-import eu.choreos.vv.experiments.Experiment;
 import eu.choreos.vv.loadgenerator.strategy.LoadGenerationStrategy;
 
 /**
@@ -19,7 +19,7 @@ public interface LoadGenerator <K, T> extends Labeled {
 	 * @return a list of the values returned by the executions
 	 * @throws Exception
 	 */
-	public ReportData execute(int times, Experiment<K, T> exec) throws Exception;
+	public ReportData execute(int times, Client<K, T> exec) throws Exception;
 	
 	public void setDelay(long delay);
 	
https://github.com/choreos/choreos_v-v/raw/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FLoadGenerator.java
c49402db6d2dbf0efbc5e404e0742b43fb326917
modified
https://github.com/choreos/choreos_v-v/blob/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FParallelLoadGenerator.java
https://api.github.com/repos/choreos/choreos_v-v/contents/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FParallelLoadGenerator.java?ref=06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e
scalability_explorer/src/main/java/eu/choreos/vv/loadgenerator/ParallelLoadGenerator.java
import eu.choreos.vv.client.Client;
	private Client<K, T> client;
	public ReportData execute(int numberOfCalls, Client<K, T> client)
		this.client = client;
		K valueBefore = client.beforeRequest();
		T valueRequest = client.request(valueBefore);
		client.afterRequest(valueRequest);
	private Experiment<K, T> experiment;
	public ReportData execute(int numberOfCalls, Experiment<K, T> experiment)
		this.experiment = experiment;
		K valueBefore = experiment.beforeRequest();
		T valueRequest = experiment.request(valueBefore);
		experiment.afterRequest(valueRequest);
@@ -9,6 +9,7 @@
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 
+import eu.choreos.vv.client.Client;
 import eu.choreos.vv.data.ReportData;
 import eu.choreos.vv.experiments.Experiment;
 import eu.choreos.vv.loadgenerator.strategy.LoadGenerationStrategy;
@@ -23,7 +24,7 @@ public class ParallelLoadGenerator <K, T> implements LoadGenerator<K, T>, Callab
 
 	private int poolSize;
 	private int timeout;
-	private Experiment<K, T> experiment;
+	private Client<K, T> client;
 	private LoadGenerationStrategy strategy;
 
 	protected long delay;
@@ -34,14 +35,14 @@ public String getLabel() {
 	}
 
 	@Override
-	public ReportData execute(int numberOfCalls, Experiment<K, T> experiment)
+	public ReportData execute(int numberOfCalls, Client<K, T> client)
 			throws Exception {
 		final ExecutorService executorService = Executors
 				.newFixedThreadPool(poolSize);
 		final List<Future<Double>> futureResults = new ArrayList<Future<Double>>();
 		final List<Number> measurements = new ArrayList<Number>();
 		Date start, end;
-		this.experiment = experiment;
+		this.client = client;
 		strategy.setMeanDelay(delay);
 		strategy.setup();
 		try {
@@ -123,11 +124,11 @@ public void setTimeout(int timeout) {
 	 */
 	@Override
 	public Double call() throws Exception {
-		K valueBefore = experiment.beforeRequest();
+		K valueBefore = client.beforeRequest();
 		double start = System.currentTimeMillis();
-		T valueRequest = experiment.request(valueBefore);
+		T valueRequest = client.request(valueBefore);
 		double end = System.currentTimeMillis();
-		experiment.afterRequest(valueRequest);
+		client.afterRequest(valueRequest);
 		return (end - start);
 	}
 
https://github.com/choreos/choreos_v-v/raw/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FParallelLoadGenerator.java
40f83141f65934a9c82a52b6399ce4e60d42d6c8
modified
https://github.com/choreos/choreos_v-v/blob/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FSequentialLoadGenerator.java
https://api.github.com/repos/choreos/choreos_v-v/contents/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FSequentialLoadGenerator.java?ref=06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e
scalability_explorer/src/main/java/eu/choreos/vv/loadgenerator/SequentialLoadGenerator.java
import eu.choreos.vv.client.Client;
	private Client<K, T> client;
	public ReportData execute(int numberOfCalls, Client<K, T> client)
		this.client = client;
		K valueBefore = client.beforeRequest();
		T valueRequest = client.request(valueBefore);
		client.afterRequest(valueRequest);
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import eu.choreos.vv.experiments.Experiment;
	private Experiment<K, T> experiment;
	public ReportData execute(int numberOfCalls, Experiment<K, T> experiment)
		this.experiment = experiment;
		K valueBefore = experiment.beforeRequest();
		T valueRequest = experiment.request(valueBefore);
		experiment.afterRequest(valueRequest);
@@ -3,14 +3,9 @@
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
 
+import eu.choreos.vv.client.Client;
 import eu.choreos.vv.data.ReportData;
-import eu.choreos.vv.experiments.Experiment;
 import eu.choreos.vv.loadgenerator.strategy.LoadGenerationStrategy;
 
 /**
@@ -21,7 +16,7 @@ public class SequentialLoadGenerator <K, T> implements LoadGenerator<K, T> {
 
 	static final String LABEL = "response time (msec)";
 
-	private Experiment<K, T> experiment;
+	private Client<K, T> client;
 	private LoadGenerationStrategy strategy;
 
 	protected long delay;
@@ -32,11 +27,11 @@ public String getLabel() {
 	}
 
 	@Override
-	public ReportData execute(int numberOfCalls, Experiment<K, T> experiment)
+	public ReportData execute(int numberOfCalls, Client<K, T> client)
 			throws Exception {
 		final List<Number> measurements = new ArrayList<Number>();
 		Date start, end;
-		this.experiment = experiment;
+		this.client = client;
 		strategy.setMeanDelay(delay);
 		strategy.setup();
 			start = new Date();
@@ -72,11 +67,11 @@ public long getDelay() {
 	}
 
 	public Double call() throws Exception {
-		K valueBefore = experiment.beforeRequest();
+		K valueBefore = client.beforeRequest();
 		double start = System.currentTimeMillis();
-		T valueRequest = experiment.request(valueBefore);
+		T valueRequest = client.request(valueBefore);
 		double end = System.currentTimeMillis();
-		experiment.afterRequest(valueRequest);
+		client.afterRequest(valueRequest);
 		return (end - start);
 	}
 
https://github.com/choreos/choreos_v-v/raw/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Fmain%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FSequentialLoadGenerator.java
15a4b660f2d84b8b89fa8e0e86ae257cfee449f9
modified
https://github.com/choreos/choreos_v-v/blob/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Ftest%2Fjava%2Feu%2Fchoreos%2Fvv%2Fexample%2FScalabilityTestExample.java
https://api.github.com/repos/choreos/choreos_v-v/contents/scalability_explorer%2Fsrc%2Ftest%2Fjava%2Feu%2Fchoreos%2Fvv%2Fexample%2FScalabilityTestExample.java?ref=06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e
scalability_explorer/src/test/java/eu/choreos/vv/example/ScalabilityTestExample.java
import eu.choreos.vv.client.Client;
public class ScalabilityTestExample extends Experiment {
	public static final int REQUESTS = 10;
	
	List<Long> resources = new ArrayList<Long>();
	



		this.setClient(new TheClient(resources));
		this.setAnalyser(new AggregatePerformance("Scalability Chart",
				new MeanChartCreator(), 1));


	public static void execute() throws Exception {
		ScalabilityTestExample example = new ScalabilityTestExample();
		example.run("test1");

	}

	public static void main(String[] args) throws Exception {
		execute();

	}

	@Test
	public void shouldExecuteWithoutError() throws Exception {
		execute();
	}

}

class TheClient extends Client<Long, Long> {
	List<Long> resources;
	int resourceIndex = 0;

	long[] timestamps;
	int count;

	public TheClient(List<Long> rs) {
		resources = rs;
		// System.out.println("index " + resourceIndex);
		// System.out.println("resource size " + resources.size());
		// System.out.println("request time " + System.currentTimeMillis());
		// System.out.println("sleep " + sleepTime);
	public void setUp() {
		// resources.add(50l);
		timestamps = new long[ScalabilityTestExample.REQUESTS];
		count = 0;
		resources.add(Math.round(Math.random() * 100l
				* (Integer) (params.get("a"))));
		System.out.println("######### new iteration ##############");
	@Override
	public void tearDown() {
		for (int i = 1; i < ScalabilityTestExample.REQUESTS; i++)
			System.out.println(timestamps[i] - timestamps[i - 1]);
public class ScalabilityTestExample extends Experiment <Long, Long>{

	private static final int REQUESTS = 10;
	List<Long> resources;
	int resourceIndex;
	long[] timestamps;
	int count;

		resources = new ArrayList<Long>();
		resourceIndex = 0;
		
		
		
		
		this.setAnalyser(new AggregatePerformance("Scalability Chart", new MeanChartCreator(), 1));
		
	
	@Override
	public void beforeIteration() {
		//resources.add(50l);
		timestamps = new long[REQUESTS];
		count = 0;
		resources.add(Math.round( Math.random() * 100l * (Integer)(getParam("a"))));
		System.out.println("######### new iteration ##############");
//		System.out.println("index " + resourceIndex);
//		System.out.println("resource size " + resources.size());
//		System.out.println("request time " + System.currentTimeMillis());
//		System.out.println("sleep " + sleepTime);
	public void afterIteration() {
		for(int i = 1; i < REQUESTS; i++)
			System.out.println(timestamps[i]-timestamps[i-1]);
	}

	public static void execute() throws Exception {
		ScalabilityTestExample example = new ScalabilityTestExample();
		example.run("test1");

	}

	public static void main(String[] args) throws Exception {
		execute();

	@Test
	public void shouldExecuteWithoutError() throws Exception {
		execute();
scalability_explorer/src/test/java/eu/choreos/vv/example/ScalabilityTestExample.java
//resources.add(50l);
		timestamps = new long[REQUESTS];
		count = 0;
		resources.add(Math.round( Math.random() * 100l * (Integer)(getParam("a"))));
		System.out.println("######### new iteration ##############");
//		System.out.println("index " + resourceIndex);
//		System.out.println("resource size " + resources.size());
//		System.out.println("request time " + System.currentTimeMillis());
//		System.out.println("sleep " + sleepTime);
	public void afterIteration() {
		for(int i = 1; i < REQUESTS; i++)
			System.out.println(timestamps[i]-timestamps[i-1]);
void beforeIteration()
@@ -8,6 +8,7 @@
 import eu.choreos.vv.aggregations.Mean;
 import eu.choreos.vv.analysis.AggregatePerformance;
 import eu.choreos.vv.chart.creator.MeanChartCreator;
+import eu.choreos.vv.client.Client;
 import eu.choreos.vv.experiments.Experiment;
 import eu.choreos.vv.experiments.strategy.ComposedStrategy;
 import eu.choreos.vv.experiments.strategy.ExperimentStrategy;
@@ -17,50 +18,66 @@
 import eu.choreos.vv.increasefunctions.LinearIncrease;
 import eu.choreos.vv.stop.MeasurementStop;
 
-public class ScalabilityTestExample extends Experiment <Long, Long>{
-
-	private static final int REQUESTS = 10;
-	List<Long> resources;
-	int resourceIndex;
+public class ScalabilityTestExample extends Experiment {
+	public static final int REQUESTS = 10;
+	
+	List<Long> resources = new ArrayList<Long>();
+	
 	
-	long[] timestamps;
-	int count;
-
 	@Override
 	public void beforeExperiment() {
-		resources = new ArrayList<Long>();
-		resourceIndex = 0;
-		
 		ExperimentStrategy estrategy = new WorkloadScaling();
 		estrategy.setFunction(new LinearIncrease(100));
 		estrategy.setParameterInitialValue(100);
-		
+
 		ExperimentStrategy cstrategy = new ParameterScaling("a");
 		cstrategy.setFunction(new ExponentialIncrease(2));
 		cstrategy.setParameterInitialValue(1);
-		
+
 		ExperimentStrategy strategy = new ComposedStrategy(estrategy, cstrategy);
-		
+
+		this.setClient(new TheClient(resources));
 		this.setStrategy(strategy);
 		this.setNumberOfRequestsPerIteration(REQUESTS);
 		this.setStoppingCriteria(new MeasurementStop(100.0, new Mean()));
-		this.setAnalyser(new AggregatePerformance("Scalability Chart", new MeanChartCreator(), 1));
-		
+		this.setAnalyser(new AggregatePerformance("Scalability Chart",
+				new MeanChartCreator(), 1));
+
 	}
-	
-	@Override
-	public void beforeIteration() {
-		//resources.add(50l);
-		timestamps = new long[REQUESTS];
-		count = 0;
-		resources.add(Math.round( Math.random() * 100l * (Integer)(getParam("a"))));
-		System.out.println("######### new iteration ##############");
+
+	public static void execute() throws Exception {
+		ScalabilityTestExample example = new ScalabilityTestExample();
+		example.run("test1");
+
+	}
+
+	public static void main(String[] args) throws Exception {
+		execute();
+
+	}
+
+	@Test
+	public void shouldExecuteWithoutError() throws Exception {
+		execute();
+	}
+
+}
+
+class TheClient extends Client<Long, Long> {
+	List<Long> resources;
+	int resourceIndex = 0;
+
+	long[] timestamps;
+	int count;
+
+	public TheClient(List<Long> rs) {
+		resources = rs;
 	}
 
 	@Override
 	public Long beforeRequest() {
-//		System.out.println("index " + resourceIndex);
-//		System.out.println("resource size " + resources.size());
+		// System.out.println("index " + resourceIndex);
+		// System.out.println("resource size " + resources.size());
 		Long sleepTime = resources.get(resourceIndex);
 		resourceIndex = resourceIndex < resources.size() - 1 ? resourceIndex + 1
 				: 0;
@@ -70,8 +87,8 @@ public Long beforeRequest() {
 	@Override
 	public Long request(Long param) {
 		timestamps[count++] = System.nanoTime();
-//		System.out.println("request time " + System.currentTimeMillis());
-//		System.out.println("sleep " + sleepTime);
+		// System.out.println("request time " + System.currentTimeMillis());
+		// System.out.println("sleep " + sleepTime);
 		try {
 			Thread.sleep(param);
 		} catch (InterruptedException e) {
@@ -82,25 +99,19 @@ public Long request(Long param) {
 	}
 
 	@Override
-	public void afterIteration() {
-		for(int i = 1; i < REQUESTS; i++)
-			System.out.println(timestamps[i]-timestamps[i-1]);
-	}
-
-	public static void execute() throws Exception {
-		ScalabilityTestExample example = new ScalabilityTestExample();
-		example.run("test1");
-
-	}
-
-	public static void main(String[] args) throws Exception {
-		execute();
-
+	public void setUp() {
+		// resources.add(50l);
+		timestamps = new long[ScalabilityTestExample.REQUESTS];
+		count = 0;
+		resources.add(Math.round(Math.random() * 100l
+				* (Integer) (params.get("a"))));
+		System.out.println("######### new iteration ##############");
 	}
 
-	@Test
-	public void shouldExecuteWithoutError() throws Exception {
-		execute();
+	@Override
+	public void tearDown() {
+		for (int i = 1; i < ScalabilityTestExample.REQUESTS; i++)
+			System.out.println(timestamps[i] - timestamps[i - 1]);
 	}
 
 }
https://github.com/choreos/choreos_v-v/raw/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Ftest%2Fjava%2Feu%2Fchoreos%2Fvv%2Fexample%2FScalabilityTestExample.java
fb6f38b572a537a444c6aae685385124db045ed6
modified
https://github.com/choreos/choreos_v-v/blob/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Ftest%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FLoadGeneratorTest.java
https://api.github.com/repos/choreos/choreos_v-v/contents/scalability_explorer%2Fsrc%2Ftest%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FLoadGeneratorTest.java?ref=06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e
scalability_explorer/src/test/java/eu/choreos/vv/loadgenerator/LoadGeneratorTest.java
import eu.choreos.vv.client.Client;

		LoadGenerator<Object, Object> loadGen = LoadGeneratorFactory
				.getInstance().create();
			loadGen.execute(TIMES_TO_RUN, new Client<Object, Object>() {
				@Override
				public Object request(Object param) {
				}
			});

		LoadGenerator<Object, Object> loadGen = LoadGeneratorFactory
				.getInstance().create();
		loadGen.setDelay(10000000);
		loadGen.execute(100, new Client<Object, Object>() {
		double duration = (endTime - startTime) / 1000d;
		assertEquals(1, duration, 0.1);
		LoadGenerator<Object, Object> loadGen = LoadGeneratorFactory
				.getInstance().create();
		loadGen.execute(10, new Client<Object, Object>() {
		assertEquals(1.2, duration, 0.1);
Object param
scalability_explorer/src/test/java/eu/choreos/vv/loadgenerator/LoadGeneratorTest.java
Object request(Object param)
import eu.choreos.vv.experiments.Experiment;
	
		LoadGenerator loadGen = LoadGeneratorFactory.getInstance().create();
		loadGen.execute(TIMES_TO_RUN, new Experiment<Object, Object>() {
			@Override
			public Object request(Object param) {
			}
			@Override
			protected List<String> getParameterLabels() {
				// TODO Auto-generated method stub
				return null;
			}
		});
	
		LoadGenerator loadGen = LoadGeneratorFactory.getInstance().create();
		loadGen.setDelay(1000000);
		loadGen.execute(100, new Experiment<Object, Object>() {
			@Override
			protected List<String> getParameterLabels() {
				// TODO Auto-generated method stub
				return null;
			}
		double duration = (endTime - startTime)/1000d;
		assertEquals(0.1, duration, 0.05);
		LoadGenerator loadGen = LoadGeneratorFactory.getInstance().create();
		loadGen.execute(10, new Experiment<Object, Object>() {
			@Override
			protected List<String> getParameterLabels() {
				// TODO Auto-generated method stub
				return null;
			}


		assertEquals(1.1, duration, 0.01);
Object param
scalability_explorer/src/test/java/eu/choreos/vv/loadgenerator/LoadGeneratorTest.java
Object request(Object param)
@@ -7,44 +7,41 @@
 
 import org.junit.Test;
 
-import eu.choreos.vv.experiments.Experiment;
+import eu.choreos.vv.client.Client;
 
 public class LoadGeneratorTest {
-	
+
 	@Test
 	public void shouldRunManyTimes() {
 		final int DELAY = 10000000;
 		final int TIMES_TO_RUN = 1000;
 		final List<Long> times = new ArrayList<Long>();
-		LoadGenerator loadGen = LoadGeneratorFactory.getInstance().create();
+		LoadGenerator<Object, Object> loadGen = LoadGeneratorFactory
+				.getInstance().create();
 		loadGen.setDelay(DELAY);
 		try {
-		loadGen.execute(TIMES_TO_RUN, new Experiment<Object, Object>() {
+			loadGen.execute(TIMES_TO_RUN, new Client<Object, Object>() {
 
-			@Override
-			public Object request(Object param) {
+				@Override
+				public Object request(Object param) {
 					times.add(System.currentTimeMillis());
 					return null;
-			}
+				}
 
-			@Override
-			protected List<String> getParameterLabels() {
-				// TODO Auto-generated method stub
-				return null;
-			}
-		});
+			});
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
 		assertEquals(TIMES_TO_RUN, times.size());
 	}
-	
+
 	@Test
 	public void sholdRunForOneSecond() throws Exception {
-		LoadGenerator loadGen = LoadGeneratorFactory.getInstance().create();
-		loadGen.setDelay(1000000);
+		LoadGenerator<Object, Object> loadGen = LoadGeneratorFactory
+				.getInstance().create();
+		loadGen.setDelay(10000000);
 		long startTime = System.currentTimeMillis();
-		loadGen.execute(100, new Experiment<Object, Object>() {
+		loadGen.execute(100, new Client<Object, Object>() {
 
 			@Override
 			public Object request(Object param) {
@@ -57,23 +54,19 @@ public Object request(Object param) {
 				return null;
 			}
 
-			@Override
-			protected List<String> getParameterLabels() {
-				// TODO Auto-generated method stub
-				return null;
-			}
 		});
 		long endTime = System.currentTimeMillis();
-		double duration = (endTime - startTime)/1000d;
-		assertEquals(0.1, duration, 0.05);
+		double duration = (endTime - startTime) / 1000d;
+		assertEquals(1, duration, 0.1);
 	}
 
 	@Test
 	public void executionShouldTakeLongerThanDelay() throws Exception {
-		LoadGenerator loadGen = LoadGeneratorFactory.getInstance().create();
+		LoadGenerator<Object, Object> loadGen = LoadGeneratorFactory
+				.getInstance().create();
 		loadGen.setDelay(100000000);
 		long startTime = System.currentTimeMillis();
-		loadGen.execute(10, new Experiment<Object, Object>() {
+		loadGen.execute(10, new Client<Object, Object>() {
 
 			@Override
 			public Object request(Object param) {
@@ -86,17 +79,10 @@ public Object request(Object param) {
 				return null;
 			}
 
-			@Override
-			protected List<String> getParameterLabels() {
-				// TODO Auto-generated method stub
-				return null;
-			}
-
-
 		});
 		long endTime = System.currentTimeMillis();
 		double duration = (endTime - startTime) / 1000d;
-		assertEquals(1.1, duration, 0.01);
+		assertEquals(1.2, duration, 0.1);
 	}
 
 }
\ No newline at end of file
https://github.com/choreos/choreos_v-v/raw/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Ftest%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FLoadGeneratorTest.java
c66d08faaa67a4eb90b5b70cbd57697362bace03
modified
https://github.com/choreos/choreos_v-v/blob/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Ftest%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FTraceDrivenTest.java
https://api.github.com/repos/choreos/choreos_v-v/contents/scalability_explorer%2Fsrc%2Ftest%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FTraceDrivenTest.java?ref=06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e
scalability_explorer/src/test/java/eu/choreos/vv/loadgenerator/TraceDrivenTest.java
import eu.choreos.vv.client.Client;
		LoadGenerator<Object, Object> loadGen = LoadGeneratorFactory.getInstance().create();
				new Client<Object, Object>() {

		assertEquals(times.get(1)/10000000f, 10f, 0.2);
import eu.choreos.vv.experiments.Experiment;
		LoadGenerator loadGen = LoadGeneratorFactory.getInstance().create();
				new Experiment<Object, Object>() {
					@Override
					protected List<String> getParameterLabels() {
						// TODO Auto-generated method stub
						return null;
					}
		assertEquals(times.get(1)/10000000f, 10f, 0.1);
@@ -10,8 +10,8 @@
 
 import org.junit.Test;
 
+import eu.choreos.vv.client.Client;
 import eu.choreos.vv.data.ReportData;
-import eu.choreos.vv.experiments.Experiment;
 import eu.choreos.vv.loadgenerator.strategy.LoadGenerationStrategy;
 import eu.choreos.vv.loadgenerator.strategy.TraceDrivenLoad;
 
@@ -24,11 +24,11 @@ public void test() throws Exception {
 		BufferedReader in = new BufferedReader(reader);
 		LoadGenerationStrategy strategy = new TraceDrivenLoad(in);
 		LoadGeneratorFactory.getInstance().setStrategy(strategy);
-		LoadGenerator loadGen = LoadGeneratorFactory.getInstance().create();
+		LoadGenerator<Object, Object> loadGen = LoadGeneratorFactory.getInstance().create();
 		final List<Long> times = new ArrayList<Long>();
 
 		ReportData report = loadGen.execute(6,
-				new Experiment<Object, Object>() {
+				new Client<Object, Object>() {
 
 					long ant, now = System.nanoTime();
 
@@ -42,14 +42,10 @@ public Object request(Object param) {
 						return times;
 					}
 
-					@Override
-					protected List<String> getParameterLabels() {
-						// TODO Auto-generated method stub
-						return null;
-					}
+
 				});
 
-		assertEquals(times.get(1)/10000000f, 10f, 0.1);
+		assertEquals(times.get(1)/10000000f, 10f, 0.2);
 		assertEquals(times.get(2)/10000000f, 10f, 0.1);
 		assertEquals(times.get(3)/10000000f, 2f, 0.1);
 		assertEquals(times.get(4)/10000000f, 45.9f, 0.1);
https://github.com/choreos/choreos_v-v/raw/06fe82da71dd6d2f9b52b9d0fc12bf6acd6cca0e/scalability_explorer%2Fsrc%2Ftest%2Fjava%2Feu%2Fchoreos%2Fvv%2Floadgenerator%2FTraceDrivenTest.java
2fe63ffcb53add17c226bc524b524f1fe24e3e59
modified
choreos$choreos_v-v
Client client
this.client = client;
void
void setClient(Client client)
loadGen = LoadGeneratorFactory.getInstance().<K, T> create();
void
void newLoadGenerator()