adding timing stats. Added a simulated stress test to get idea of timing on how long a full scan would take with 10 SDKs
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/SBSv2QueryTests.java Tue May 11 15:47:50 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/SBSv2QueryTests.java Tue May 11 16:31:08 2010 -0500
@@ -51,6 +51,10 @@
private static HashMap<String, String> sbsAliasMap;
private long startTime;
+ private final String QUERY_PRODUCTS_COMMAND = "--query=products";
+ private final String QUERY_CONFIG_COMMAND = "--query=config";
+ private final String QUERY_COMMAND = "--query=aliases";
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -69,8 +73,6 @@
public void testQueryAliases() throws Exception {
- final String QUERY_COMMAND = "--query=aliases";
-
startTime = System.currentTimeMillis();
List<String> argList = new ArrayList<String>();
@@ -101,7 +103,6 @@
*/
public void testQueryConfigs() throws Exception {
- final String QUERY_CONFIG_COMMAND = "--query=config";
assertNotNull(sbsAliasMap);
startTime = System.currentTimeMillis();
@@ -129,7 +130,7 @@
* @throws Exception
*/
public void testQueryProductsFromSDKs() throws Exception {
- final String QUERY_PRODUCTS_COMMAND = "--query=products";
+
startTime = System.currentTimeMillis();
@@ -151,6 +152,40 @@
System.out.println("Time for testQueryProductsFromSDKs(): " + getTimingStats());
}
+ public void testStressQueryTest() throws Exception {
+
+ long stressTestStartTime = System.currentTimeMillis();
+
+
+ testQueryAliases();
+
+ testQueryConfigs();
+ testQueryConfigs();
+ testQueryConfigs();
+ testQueryConfigs();
+ testQueryConfigs();
+ testQueryConfigs();
+ testQueryConfigs();
+ testQueryConfigs();
+ testQueryConfigs();
+ testQueryConfigs();
+
+ testQueryProductsFromSDKs();
+ testQueryProductsFromSDKs();
+ testQueryProductsFromSDKs();
+ testQueryProductsFromSDKs();
+ testQueryProductsFromSDKs();
+ testQueryProductsFromSDKs();
+ testQueryProductsFromSDKs();
+ testQueryProductsFromSDKs();
+ testQueryProductsFromSDKs();
+ testQueryProductsFromSDKs();
+ testQueryProductsFromSDKs();
+
+ startTime = stressTestStartTime;
+ System.out.println("Time for testStressQueryTest(): " + getTimingStats());
+ }
+
private List<String> parseQueryProductsResults(String queryResult) {
List<String> productList = new ArrayList<String>();