private void doThroughputPostWithNoQueryResults(boolean interleaveQueries, URI factoryUri) throws Throwable { // Create a query which will match no documents. This code path is designed to simulate // the cost of queries on the index without incurring the cost of processing results. QueryTask queryTask = QueryTask.Builder.createDirectTask() .setQuery(Query.Builder.create() .addFieldClause(ExampleServiceState.FIELD_NAME_ID, "saffsdfs") .build()) .build(); queryTask.indexLink = this.indexLink; doThroughputPost(interleaveQueries, factoryUri, null, queryTask); }
private void doThroughputPostWithNoQueryResults(boolean interleaveQueries, URI factoryUri) throws Throwable { // Create a query which will match no documents. This code path is designed to simulate // the cost of queries on the index without incurring the cost of processing results. QueryTask queryTask = QueryTask.Builder.createDirectTask() .setQuery(Query.Builder.create() .addFieldClause(ExampleServiceState.FIELD_NAME_ID, "saffsdfs") .build()) .build(); queryTask.indexLink = this.indexLink; doThroughputPost(interleaveQueries, factoryUri, null, queryTask); }
@Test public void implicitQueryResultLimit() throws Throwable { try { LuceneDocumentIndexService.setImplicitQueryResultLimit((int) (this.serviceCount / 2)); setUpHost(false); URI factoryUri = UriUtils.buildUri(this.host, ExampleService.FACTORY_LINK); doThroughputPost(false, factoryUri, null, null); // a GET to the factory is a query without a result limit explicitly set. Since we // created 2x the documents of the new, low, implicit result limit, we expect failure TestRequestSender sender = this.host.getTestRequestSender(); sender.sendAndWaitFailure(Operation.createGet(factoryUri)); } finally { LuceneDocumentIndexService.setImplicitQueryResultLimit( LuceneDocumentIndexService.DEFAULT_QUERY_RESULT_LIMIT); } }
@Test public void implicitQueryResultLimit() throws Throwable { try { LuceneDocumentIndexService.setImplicitQueryResultLimit((int) (this.serviceCount / 2)); setUpHost(false); URI factoryUri = UriUtils.buildUri(this.host, ExampleService.FACTORY_LINK); doThroughputPost(false, factoryUri, null, null); // a GET to the factory is a query without a result limit explicitly set. Since we // created 2x the documents of the new, low, implicit result limit, we expect failure TestRequestSender sender = this.host.getTestRequestSender(); sender.sendAndWaitFailure(Operation.createGet(factoryUri)); } finally { LuceneDocumentIndexService.setImplicitQueryResultLimit( LuceneDocumentIndexService.DEFAULT_QUERY_RESULT_LIMIT); } }
do { this.host.log("Starting POST test to %s, count:%d", factoryUri, this.serviceCount); doThroughputPost(true, factoryUri, expirationMicros, queryTask); Map<String, ServiceStat> stats = this.host.getServiceStats( this.host.getDocumentIndexServiceUri());
do { this.host.log("Starting POST test to %s, count:%d", factoryUri, this.serviceCount); doThroughputPost(true, factoryUri, expirationMicros, queryTask); Map<String, ServiceStat> stats = this.host.getServiceStats( this.host.getDocumentIndexServiceUri());