// Path: acmeair-reporter/src/main/java/com/acmeair/reporter/parser/IndividualChartResults.java
// public class IndividualChartResults {
// 	private ArrayList<Double> inputList = new ArrayList<Double>();
// 	private String title;
// 	private ArrayList<String> timeList = new ArrayList<String>();
// 	private int files = 0;
// 	
// 	public void setTitle(String title) {
// 		this.title = title;
// 	}
// 	public ArrayList<Double> getInputList() {
// 		return inputList;
// 	}
// 	public void setInputList(ArrayList<Double> inputList) {
// 		this.inputList = inputList;
// 	}
// 	public ArrayList<String> getTimeList() {
// 		return timeList;
// 	}
// 	public void setTimeList(ArrayList<String> timeList) {
// 		this.timeList = timeList;
// 	}
// 	
// 	public String getTitle() {
// 		return title;
// 	}
// 	
//     public void incrementFiles(){
//     	files++;
//     }
//     
//     public int getFilesCount(){
//     	return files;
//     }
// 	
// }
// 
// Path: acmeair-reporter/src/main/java/com/acmeair/reporter/parser/ResultParserHelper.java
// public class ResultParserHelper {
// 
// 	public static Color getColor(int i) {
// 		Color[] colors = { Color.RED, Color.BLACK, Color.BLUE, Color.YELLOW,
// 				Color.GREEN, Color.ORANGE, Color.PINK, Color.SILVER,
// 				Color.GOLD, Color.WHITE, Color.BROWN, Color.CYAN,Color.GRAY,Color.HONEYDEW,Color.IVORY };
// 		return colors[i % 15];
// 	}
// 
// 	public static <E> ArrayList<E> scaleDown(ArrayList<E> testList, int scaleDownFactor) {
// 		
// 		if (testList==null) {
// 			return null;
// 		}
// 		if (testList.size() <= 7)
// 			return testList;
// 		if (scaleDownFactor > 10 || scaleDownFactor < 0) {
// 			throw new RuntimeException(
// 					"currently only support factor from 0-10");
// 		}
// 		int listLastItemIndex = testList.size() - 1;
// 		int a = (int) java.lang.Math.pow(2, scaleDownFactor);
// 		if (a > listLastItemIndex) {
// 			return testList;
// 		}
// 		ArrayList<E> newList = new ArrayList<E>();
// 		newList.add(testList.get(0));
// 	
// 		if (scaleDownFactor == 0) {
// 			newList.add(testList.get(listLastItemIndex));
// 	
// 		} else {
// 	
// 			for (int m = 1; m <= a; m++) {
// 				newList.add(testList.get(listLastItemIndex * m / a));
// 			}
// 		}
// 		return newList;
// 	}
// 
// 	public static double[] scaleInputsData(ArrayList<Double> inputList,
// 			double scale_factor) {
// 		double[] inputs = new double[inputList.size()];
// 		for (int i = 0; i <= inputList.size() - 1; i++) {
// 			inputs[i] = inputList.get(i) * scale_factor;
// 		}
// 		return inputs;
// 	}
// }


import java.io.File;
import com.acmeair.reporter.parser.IndividualChartResults;
import com.acmeair.reporter.parser.ResultParser;
import com.acmeair.reporter.parser.ResultParserHelper;

