int doSetGen(int iter, Query q) throws Exception { SolrQueryRequest req = lrf.makeRequest(); SolrIndexSearcher searcher = req.getSearcher(); long start = System.currentTimeMillis(); int ret = 0; for (int i = 0; i < iter; i++) { DocSet set = searcher.getDocSetNC(q, null); ret += set.size(); } long end = System.currentTimeMillis(); System.out.println( "ret=" + ret + " time=" + (end - start) + " throughput=" + iter * 1000 / (end - start + 1)); req.close(); assertTrue(ret > 0); // make sure we did some work return ret; }