I did run it in a loop of 10…Previously I made a mistake of putting the startTime outside of the loop and that’s the reason it was giving incorrect results.
Here is the output and time looks ok now …
********** START TIME: 1527136210231
N1qlMetrics: N1qlMetrics{resultCount=10, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=970, elapsedTime='280.0137ms', executionTime='276.0142ms'}
********** END TIME: 1527136210832
********** Time taken: 601
[{"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_100"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10001"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10002"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10003"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10004"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10005"}}]
********** START TIME: 1527136210835
N1qlMetrics: N1qlMetrics{resultCount=10, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=970, elapsedTime='10.0006ms', executionTime='10.0006ms'}
********** END TIME: 1527136210856
********** Time taken: 21
[{"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_100"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10001"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10002"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10003"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10004"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10005"}}]
********** START TIME: 1527136210856
N1qlMetrics: N1qlMetrics{resultCount=10, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=970, elapsedTime='6.9989ms', executionTime='6.9989ms'}
********** END TIME: 1527136210873
********** Time taken: 17
[{"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_100"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10001"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10002"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10003"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10004"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10005"}}]
********** START TIME: 1527136210874
N1qlMetrics: N1qlMetrics{resultCount=10, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=970, elapsedTime='5.9986ms', executionTime='5.9986ms'}
********** END TIME: 1527136210889
********** Time taken: 15
[{"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_100"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10001"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10002"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10003"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10004"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10005"}}]
********** START TIME: 1527136210891
N1qlMetrics: N1qlMetrics{resultCount=10, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=970, elapsedTime='5.9932ms', executionTime='5.9932ms'}
********** END TIME: 1527136210905
********** Time taken: 14
[{"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_100"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10001"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10002"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10003"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10004"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10005"}}]
********** START TIME: 1527136210906
N1qlMetrics: N1qlMetrics{resultCount=10, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=970, elapsedTime='4.9993ms', executionTime='4.9993ms'}
********** END TIME: 1527136210923
********** Time taken: 17
[{"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_100"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10001"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10002"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10003"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10004"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10005"}}]
********** START TIME: 1527136210925
N1qlMetrics: N1qlMetrics{resultCount=10, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=970, elapsedTime='5.9986ms', executionTime='5.9986ms'}
********** END TIME: 1527136210952
********** Time taken: 27
[{"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_100"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10001"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10002"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10003"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10004"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10005"}}]
********** START TIME: 1527136210953
N1qlMetrics: N1qlMetrics{resultCount=10, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=970, elapsedTime='9.9987ms', executionTime='9.9987ms'}
********** END TIME: 1527136210972
********** Time taken: 19
[{"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_100"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10001"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10002"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10003"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10004"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10005"}}]
********** START TIME: 1527136210974
N1qlMetrics: N1qlMetrics{resultCount=10, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=970, elapsedTime='4.9998ms', executionTime='4.9998ms'}
********** END TIME: 1527136210989
********** Time taken: 15
[{"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_100"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10001"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10002"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10003"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10004"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10005"}}]
********** START TIME: 1527136210990
N1qlMetrics: N1qlMetrics{resultCount=10, errorCount=0, warningCount=0, mutationCount=0, sortCount=0, resultSize=970, elapsedTime='6.0001ms', executionTime='6.0001ms'}
********** END TIME: 1527136211005
********** Time taken: 15
[{"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_100"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_1000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10000"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10001"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10002"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10003"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10004"}}, {"pmc":{"javaClass":"com.test.gpc.api.vo.Product","glbl_holder_prod_id":"glblHolderProdId_10005"}}]