/*******************************************************************************
* Copyright (c) 2013 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package com.acmeair.reporter.parser.component;



public class JmeterSummariserParser extends ResultParser {

	private static boolean SKIP_JMETER_DROPOUTS = false; 
	static {
		SKIP_JMETER_DROPOUTS = System.getProperty("SKIP_JMETER_DROPOUTS") != null;
	}
	
	private String jmeterFileName = "AcmeAir[1-9].log";	
	private String testDate = "";
	
	@Override
	protected void processFile(File file) {
		IndividualChartResults result= getData(file.getPath());		

// Path: acmeair-reporter/src/main/java/com/acmeair/reporter/parser/IndividualChartResults.java
// public class IndividualChartResults {
// 	private ArrayList<Double> inputList = new ArrayList<Double>();
// 	private String title;
// 	private ArrayList<String> timeList = new ArrayList<String>();
// 	private int files = 0;
// 	
// 	public void setTitle(String title) {
// 		this.title = title;
// 	}
// 	public ArrayList<Double> getInputList() {
// 		return inputList;
// 	}
// 	public void setInputList(ArrayList<Double> inputList) {
// 		this.inputList = inputList;
// 	}
// 	public ArrayList<String> getTimeList() {
// 		return timeList;
// 	}
// 	public void setTimeList(ArrayList<String> timeList) {
// 		this.timeList = timeList;
// 	}
// 	
// 	public String getTitle() {
// 		return title;
// 	}
// 	
//     public void incrementFiles(){
//     	files++;
//     }
//     
//     public int getFilesCount(){
//     	return files;
//     }
// 	
// }
// 
// Path: acmeair-reporter/src/main/java/com/acmeair/reporter/parser/ResultParserHelper.java
// public class ResultParserHelper {
// 
// 	public static Color getColor(int i) {
// 		Color[] colors = { Color.RED, Color.BLACK, Color.BLUE, Color.YELLOW,
// 				Color.GREEN, Color.ORANGE, Color.PINK, Color.SILVER,
// 				Color.GOLD, Color.WHITE, Color.BROWN, Color.CYAN,Color.GRAY,Color.HONEYDEW,Color.IVORY };
// 		return colors[i % 15];
// 	}
// 
// 	public static <E> ArrayList<E> scaleDown(ArrayList<E> testList, int scaleDownFactor) {
// 		
// 		if (testList==null) {
// 			return null;
// 		}
// 		if (testList.size() <= 7)
// 			return testList;
// 		if (scaleDownFactor > 10 || scaleDownFactor < 0) {
// 			throw new RuntimeException(
// 					"currently only support factor from 0-10");
// 		}
// 		int listLastItemIndex = testList.size() - 1;
// 		int a = (int) java.lang.Math.pow(2, scaleDownFactor);
// 		if (a > listLastItemIndex) {
// 			return testList;
// 		}
// 		ArrayList<E> newList = new ArrayList<E>();
// 		newList.add(testList.get(0));
// 	
// 		if (scaleDownFactor == 0) {
// 			newList.add(testList.get(listLastItemIndex));
// 	
// 		} else {
// 	
// 			for (int m = 1; m <= a; m++) {
// 				newList.add(testList.get(listLastItemIndex * m / a));
// 			}
// 		}
// 		return newList;
// 	}
// 
// 	public static double[] scaleInputsData(ArrayList<Double> inputList,
// 			double scale_factor) {
// 		double[] inputs = new double[inputList.size()];
// 		for (int i = 0; i <= inputList.size() - 1; i++) {
// 			inputs[i] = inputList.get(i) * scale_factor;
// 		}
// 		return inputs;
// 	}
// }


// Path: acmeair-reporter/src/main/java/com/acmeair/reporter/parser/component/JmeterSummariserParser.java
import java.io.File;
import com.acmeair.reporter.parser.IndividualChartResults;
import com.acmeair.reporter.parser.ResultParser;
import com.acmeair.reporter.parser.ResultParserHelper;

/*******************************************************************************
* Copyright (c) 2013 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package com.acmeair.reporter.parser.component;



public class JmeterSummariserParser extends ResultParser {

	private static boolean SKIP_JMETER_DROPOUTS = false; 
	static {
		SKIP_JMETER_DROPOUTS = System.getProperty("SKIP_JMETER_DROPOUTS") != null;
	}
	
	private String jmeterFileName = "AcmeAir[1-9].log";	
	private String testDate = "";
	
	@Override
	protected void processFile(File file) {
		IndividualChartResults result= getData(file.getPath());		

		super.processData(ResultParserHelper.scaleDown(result.getInputList(),8),false);
