# HG changeset patch # User timkelly # Date 1273613468 18000 # Node ID 40b1a30ba1cbd9df8bae34cace6ea278e0338606 # Parent 22abc3a66090b9eafadaf7565999f7285d46f2f3 adding timing stats. Added a simulated stress test to get idea of timing on how long a full scan would take with 10 SDKs diff -r 22abc3a66090 -r 40b1a30ba1cb builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/SBSv2QueryTests.java --- 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 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 argList = new ArrayList(); @@ -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 parseQueryProductsResults(String queryResult) { List productList = new ArrayList();