	private void run() {
		String[] bgColors = { "#DDDDDD", "#EEEEEE" };
		String outFile = null;
		PrintStream ps = null;
		for (int s = 0; s < scenarios.length; s++) {
			ArrayList pointsOfInterest=new ArrayList();
			Scenario t = scenarios[s];
			Iterator iterator = this.pointsOfInterest.iterator();
			while (iterator.hasNext()){
				String match=getMostRecentMatchingBuildID(t,iterator.next().toString());
					if (match!=null)
						pointsOfInterest.add(match);
			}
			int []buildNameIndeces={-1,-1};
			buildNameIndeces[0]=Utils.getBuildNameIndex(t.getTimeSeriesLabels(),current);
			buildNameIndeces[1]=Utils.getBuildNameIndex(t.getTimeSeriesLabels(),reference);
			if (Utils.getBuildNameIndex(t.getTimeSeriesLabels(),current)==-1) {
				continue;
			} 
			String scenarioFileName=t.getScenarioName().replace('#', '.').replace(':', '_')
			.replace('\\', '_');
			outFile = resultsFolder
					+ "/"
					+ scenarioFileName + ".html";
			if (outFile != null) {
				try {
					new File(outFile).getParentFile().mkdirs();
					ps = new PrintStream(new BufferedOutputStream(
							new FileOutputStream(outFile)));
				} catch (FileNotFoundException e) {
					System.err.println("can't create output file" + outFile); 
				}
			}
			if (ps == null)
				ps = System.out;
			ps.println(Utils.HTML_OPEN);
			ps.println(Utils.HTML_DEFAULT_CSS);
			ps.println("<title>"+t.getScenarioName() + "("+configName+")"+"</title></head>"); 
			ps.println("<h4>Scenario: " + t.getScenarioName() + " ("+configName+")</h4><br>"); 
			ps.println("<b>Click measurement name to view line graph of measured values over builds. " +
					"Magenta, black and yellow dots are used to denote release or milestone, integration, and nightly builds, respectively.</b><br><br>");
			ps.println("<table border=\"1\">"); 
			Dim[] dimensions = filteredDimensions( t.getDimensions());
			try {
				ps.println("<tr><td>Build Id</td>"); 
				for (int i = 0; i < dimensions.length; i++) {
					Dim dim = dimensions[i];
					String dimName=dim.getName();
					ps.println("<td><a href=\"#"+ configName+"_"+scenarioFileName+"_"+ dimName +"\">" + dimName
							+ "</a></td>");
				}
				ps.print("</tr>\n");
				double [][] diffValues=new double [2][dimensions.length];
				boolean [] refValueExistance=new boolean[dimensions.length];
				for (int j = 0; j < 2; j++) {
					String referenceIndicator = (j == 1) ? "(reference)" : "";
					String buildName = ((buildNameIndeces[j] == -1) ? "n/a" : t
							.getTimeSeriesLabels()[buildNameIndeces[j]])
							+ referenceIndicator;
					ps.print("<tr><td>" + buildName + "</td>");
					for (int i = 0; i < dimensions.length; i++) {
						Dim dim = dimensions[i];
						String dimName=dim.getName();
						TimeSeries ts = t.getTimeSeries(dim);
						if (j==1&&buildNameIndeces[j]!=-1)
							refValueExistance[i]=true;
						if (buildNameIndeces[j] != -1)
							diffValues[j][i]=ts.getValue(buildNameIndeces[j]);
						String displayValue = (buildNameIndeces[j] == -1) ? "n/a"
								: dim.getDisplayValue(ts
										.getValue(buildNameIndeces[j]));
						String stddev = (buildNameIndeces[j] == -1) ? "0" : dim
								.getDisplayValue(ts
										.getStddev(buildNameIndeces[j]));
						if (stddev.startsWith("0 ") || stddev.equals("0"))
							ps.println("<td>" + displayValue + "</td>");
						else
							ps.println("<td>" + displayValue + " [" + stddev
									+ "]" + "</td>");
					}
					ps.print("</tr>");
				}
				ps.println(getDiffs(diffValues,dimensions,refValueExistance));
				ps.println();
				ps.println("</font></table>");
				ps.println("*Delta values in red and green indicate degradation > 10% and improvement > 10%,respectively.<br><br>");
				ps.println("<br><hr>\n");
				for (int i = 0; i < dimensions.length; i++) {
					Dim dim = dimensions[i];
					String dimName=dim.getName();
					LineGraph lg=Utils.getLineGraph(t,dim.getName(),reference,current,pointsOfInterest);
					String lgImg=resultsFolder+"/graphs/"+scenarioFileName+"_"+dimName+".gif";
					Utils.printLineGraphGif(lg,lgImg);
					ps.println("<br><br><a name=\""+configName+"_"+scenarioFileName+"_"+ dimName+"\"></a>");
					ps.println("<br><b>"+dimName+"</b><br>");
					ps.println(Utils.getDimensionDescription(dimName)+"<br><br>\n");
					ps.println(Utils.getImageMap(lg,"graphs/"+scenarioFileName+"_"+dimName+".gif"));
				}
				ps.println("<br><br></body>");
				ps.println(Utils.HTML_CLOSE); 
				if (ps != System.out)
					ps.close();
			} catch (AssertionFailedError e) {
				e.printStackTrace();
				continue;
			}
		}
	}

	private void run() {
		String[] bgColors = { "#DDDDDD", "#EEEEEE" };
		String outFile = null;
		PrintStream ps = null;
		for (int s = 0; s < scenarios.length; s++) {
			ArrayList pointsOfInterest=new ArrayList();
			Scenario t = scenarios[s];
			if (pointsOfInterest.size()!=0){
			Iterator iterator = this.pointsOfInterest.iterator();
				while (iterator.hasNext()) {
					String match = getMostRecentMatchingBuildID(t, iterator
							.next().toString());
					if (match != null)
						pointsOfInterest.add(match);
				}
			}
			int []buildNameIndeces={-1,-1};
			buildNameIndeces[0]=Utils.getBuildNameIndex(t.getTimeSeriesLabels(),current);
			buildNameIndeces[1]=Utils.getBuildNameIndex(t.getTimeSeriesLabels(),reference);
			if (Utils.getBuildNameIndex(t.getTimeSeriesLabels(),current)==-1) {
				continue;
			} 
			String scenarioFileName=t.getScenarioName().replace('#', '.').replace(':', '_')
			.replace('\\', '_');
			outFile = resultsFolder
					+ "/"
					+ scenarioFileName + ".html";
			if (outFile != null) {
				try {
					new File(outFile).getParentFile().mkdirs();
					ps = new PrintStream(new BufferedOutputStream(
							new FileOutputStream(outFile)));
				} catch (FileNotFoundException e) {
					System.err.println("can't create output file" + outFile); 
				}
			}
			if (ps == null)
				ps = System.out;
			ps.println(Utils.HTML_OPEN);
			ps.println(Utils.HTML_DEFAULT_CSS);
			ps.println("<title>"+t.getScenarioName() + "("+configName+")"+"</title></head>"); 
			ps.println("<h4>Scenario: " + t.getScenarioName() + " ("+configName+")</h4><br>"); 
			ps.println("<b>Click measurement name to view line graph of measured values over builds. " +
					"Magenta, black and yellow dots are used to denote release or milestone, integration, and nightly builds, respectively.</b><br><br>");
			ps.println("<table border=\"1\">"); 
			Dim[] dimensions = filteredDimensions( t.getDimensions());
			try {
				ps.println("<tr><td>Build Id</td>"); 
				for (int i = 0; i < dimensions.length; i++) {
					Dim dim = dimensions[i];
					String dimName=dim.getName();
					ps.println("<td><a href=\"#"+ configName+"_"+scenarioFileName+"_"+ dimName +"\">" + dimName
							+ "</a></td>");
				}
				ps.print("</tr>\n");
				double [][] diffValues=new double [2][dimensions.length];
				boolean [] refValueExistance=new boolean[dimensions.length];
				for (int j = 0; j < 2; j++) {
					String referenceIndicator = (j == 1) ? "(reference)" : "";
					String buildName = ((buildNameIndeces[j] == -1) ? "n/a" : t
							.getTimeSeriesLabels()[buildNameIndeces[j]])
							+ referenceIndicator;
					ps.print("<tr><td>" + buildName + "</td>");
					for (int i = 0; i < dimensions.length; i++) {
						Dim dim = dimensions[i];
						String dimName=dim.getName();
						TimeSeries ts = t.getTimeSeries(dim);
						if (j==1&&buildNameIndeces[j]!=-1)
							refValueExistance[i]=true;
						if (buildNameIndeces[j] != -1)
							diffValues[j][i]=ts.getValue(buildNameIndeces[j]);
						String displayValue = (buildNameIndeces[j] == -1) ? "n/a"
								: dim.getDisplayValue(ts
										.getValue(buildNameIndeces[j]));
						String stddev = (buildNameIndeces[j] == -1) ? "0" : dim
								.getDisplayValue(ts
										.getStddev(buildNameIndeces[j]));
						if (stddev.startsWith("0 ") || stddev.equals("0"))
							ps.println("<td>" + displayValue + "</td>");
						else
							ps.println("<td>" + displayValue + " [" + stddev
									+ "]" + "</td>");
					}
					ps.print("</tr>");
				}
				ps.println(getDiffs(diffValues,dimensions,refValueExistance));
				ps.println();
				ps.println("</font></table>");
				ps.println("*Delta values in red and green indicate degradation > 10% and improvement > 10%,respectively.<br><br>");
				ps.println("<br><hr>\n");
				for (int i = 0; i < dimensions.length; i++) {
					Dim dim = dimensions[i];
					String dimName=dim.getName();
					LineGraph lg=Utils.getLineGraph(t,dim.getName(),reference,current,pointsOfInterest);
					String lgImg=resultsFolder+"/graphs/"+scenarioFileName+"_"+dimName+".gif";
					Utils.printLineGraphGif(lg,lgImg);
					ps.println("<br><br><a name=\""+configName+"_"+scenarioFileName+"_"+ dimName+"\"></a>");
					ps.println("<br><b>"+dimName+"</b><br>");
					ps.println(Utils.getDimensionDescription(dimName)+"<br><br>\n");
					ps.println(Utils.getImageMap(lg,"graphs/"+scenarioFileName+"_"+dimName+".gif"));
				}
				ps.println("<br><br></body>");
				ps.println(Utils.HTML_CLOSE); 
				if (ps != System.out)
					ps.close();
			} catch (AssertionFailedError e) {
				e.printStackTrace();
				continue;
			}
		}
	}
