[FABAN-23] Calculation of sleep times should use long arithmetic Created: 20/Jun/14  Updated: 20/Jun/14

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Scott Oaks Assignee: jamesxcheng
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Specifying a rampup/steady/rampdown value > 2147482 will yield an exception like this:
java.lang.IllegalArgumentException: timeout value is negative
at java.lang.Thread.sleep(Native Method)
at com.sun.faban.driver.engine.MasterImpl.executeRaun(MasterImpl.java:705)
...

Those values are stored as ints, but when they are multiplied by 1000 for ms passed to the sleep, the values can overflow. The value passed to sleep should be calculated as a long:

Thread.sleep(runInfo.stdyState * 1000L);



 Comments   
Comment by jamesxcheng [ 20/Jun/14 ]

Reproduced the problem with 2147484 or larger.

% fhb -W 1000 -r 2147484/60/30 -c 25 http://localhost:80/
...
java.lang.IllegalArgumentException: timeout value is negative
at java.lang.Thread.sleep(Native Method)
at com.sun.faban.driver.engine.MasterImpl.executeRun(MasterImpl.java:697)





[FABAN-22] Add accept-encoding processing to fhb Created: 28/Apr/14  Updated: 21/Jun/14

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Scott Oaks Assignee: jamesxcheng
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It would be quite useful for fhb to be able to set different accept-encoding headers – e.g. to measure compressed vs. uncompressed output (I used that feature in Java Performance Tuning). Ditto to fhb to report the 95th% and 99th% response times.



 Comments   
Comment by Scott Oaks [ 28/Apr/14 ]
diff --git a/driver/resources/driver_template b/driver/resources/driver_template
index 5450ebf..516f7aa 100755
--- a/driver/resources/driver_template
+++ b/driver/resources/driver_template
@@ -1,5 +1,7 @@
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.logging.Logger; // debug only
 
@@ -11,6 +13,7 @@ import com.sun.faban.driver.util.Random;
 
 @BenchmarkDriver (
  name  = "@BenchmarkDriverName@",
+ percentiles = { "90th", "95th", "99th" },
  threadPerScale = 1 
 )
 
@@ -22,6 +25,7 @@ private HttpTransport httpTransport;
 private DriverContext ctx;
 private Random random;
 private ContentSizeStats contentStats = null;
