[jboss-cvs] JBossAS SVN: r109264 - in projects/jboss-jca/branches/performance: servers and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 10 23:19:45 EST 2010
Author: jeff.zhang
Date: 2010-11-10 23:19:45 -0500 (Wed, 10 Nov 2010)
New Revision: 109264
Modified:
projects/jboss-jca/branches/performance/apps/src/main/java/org/jboss/jca/performance/apps/ChartGraphics.java
projects/jboss-jca/branches/performance/apps/src/main/java/org/jboss/jca/performance/apps/CompareHtmlBenchmarkReport.java
projects/jboss-jca/branches/performance/servers/build.xml
Log:
[JBJCA-423] abq report for jca beta version and beautify chart
Modified: projects/jboss-jca/branches/performance/apps/src/main/java/org/jboss/jca/performance/apps/ChartGraphics.java
===================================================================
--- projects/jboss-jca/branches/performance/apps/src/main/java/org/jboss/jca/performance/apps/ChartGraphics.java 2010-11-11 03:33:23 UTC (rev 109263)
+++ projects/jboss-jca/branches/performance/apps/src/main/java/org/jboss/jca/performance/apps/ChartGraphics.java 2010-11-11 04:19:45 UTC (rev 109264)
@@ -32,7 +32,13 @@
public class ChartGraphics
{
- final static Color[] COLORS = {Color.red, Color.green, Color.blue, Color.yellow, Color.orange};
+ final static Color[] COLORS =
+ {Color.orange,
+ Color.pink,
+ new Color(0, 128, 0),
+ new Color(0, 191, 255),
+ new Color(0, 139, 139),
+ new Color(224, 255, 255)};
private BufferedImage image;
public void createImage(String fileLocation)
@@ -54,11 +60,11 @@
public void graphicsGeneration(int[][] data, String imageFile)
{
final int X = 20;
- int imageWidth = 950;
+ int imageWidth = 1050;
int imageHeight = 600;
int columnWidth = 10;
int columnHeight = 550;
- int groupDistance = 140;
+ int groupDistance = 160;
int barDistance = 5;
final int H = 50;
final int Y = 70;
@@ -67,6 +73,21 @@
Graphics2D graphics = (Graphics2D)this.image.getGraphics();
graphics.setColor(Color.white);
graphics.fillRect(0, 0, imageWidth, imageHeight);
+
+ graphics.setColor(Color.black);
+ graphics.drawLine(imageWidth - Y, H, imageWidth - Y, columnHeight);
+ for (int i = 0 ; i < CompareHtmlBenchmarkReport.units.length; i++)
+ {
+ if (i != CompareHtmlBenchmarkReport.units.length - 1)
+ {
+ graphics.setColor(Color.lightGray);
+ graphics.drawLine(X, columnHeight - i * 100,
+ imageWidth - Y + 2, columnHeight - i * 100);
+ }
+ graphics.setColor(Color.black);
+ graphics.drawString(CompareHtmlBenchmarkReport.units[i], imageWidth - Y + 2, columnHeight - i * 100);
+ }
+
for (int i = 0; i < data[0].length; i++)
{
graphics.setColor(COLORS[i]);
@@ -81,20 +102,15 @@
columnHeight - h, columnWidth, h, true);
}
graphics.fill3DRect(X, H + i * (columnWidth + barDistance), 100, columnWidth, true);
+ graphics.setColor(Color.black);
if (i < CompareHtmlBenchmarkReport.servers.length)
graphics.drawString(CompareHtmlBenchmarkReport.servers[i], X + 105, H + i * (columnWidth + barDistance) + 10);
else
- graphics.drawString(CompareHtmlBenchmarkReport.servers[CompareHtmlBenchmarkReport.servers.length - 1] + " with abq mcp",
+ graphics.drawString(CompareHtmlBenchmarkReport.servers[i - 4] + " with abq mcp",
X + 105, H + i * (columnWidth + barDistance) + 10);
}
+
- graphics.setColor(Color.black);
- graphics.drawLine(imageWidth - Y, H, imageWidth - Y, columnHeight);
- for (int i = 0 ; i < CompareHtmlBenchmarkReport.units.length; i++)
- {
- graphics.drawString(CompareHtmlBenchmarkReport.units[i], imageWidth - Y + 2, columnHeight - i * 100);
- }
-
this.createImage(imageFile);
}
}
Modified: projects/jboss-jca/branches/performance/apps/src/main/java/org/jboss/jca/performance/apps/CompareHtmlBenchmarkReport.java
===================================================================
--- projects/jboss-jca/branches/performance/apps/src/main/java/org/jboss/jca/performance/apps/CompareHtmlBenchmarkReport.java 2010-11-11 03:33:23 UTC (rev 109263)
+++ projects/jboss-jca/branches/performance/apps/src/main/java/org/jboss/jca/performance/apps/CompareHtmlBenchmarkReport.java 2010-11-11 04:19:45 UTC (rev 109264)
@@ -36,13 +36,13 @@
*/
public class CompareHtmlBenchmarkReport extends BenchmarkReport
{
- final static String[] servers = {"jbas-4.2.3.GA", "jbas-5.1.0.GA", "jbjca-1.0.0.Beta1", "jbjca-daily"};
+ final static String[] servers = {"jbas-4.2.3.GA", "jbas-5.1.0.GA", "jbjca-1.0.0.Beta3", "jbjca-daily"};
final static String[] units = {"1", "10", "100", "1000", "10000", "100000"};
final static String[] transactions = {"NoTransaction", "XATransaction"};
int[][] workManagerArray = new int[units.length * 2][servers.length];
int[][] workManagerBlockArray = new int[units.length * 2][servers.length];
- int[][] connectionArray = new int[units.length * 2][servers.length + 1]; // +1 for Abq MCP
+ int[][] connectionArray = new int[units.length * 2][servers.length + 2]; // +2 for Abq MCP of jbjca
String runNumber;
@@ -173,7 +173,7 @@
server = i;
}
if (part[1].equals("JBJCA_ABQ"))
- dataArray[unit * 2 + tran][server + 1] = Integer.parseInt(part[4]); //abq mcp
+ dataArray[unit * 2 + tran][server + 2] = Integer.parseInt(part[4]); //abq mcp
else
dataArray[unit * 2 + tran][server] = Integer.parseInt(part[4]);
}
@@ -294,8 +294,11 @@
}
if (isConn)
{
- fw.write("<td><a href=\"../../" + servers[servers.length - 1] + "/benchmark/" + this.runNumber + "/report.html\">" +
- servers[servers.length - 1] + "</a></td>");
+ for (int i = 0; i < servers.length - 2; i++)
+ {
+ fw.write("<td><a href=\"../../" + servers[servers.length - 2 + i] + "/benchmark/" + this.runNumber + "/report.html\">" +
+ servers[servers.length - 2 + i] + "</a> with ABQ</td>");
+ }
}
fw.write("</theader>");
writeEol(fw);
@@ -314,7 +317,7 @@
{
int serverCol;
if (isConn)
- serverCol = servers.length + 1;
+ serverCol = servers.length + 2;
else
serverCol = servers.length;
Modified: projects/jboss-jca/branches/performance/servers/build.xml
===================================================================
--- projects/jboss-jca/branches/performance/servers/build.xml 2010-11-11 03:33:23 UTC (rev 109263)
+++ projects/jboss-jca/branches/performance/servers/build.xml 2010-11-11 04:19:45 UTC (rev 109264)
@@ -813,6 +813,7 @@
<antcall target="doBenchmark-jbjca">
<param name="jbjca.kit" value="${ironjacamar.version}"/>
+ <param name="run.jbjca.d" value="true"/>
</antcall>
<antcall target="doBenchmark-jbas">
@@ -831,7 +832,7 @@
-->
</target>
- <target name="benchmark-daily" depends="os-check, exist-servers" if="exist.jca.d">
+ <target name="benchmark-daily" depends="os-check, exist-servers, copy-jbjca-daily">
<antcall target="doBenchmark-jbjca">
<param name="jbjca.kit" value="${ironjacamar.daily}"/>
<param name="run.jbjca.d" value="true"/>
More information about the jboss-cvs-commits
mailing list