+private Map<String,String> headers = new HashMap<String,String>();
 
 public @DriverClassName@(){
      HttpTransport.setProvider("@ProviderClass@");
@@ -30,6 +34,7 @@ public @DriverClassName@(){
      random = ctx.getRandom();
      contentStats = new ContentSizeStats(ctx.getOperationCount());
      ctx.attachMetrics(contentStats);
+     headers.put("Accept-Language", "en-us,en;q=0.5");
 }
 
 private static String doEncode(String s) {
@@ -65,8 +70,9 @@ public void @operationName@() throws Exception{
 	try{
             String url = @url@;
 	 	@doKbps@
+		@doHeaders@
 	    @doTiming@
-            int bytesRead = httpTransport.readURL(url@postRequest@);
+            int bytesRead = httpTransport.readURL(url@postRequest@, headers);
             //System.out.println("url:"+url);
 
 	    @doTiming@
diff --git a/driver/src/com/sun/faban/driver/engine/RunInfo.java b/driver/src/com/sun/faban/driver/engine/RunInfo.java
index 4a81a2b..6dcb2f8 100644
--- a/driver/src/com/sun/faban/driver/engine/RunInfo.java
+++ b/driver/src/com/sun/faban/driver/engine/RunInfo.java
@@ -472,6 +472,7 @@ public class RunInfo implements Serializable {
             String url;
             String data;
             String kbps = "-1";
+	    String headers = "";
 
             abstract String getURL(int opNum);
 
@@ -493,12 +494,16 @@ public class RunInfo implements Serializable {
                 return "httpTransport.setDownloadSpeed(" + kbps + ");\n";
             }
 
+	    String getHeaders(int opNum) {
+		return headers;
+	    }
+
             abstract String getPostRequest(int opNum) throws Exception;
 
             abstract String getStatics(int opNum) throws Exception;
 
             public void init(boolean doSubst, boolean isBinary,
-                    String url, String data, String kbps) {
+                    String url, String data, String kbps, String accpt) {
                 this.doSubst = doSubst;
                 this.isBinary = isBinary;
                 this.url = url;
@@ -506,6 +511,13 @@ public class RunInfo implements Serializable {
                 if (kbps != null && !"".equals(kbps)) {
                     this.kbps = kbps;
                 }
+		if (accept != null && accept.length() > 0) {
+		    StringBuilder sb = new StringBuilder();
+		    sb.append("headers.put(\"Accept-Encoding", \"");
+		    sb.append(accept);
+		    sb.append("\"");
+		    this.headers = sb.toString();
+		}
             }
 
             @SuppressWarnings("cast")
@@ -771,6 +783,7 @@ public class RunInfo implements Serializable {
                 String url = xp.evaluate("fd:url", operationNode);
                 String max90th = xp.evaluate("fd:max90th", operationNode);
                 String kbps = xp.evaluate("fd:kbps", operationNode);
+		String accept = xp.evaluate("fd:accept", operationNode);
 
                 String requestString = "";
 
@@ -844,13 +857,15 @@ public class RunInfo implements Serializable {
                 } else {
                     rid = new RunInfoGetDefinition();
                 }
-                rid.init(doSubst, isBinary, url, requestString, kbps);
+                rid.init(doSubst, isBinary, url, requestString, kbps, accept);
 
                 //Create the benchmark Operation annotation
                 StringBuilder bmop = new StringBuilder(
                         "@BenchmarkOperation(name = \"").append(operationName);
-                bmop.append("\", max90th=").append(max90th).append(
-                        ", ");
+                bmop.append("\", percentileLimits={ ").
+		     append(max90th).append(", ").
+		     append(max90th).append(", ").
+		     append(max90th).append("}, ");
                 if (provider == TransportProvider.SUN
                         && url.startsWith("https")) {
                     bmop.append("timing = com.sun.faban.driver.Timing.MANUAL");
@@ -876,6 +891,8 @@ public class RunInfo implements Serializable {
                 opTemplateClone = opTemplateClone.replaceAll(
                         "@doKbps@", rid.getKbps(i));
                 opTemplateClone = opTemplateClone.replaceAll(
+                        "@doHeaders@", rid.getHeaders(i));
+                opTemplateClone = opTemplateClone.replaceAll(
                         "@doTiming@", rid.doTiming(i, provider));
 
                 operations.append(opTemplateClone);
diff --git a/driver/src/com/sun/faban/driver/util/FabanHTTPBench.java b/driver/src/com/sun/faban/driver/util/FabanHTTPBench.java
index 5400572..286db3c 100644
--- a/driver/src/com/sun/faban/driver/util/FabanHTTPBench.java
+++ b/driver/src/com/sun/faban/driver/util/FabanHTTPBench.java
@@ -27,8 +27,10 @@ import com.sun.faban.driver.engine.RunInfo;
 import com.sun.faban.driver.ConfigurationException;
 import com.sun.faban.common.TextTable;
 import com.sun.faban.common.ParamReader;
+import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
@@ -97,6 +99,7 @@ public class FabanHTTPBench {
     private static boolean save = false;
     private static boolean substitute = false;
     private static String kbps = "-1";
+    private static String accept = null;
     private static boolean isBinary = false;
     private static String thinkTime = "0";
     private static final int CYCLE_DEVIATION = 1;
@@ -231,6 +234,12 @@ public class FabanHTTPBench {
 		tmp.setPrefix("");
 		tmp.appendChild(doc.createTextNode(kbps));
 		op.appendChild(tmp);
+	if (accept != null) { 
+            tmp = doc.createElementNS(RunInfo.DRIVERURI, "accept");
+            tmp.setPrefix("");
+            tmp.appendChild(doc.createTextNode(accept));
+            op.appendChild(tmp);
+        }
         if (postRequest) {
             tmp = doc.createElementNS(RunInfo.DRIVERURI, "post");
             tmp.setAttributeNS(null, "binary", Boolean.toString(isBinary));
@@ -382,30 +391,38 @@ public class FabanHTTPBench {
         if (txCount <= 1) {
             System.out.println("avg. time: " + getValue(doc, "avg"));
             System.out.println("max time: " + getValue(doc, "max"));
-            String p90th = getValue(doc, "p90th");
-            System.out.println("90th %: " + p90th);
-            if (p90th.startsWith(">") || Double.parseDouble(p90th) > ninetyPct)
-                System.out.println("ERROR: Missed target 90% of " + ninetyPct);
+            String percentile = getValue(doc, "percentile", "nth", "90");
+            System.out.println("90th %: " + percentile);
+            if (percentile.startsWith(">") || Double.parseDouble(percentile) > ninetyPct)
+                 System.out.println("ERROR: Missed target 90% of " + ninetyPct);
+	    percentile = getValue(doc, "percentile", "nth", "95");
+   	    System.out.println("95th %: " + percentile);
+	    percentile = getValue(doc, "percentile", "nth", "99");
+	    System.out.println("99th %: " + percentile);
         } else {
-            TextTable table = new TextTable(txCount, 5);
+            TextTable table = new TextTable(txCount, 7);
             table.setHeader(0, "Response Times");
             table.setHeader(1, "Avg");
             table.setHeader(2, "Max");
             table.setHeader(3, "90th%");
-            table.setHeader(4, "");
+            table.setHeader(4, "95th%");
+            table.setHeader(5, "99th%");
+            table.setHeader(6, "");
 
             for (int i = 0; i < txCount; i++) {
                 Node opNode = nodeList.item(i);
                 table.setField(i, 0, xPath.evaluate("@name", opNode));
                 table.setField(i, 1, xPath.evaluate("avg", opNode));
                 table.setField(i, 2, xPath.evaluate("max", opNode));
-                table.setField(i, 3, xPath.evaluate("p90th", opNode));
+                table.setField(i, 3, getValue(opNode, "percentile", "nth", "90"));
+                table.setField(i, 4, getValue(opNode, "percentile", "nth", "95"));
+                table.setField(i, 5, getValue(opNode, "percentile", "nth", "99"));
                 boolean passed = Boolean.parseBoolean(
                                     xPath.evaluate("passed", opNode));
                 if (passed)
-                    table.setField(i, 4, "PASSED");
+                    table.setField(i, 6, "PASSED");
                 else
-                    table.setField(i, 4, "FAILED");
+                    table.setField(i, 6, "FAILED");
             }
             table.format(System.out);
         }
@@ -441,6 +458,24 @@ public class FabanHTTPBench {
                 item(0).getNodeValue().trim();
     }
 
+    private static String getValue(Node node, String s, String attr, String value) {
+	NodeList nl = node.getChildNodes();
+        for (int i = 0; i < nl.getLength(); i++) {
+            Node n = nl.item(i);
+            NamedNodeMap nnm = n.getAttributes();
+		if (nnm == null) {
+		    continue;
+		}
+            for (int j = 0; j < nnm.getLength(); j++) {
+                Attr a = (Attr) nnm.item(j);
+                if (a.getName().equals(attr) && a.getValue().equals(value)) {
+                    return n.getChildNodes().item(0).getNodeValue().trim();
+                }
+            }
+        }
+        return null;
+    }
+
     private static void cleanUp() {
         if (save) {
             System.out.println("Saving output from run in " + outputDirectory);
@@ -516,6 +551,9 @@ public class FabanHTTPBench {
                 case 'V':
                     System.out.println("Faban cd: Version 0.1");
                     System.exit(0);
+		case 'z':
+		    accept = args[++i];
+		    break;
                 case 'h':
                 default:
                     usage();
@@ -582,6 +620,7 @@ public class FabanHTTPBench {
                                                 "query string or POST data");
         System.err.println("\t-K Set speed of sockets to in kilobytes/sec");
         System.err.println("\t-k NOTE : Keep alive is always on");
+        System.err.println("\t-z mime-type : Include the given mime-type(s) in the accept-encoding headers");
         System.exit(-1);
     }
 }
Comment by jamesxcheng [ 20/Jun/14 ]

Hi Scott,

I got a couple of questions on the patch:

1. Since the -z option is about compressed/uncompressed output, should the "accept"
shown below be "accept-encoding" instead?

@@ -231,6 +234,12 @@ public class FabanHTTPBench {
tmp.setPrefix("");
tmp.appendChild(doc.createTextNode(kbps));
op.appendChild(tmp);
+ if (accept != null) {
+ tmp = doc.createElementNS(RunInfo.DRIVERURI, "accept");

2. Always got an exception after the following change, because percentile was null:

@@ -382,30 +391,38 @@ public class FabanHTTPBench {
if (txCount <= 1) {
System.out.println("avg. time: " + getValue(doc, "avg"));
System.out.println("max time: " + getValue(doc, "max"));

  • String p90th = getValue(doc, "p90th");
  • System.out.println("90th %: " + p90th);
  • if (p90th.startsWith(">") || Double.parseDouble(p90th) > ninetyPct)
  • System.out.println("ERROR: Missed target 90% of " + ninetyPct);
    + String percentile = getValue(doc, "percentile", "nth", "90");

The following appeared to fix the problem. Is it good?

+ Node opNode = nodeList.item(0);
+ String percentile = getValue(opNode, "percentile", "nth", "90");

Thanks,
-James

Comment by Scott Oaks [ 21/Jun/14 ]

Hi James –

1) The "accept" there is the token that will appear in the run.xml file, so it can be anything arbitrary. But if that changes, then you have to change line 796 in RunInfo.java which parses the run.xml so that those are in sync. I would just keep it as it is (and on line 530 there, you'll see the Accept-Encoding hear is what is set.

2) I definitely did not need that, and I wonder if that fails for you then do the 95th and 99th also get a null return (or did you also pass opCode to the getValue() method for those)? I may have messed up the patch there...but if you send me the final FabanHTTPBench file, I can test it as well.





[FABAN-21] vmstat report doesn't exclude the first entry from calculation Created: 10/May/12  Updated: 10/May/12

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: khandker Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

all



 Description   

When summarizing the CPU statistics based on vmstat output, the first line needs to be excluded because this line is the average since the machine was booted.






[FABAN-20] master/bin/startup.sh has incorrect faban.war path Created: 08/Dec/11  Updated: 14/Dec/11  Resolved: 14/Dec/11

Status: Resolved
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: zhenyun Assignee: yaominchen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris 11


Tags: faban, master, startup

 Description   

After deploying faban-kit.jar, the entire faban directory is created.
Under ~faban/master/bin there is startup.sh, which is used to start the faban master.
Running startup.sh, it complains that faban.war is not found.

root@pae-madrid-01:~# faban/master/bin/startup.sh
Starting Faban Server
java.io.FileNotFoundException: ../webapps/faban.war (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:128)
at java.io.FileInputStream.<init>(FileInputStream.java:87)
at sun.tools.jar.Main.run(Main.java:259)
at sun.tools.jar.Main.main(Main.java:1177)
Please point your browser to http://pae-madrid-01:9980/

The cause is that startup.sh has an incorrect faban.war path (../webapps/faban.war), it should be changed to ../faban.war.



 Comments   
Comment by yaominchen [ 14/Dec/11 ]

Followed the steps in http://java.net/projects/faban/forums/faban-developers-forum/topics/30992-How-to-build-Faban-with-NetBeans to build faban-kit-121311.tar.gz. Unzip and untar the file to create the faban directory. The faban.war file is indeed under master/webapps.

~/www/nightly/faban/master/webapps$ ls
balancer faban.war fenxi.war ROOT

So it is the startup.sh issue.

  1. Since Faban uses root context, make sure it is unjarred before startup
    cd "$PRGDIR"/../webapps --> we are already inside webapps
  1. Avoid version conflicts - re-unjar faban.war before each start.
    rm -rf faban fenxi xanadu xanadu.war
    mkdir faban
    cd faban
    $JAVA_HOME/bin/jar xf ../webapps/faban.war --> the last parameter should be changed to ../faban.war

commit a259cb594f89ccef771fca49a24314abf5aa0763
faban-kit-121411.tar.gz





[FABAN-19] Change instructions for starting distributed driver. Classpath correction. Created: 24/Oct/11  Updated: 21/Nov/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: whitingjr Assignee: yaominchen
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

None.


Tags: documentation

 Description   

The instructions for starting the distributed driver in the "Faban Driver Framework Developers Guide" section 6 provide the wrong classpath.

The classpath is set to fabandriver.jar.

This needs to be changed to fabancommon.jar which contains the file RegistryImpl.class.






[FABAN-18] fhb will not run unless kbps is specified Created: 16/Sep/11  Updated: 23/Sep/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Scott Oaks Assignee: sheetalpatil
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If you attempt to run fhb with a simple template (e.g., the one in the documentation), it will not run. Because the template does not specify a kbps, you get this exception:

SEVERE: Master terminated with errors.
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:470)
at java.lang.Integer.parseInt(Integer.java:499)
at com.sun.faban.driver.engine.RunInfo$ConfigurationReader$RunInfoDefinition.getKbps(RunInfo.java:489)
at com.sun.faban.driver.engine.RunInfo$ConfigurationReader.createDefinition(RunInfo.java:875)
at com.sun.faban.driver.engine.RunInfo$ConfigurationReader.<init>(RunInfo.java:378)

This is because the RunInfoDefinition has been instantiated with a default kbps string of "". The class tests to see if the string is null, and rejects that; but it needs also to reject an empty string. Line 505 of RunInfo needs to be:

if (kbps != null && !kbps.equals("")) {






[FABAN-17] FlatSequenceMix should be configurabe from run.xml Created: 02/Sep/11  Updated: 23/Sep/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Scott Oaks Assignee: sheetalpatil
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File faban.diff    

 Description   

The FlatSequenceMix should be configurable from run.xml the same way that the flat mix is.

This is slightly more than Flat Mix – the individual sequences of the FlatSequenceMix do not presently have names. However, we can add a name annotation there (as long as it has a default), and then configure the individual sequences like this:

<flatSequenceMix>
<name>MyFirstSequence</name>
<ratio>10</ratio>
</flatSeqeuenceMix>
<flatSequenceMix>
<name>MySecondSequence</name>
<ratio>10</ratio>
</flatSequenceMix>
...

Patch attached.






[FABAN-16] The 90th percentile response time may be larger than max response time Created: 25/May/11  Updated: 25/May/11  Due: 29/Jul/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: yaominchen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris



 Description   

Sometimes 90th% response time is actually larger than max response time.

Here is the screen shot:
Response Times (milliseconds)
Type Avg Max SD 90th% 90th% limit 99th% 99.9th% Pass/Fail
MyOperation1 1.654 204.635 0.820 > 495.000 100.000 > 495.000 > 495.000 FAILED
MyOperation2 1.654 223.379 0.830 > 495.000 100.000 > 495.000 > 495.000 FAILED
MyOperation3 1.654 204.428 0.829 > 495.000 100.000 > 495.000 > 495.000 FAILED






[FABAN-15] Enable Operation Matrix in the xform generation Created: 24/May/11  Updated: 24/May/11  Due: 30/Jun/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: yaominchen Assignee: sheetalpatil
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris



 Description   

We need support in faban kit that helps override the operation mix through GUI.

The format to be used in the run.xml file is,
<operationMix name="1">
<name>MyOperation1</name>
<r name="1">0</r>
<r name="2">70</r>
<r name="3">30</r>
</operationMix>
<operationMix name="2">
<name>MyOperation2</name>
<r name="1">60</r>
<r name="2">0</r>
<r name="3">40</r>
</operationMix>
<operationMix name="3">
<name>MyOperation3</name>
<r name="1">50</r>
<r name="2">50</r>
<r name="3">0</r>
</operationMix>






[FABAN-14] vmstat Null exception Created: 21/May/11  Updated: 13/Jun/11  Due: 30/Jun/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: yaominchen Assignee: yaominchen
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux


Attachments: JPEG File vmstat-bug-1.jpg     JPEG File vmstat-bug-2.jpg    
Tags: Faban, vmstat

 Description   

When vmstat result is not available, run log shows exception (see attachments).



 Comments   
Comment by yaominchen [ 13/Jun/11 ]

Yi suggested this may be due to the racing condition introduced by @AgentFinal implementation, as it did not happen before the change.





[FABAN-13] Incorrect pre-run delay when parallel thread start is set true Created: 15/May/11  Updated: 17/May/11  Due: 31/May/11  Resolved: 17/May/11

Status: Resolved
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yaominchen Assignee: yaominchen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris 11, JDK 1.6.0_24


Tags: annotation, faban, preprocessing

 Description   

In config.xml, enable parallel thread start <fd:parallel>true</fd:parallel>. Configure number of agents equal to scale (the number of threads). This causes close to infinite long delay before Faban to invoke run() method of driver. In fact, the workload never got to run.

SPECSIPASDriverAgent[0].0: Delay set to 1,302,273,336,957,175,537 nanosecs.

And the following exception would be triggered.

SPECSIPASDriverAgent[0].0: Sleep interrupted. Run terminating.

By contrast, if scale is greater than the number agent, the delay amount is reasonable.

SPECSIPASDriverAgent[0].0: Delay set to 2,998,212,082 nanosecs.

Or if scale equals to the number of agent, but parallel thread start is set to false,

<fd:threadStart>
<fd:delay>1000</fd:delay>
<fd:simultaneous>true</fd:simultaneous>
<fd:parallel>false</fd:parallel>
</fd:threadStart>

the delay amount is right.

SPECSIPASDriverAgent[0].0: Delay set to 2,999,708,046 nanosecs.



 Comments   
Comment by yaominchen [ 17/May/11 ]

commit 734ec744c66fac4c53442b2f08e1c16188930797
Author: Super-User <root@swu4200-3.(none)>
Date: Tue May 17 01:18:40 2011 -0700

Basically, parallel thread start only makes sense when there are more than one thread in an agent. We fix the bug by checking the number of threads associated with an agent. If the number is one, we fold back to the code path without parallel thread start.





[FABAN-12] Need a way to retrieve binary data Created: 29/Apr/11  Updated: 29/Apr/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Scott Oaks Assignee: yaominchen
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

For some benchmarks, it is useful to get the binary data back from the server, something like this:

byte[] buf = new byte[8192];
int nBytes = httpTransport.readURL(url, buf);

which would place the first 8192 bytes of the response into the provided buffer (and return the number of bytes, which could of course be <8192). The benchmark writer would be responsible for the buffer management in this case, including providing a large enough buffer for the data – which may not sound ideal, but is common in load generators like LoadRunner.






[FABAN-11] Driver fails under JDK 7 Created: 29/Apr/11  Updated: 23/Apr/14  Resolved: 23/Apr/14

Status: Closed
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Scott Oaks Assignee: jamesxcheng
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: faban, master, startup

 Description   

Running a driver with JDK 7 yields this error:
java.lang.NoSuchMethodError: sun.net.www.http.KeepAliveCache.get(Ljava/net/URL;Ljava/lang/Object;)Ljava/lang/Object;
at com.sun.faban.driver.transport.sunhttp.HttpClient.New(HttpClient.java:87)
at com.sun.faban.driver.transport.sunhttp.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:99)
at com.sun.faban.driver.transport.sunhttp.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:41)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:928)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:846)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1296)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at com.sun.faban.driver.transport.sunhttp.SunHttpTransport.readURL(SunHttpTransport.java:177)
at com.sun.faban.driver.transport.sunhttp.SunHttpTransport.readURL(SunHttpTransport.java:191)
at com.sun.faban.driver.transport.sunhttp.SunHttpTransport.readURL(SunHttpTransport.java:217)
at com.sun.faban.driver.HttpTransport.readURL(HttpTransport.java:190)

This is the peril of using unsupported classes...though the Sun Transport is still lighter weight than the Apache Transport.



 Comments   
Comment by Scott Oaks [ 16/Apr/14 ]

Here is a patch for the issue.

diff --git a/driver/src/com/sun/faban/driver/transport/sunhttp/HttpClient.java b/driver/src/com/sun/faban/driver/transport/sunhttp/HttpClient.java
index 7245a3b..38ad0a6 100644
— a/driver/src/com/sun/faban/driver/transport/sunhttp/HttpClient.java
+++ b/driver/src/com/sun/faban/driver/transport/sunhttp/HttpClient.java
@@ -24,6 +24,7 @@
package com.sun.faban.driver.transport.sunhttp;

import java.io.IOException;
+import java.lang.reflect.Method;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.Socket;
@@ -44,8 +45,14 @@ import java.security.PrivilegedAction;
*/
public class HttpClient extends sun.net.www.http.HttpClient {

+ private static Method getMethod;
static {
kac = new KeepAliveCache();
+ try {
+ getMethod = kac.getClass().getMethod("get", new Class[]

{ URL.class, Object.class }

);
+ } catch (NoSuchMethodException nsme)

{ + throw new ExceptionInInitializerError(nsme); + }

}
/** Superclass' inCache is private. Needed to define and check usage. */
protected boolean inCache;
@@ -86,7 +93,11 @@ public class HttpClient extends sun.net.www.http.HttpClient {
HttpClient ret = null;
/* see if one's already around */
if (useCache) {

  • ret = (HttpClient) kac.get(url, null);
    + try
    Unknown macro: {+ ret = (HttpClient) getMethod.invoke(kac, new Object[]{url, null});+ }

    catch (Exception iae)

    { + throw new IOException("Can't invoke on KeepAliveCache", iae); + }

    if (ret != null) {
    if ((ret.proxy != null && ret.proxy.equals(p))

    (ret.proxy == null && p == null)) {
Comment by yaominchen [ 22/Apr/14 ]

James worked on JDK8 as well. In addition to applying the patch from Scott, he had to make the following
change.

diff --git a/stage/master/bin/startup.sh b/stage/master/bin/startup.sh
index 3df8378..be635ba 100755
— a/stage/master/bin/startup.sh
+++ b/stage/master/bin/startup.sh
@@ -25,6 +25,7 @@ case $JAVA_VERSION in
1.5*);;
1.6*);;
1.7*);;
+ 1.8*);;
*) echo "Java version is $

{JAVA_VERSION}

. Faban needs 1.5 or later." >&2
echo "Please install the appropriate JDK and set JAVA_HOME accordingly." >&2
exit 1;;

He was able to run the web101 benchmark with Faban and different versions
of JDKs to verify the patch. He will check in the code shortly.

Comment by jamesxcheng [ 23/Apr/14 ]

The patch from Scott Oaks has been applied to faban~source.
A new build, faban-kit-042214.tar.gz, is available for download.

Comment by yaominchen [ 23/Apr/14 ]

Patch has been checked in, and updated Faban kit is available for download.





[FABAN-10] Faban should allow override of cycle times via run.xml Created: 29/Apr/11  Updated: 09/Dec/11  Resolved: 21/May/11

Status: Closed
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Scott Oaks Assignee: sheetalpatil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: GZip Archive faban.diff.gz    
Tags: faban, master

 Description   

Cycle times for benchmark operations are presently set through code annotations. We should have the ability to override those annotations with data in the run.xml file, the same way that the operationMix can be overridden for the Mix class.

The attached patch is a proposed implementation.



 Comments   
Comment by yaominchen [ 21/May/11 ]

Code has been checked in.

Project: faban
Repository: source
Revision: f19c873667f5b4a1a0ac8f913c1b173428a474d2
Author: sheetalpatil
Date: 2011-05-20 19:09:07 UTC
Link:

Log Message:
------------
FABAN-10 :Faban should allow override of cycle times via run.xml
USAGE:
In the run.xml file, in the <driverConfig> block, you need to add,
<cycleDistribution name="1">
<classname>FixedTime</classname>
<operationNames>MyOperation1, MyOperation2</operationNames>
<cycleType>ThinkTIME</cycleType>
<cycleTime>100</cycleTime>
<cycleDeviation>0</cycleDeviation>
</cycleDistribution>
For multiple cycleDistribution,
<cycleDistribution name="1">
<classname>FixedTime</classname>
<operationNames>MyOperation1</operationNames>
<cycleType>CycleTime</cycleType>
<cycleTime>100</cycleTime>
<cycleDeviation>0</cycleDeviation>
</cycleDistribution>
<cycleDistribution name="2">
<classname>NegativeExponential</classname>
<operationNames>MyOperation2</operationNames>
<cycleType>ThinkTIME</cycleType>
<cycleMean>500</cycleMean>
<cycleDeviation>0</cycleDeviation>
</cycleDistribution>
Merge branch 'master' of ssh://git.java.net/faban~source
Conflicts:
driver/src/com/sun/faban/driver/engine/AgentImpl.java
driver/src/com/sun/faban/driver/engine/RunInfo.java
driver/src/com/sun/faban/driver/util/Timer.java

Revisions:
----------
8281ab1d0636e936acc8bbe0f76544cc08cc20b9
f19c873667f5b4a1a0ac8f913c1b173428a474d2

Comment by yaominchen [ 09/Dec/11 ]

Fixed by code change.





[FABAN-9] Error message when Java directories don't match Created: 25/Apr/11  Updated: 25/Apr/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: azeemj Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Any FABAN setup



 Description   

If the Java instances on the faban master, driver, database are not all in the same location then FABAN gives the following cryptic message:

06:19:19 WARNING Retry connecting to CmdAgent@jasdatabase, count 1.

Instead it should give a more useful message.






[FABAN-8] Master terminated with errors Created: 19/Apr/11  Updated: 21/Apr/11  Resolved: 21/Apr/11

Status: Resolved
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: hitesh.iitk Assignee: Unassigned
Resolution: Works as designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 10.10, Xen used for virtualization.



 Description   

When I schedule a run at faban master, I am receiving the following error in the logs. Host cloud-vm08 is the master. This is the first warning/error in the log. I am using Olio's driver for benchmarking.

<record>
<host>cloud-vm08</host>
<date>2011-04-19T20:03:21</date>
<millis>1303243401339</millis>
<sequence>0</sequence>
<logger>com.sun.faban.driver.engine.MasterImpl</logger>
<level>SEVERE</level>
<class>com.sun.faban.driver.engine.MasterImpl</class>
<method>main</method>
<thread>10</thread>
<message>Master terminated with errors.</message>
<exception>
<message>java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data found for annotation element public abstract float com.sun.faban.driver.BenchmarkDriver.threadPerScale() (Found data
<frame>
<class>sun.reflect.annotation.AnnotationTypeMismatchExceptionProxy</class>
<method>generateException</method>
<line>38</line>
</frame>
<frame>
<class>sun.reflect.annotation.AnnotationInvocationHandler</class>
<method>invoke</method>
<line>56</line>
</frame>
<frame>
<class>$Proxy5</class>
<method>threadPerScale</method>
</frame>
<frame>
<class>com.sun.faban.driver.engine.BenchmarkDefinition</class>
<method>read</method>
<line>162</line>
</frame>
<frame>
<class>com.sun.faban.driver.engine.MasterImpl</class>
<method>runBenchmark</method>
<line>185</line>
</frame>
<frame>
<class>com.sun.faban.driver.engine.MasterImpl</class>
<method>main</method>
<line>1567</line>
</frame>
</exception>
</record>



 Comments   
Comment by yaominchen [ 21/Apr/11 ]

threadPerScale was changed to float from int, in BenchmarkDriver.java in the latest faban versions. Please check the version of faban-kit and your benchmark code are consistent.





[FABAN-7]  Need @BenchmarkPostprocessing annotation Created: 05/Apr/11  Updated: 15/May/11  Due: 29/Apr/11  Resolved: 11/Apr/11

Status: Closed
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: yaominchen Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris and Linux


Tags: Faban, annotation, post-processing

 Description   

There are tasks commonly performed after the end of benchmark run, such as cleaning up temp files and resetting system resources, etc. It is good to have a post-processing annotation to cleanly separate out code related to post-processing.



 Comments   
Comment by yaominchen [ 11/Apr/11 ]

@OnceAfter annotation should be able to serve the purpose.

Comment by yaominchen [ 15/May/11 ]

While @OnceAfter is done at per-run (global) level. A new annotation @AgentFinal was implemented to support post-processing at the per-agent (local) level.

Comment by yaominchen [ 15/May/11 ]

Use per-run @OnceAfter and per-agent @AgentFinal annotations.





[FABAN-6] Need @BenchmarkPreprocessing annotation Created: 05/Apr/11  Updated: 15/May/11  Due: 29/Apr/11  Resolved: 11/Apr/11

Status: Closed
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: yaominchen Assignee: yaominchen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris and Linux


Tags: Faban, annotation, preprocessing

 Description   

There are tasks that are more suitable implemented in the pre-processing stage, such as variable and data initialization. It is good to have a annotation for pre-processing to have clean cut between run-time code and initialization code.



 Comments   
Comment by yaominchen [ 11/Apr/11 ]

@OnceBefore should be able to serve this purpose.

/**

  • Designates a method to be called only once, just before the start of the
  • benchmark run. It is always called from global thread 0 for the given driver.
  • No other thread will be started until this method finishes. Note that only
  • one method is allowed for the OnceBefore designation. If Faban finds more
  • than one method with the OnceBefore annotation, it will throw a
  • DefinitionException at startup.<p/>
    */
    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.METHOD)
    public @interface OnceBefore { // marker attribute }
Comment by yaominchen [ 15/May/11 ]

While @OnceBefore is done at per-run (global) level. A new annotation @AgentInit was implemented to support pre-processing at the per-agent (local) level.





[FABAN-5] Visual indicator for status of Faban Created: 14/Mar/11  Updated: 14/Mar/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: azeemj Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

A visual indicator of the status of Faban such as a Green/Yellow/Red light next to the "Pending Runs" text? Green means everything is good, Yellow means suspend, Red means not working.






[FABAN-4] Combine Suspend Pending Runs/Resume Pending Runs/View Pending runs Created: 14/Mar/11  Updated: 14/Mar/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: azeemj Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The "Suspend Pending Runs", "Resume Pending Runs" and "View Pending Runs" buttons can probably be combined into a single one. The Suspend one in particular is too close to "Schedule Run" which can mean accidental clicks and lots of headache

I would suggest "Pending Runs" and then have it display the current runs (so similar to View Pending Runs) but with two buttons for Suspend and Resume (or some toggle?)






[FABAN-3] Time should be visible in view results pane Created: 14/Mar/11  Updated: 14/Mar/11

Status: Open
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: azeemj Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In the "View Results" button, results table has "Date/Time" but only the Date is visible, with a hover that has both time and date. Both
should be visible in the field. The hover over already has the time, should be easy to add the time to the field as well.






[FABAN-2] FABAN UI - The "Help" button goes to an incorrect link Created: 14/Mar/11  Updated: 15/Mar/11  Due: 01/Apr/11  Resolved: 15/Mar/11

Status: Resolved
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yaominchen Assignee: yaominchen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris 10 on x86



 Description   

As described in the Summary, the Help button in the current UI points to the incorrect page faban.sunsource.net. It should be changed to faban.java.net.



 Comments   
Comment by yaominchen [ 15/Mar/11 ]

1. Created a download folder http://java.net/projects/faban/downloads/directory/1.0-docs
2. Uploaded javadocs.zip to http://java.net/projects/faban/downloads/directory/1.0-docs
3. Modified harness/web/menu.jsp to point Help menu to the new folder

Comment by yaominchen [ 15/Mar/11 ]

harness/web> git commit menu.jsp -m"Fix for issue FABAN-2: update link to Faban documentation"
[master fb4b8c9] Fix for issue FABAN-2: update link to Faban documentation
Committer: Super-User <root@swu4200-3.(none)>

harness/web> git push origin master
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 506 bytes, done.
Total 5 (delta 4), reused 0 (delta 0)
To ssh://yaominchen@git.java.net/faban~source
f8ded5d..fb4b8c9 master -> master





[FABAN-1] JAVA_HOME flag in the Faban UI is not propagated to drivers Created: 14/Mar/11  Updated: 09/Dec/11  Due: 01/Apr/11  Resolved: 09/Dec/11

Status: Closed
Project: faban
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: yaominchen Assignee: yaominchen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris 10 on x86


Tags: faban, startup

 Description   

>>> In the "Schedule Run" button, in the Java tab there are two text
>>> fields "JAVA HOME" and "JVM Options".
The JVM options flags propagate fine, JAVA_HOME doesn't seem to.



 Comments   
Comment by yaominchen [ 05/Dec/11 ]
  • On Faban master, if the UI's JAVA_HOME flag (such as /export/home/java) is a soft link, then it is first extracted to point to the physical folder (e.g. /export/home/jdk1.7) before it is sent to the faban agents on other clients.

There is inconsistency between two files related to the javaHome parameter. One file refers to it "fh:jvmConfig/fh:home" while the other file "fh:jvmConfig/fh:javaHome".

faban~source/harness/src/com/sun/faban/harness/engine/CmdService.java:

public boolean setup(String benchName, ParamRepository par) {

String home = par.getParameter("fh:jvmConfig/fh:home");

if (home != null)
home = home.trim();

if (home == null || home.length() == 0) {
home = Utilities.getJavaHome();
logger.log(Level.CONFIG, "JAVA_HOME set to

{0}", home);
}

if(!(new File(home)).isDirectory()) {
logger.log(Level.SEVERE, "Cannot set JAVA_HOME. {0}

is not a valid JAVA_HOME. Exiting", home);
return false;
}

javaHome = home;

~/faban/faban~source/common/src/com/sun/faban/common/ParamReader.java:

public class ParamReader {

static final Logger logger = Logger.getLogger(ParamReader.class.getName());

/** The base Faban namespace URI. */
public static final String FABANURI = "http://faban.sunsource.net/ns/faban";

/** List of xpaths and their prefixes. */
private static final String[][] PREFIX_TABLE = {

{ "jvmConfig", "fh" }

,

{ "jvmConfig/javaHome", "fh" }

,

{ "jvmConfig/jvmOptions", "fh" }

,

Comment by yaominchen [ 09/Dec/11 ]

Fixed by the 12/05/11 check in. A kit fanan-kit-120811 was built, verified and uploaded.

Comment by yaominchen [ 09/Dec/11 ]

Fixed by code change.





Generated at Wed Jun 03 12:41:56 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.