public static void printSummary() throws Exception {
    CacheUtils.log("Printing summary");

    if (printCntr == 1) {
      // file = new FileOutputStream("c:\\QueryPerfLog.txt");
      Date date = new Date(System.currentTimeMillis());
      file = new FileOutputStream("./QueryPerfLog-" + (date.toGMTString()
          .substring(0, date.toGMTString().indexOf("200") + 4).replace(' ', '-')) + ".txt");
      wr = new BufferedWriter(new OutputStreamWriter(file));

      wr.write("===========================================================================");
      wr.newLine();
      wr.write("====================QUERY PERFORMANCE REPORT===============================");
      wr.newLine();
      wr.flush();
      wr.write("Percentages of indices are as follows: ");
      wr.newLine();
      wr.write("countryName: 20% objects");
      wr.newLine();
      wr.write("stateName: 33.33% objects");
      wr.newLine();
      wr.write("districtName: 20% objects");
      wr.newLine();
      wr.write("cityName: 50% objects");
      wr.newLine();
      wr.write("villageName: No index");
      wr.newLine();
      wr.newLine();
      wr.flush();

      wr.write("Timings are the average of times for execution of query " + QUERY_EXECUTED
          + " number of times");
      wr.newLine();
      wr.newLine();
      wr.write("===========================================================================");
    }



    wr.newLine();
    wr.newLine();
    wr.write("Printing details for query no: " + printCntr);
    wr.newLine();
    wr.newLine();


    Set set0 = queriesMap.keySet();
    Iterator itr0 = set0.iterator();

    /*
     * Set set1 = withoutIndexTimeRegion.keySet(); Iterator itr1 = set1.iterator();
     *
     * Set set2 = withIndexTimeRegion.keySet(); Iterator itr2 = set2.iterator();
     *
     * Set set3 = indexNameRegion.keySet(); Iterator itr3 = set3.iterator();
     *
     * Set set4 = withoutIndexResultSetSize.keySet(); Iterator itr4 = set4.iterator();
     *
     * Set set5 = withIndexResultSetSize.keySet(); Iterator itr5 = set5.iterator();
     */
    Integer it;
    while (itr0.hasNext()) {
      wr.write("Printing details for query no: " + printCntr);
      wr.newLine();
      wr.newLine();
      it = (Integer) itr0.next();
      Query q1 = (Query) queriesMap.get(it);
      wr.write("Query string is: ");
      wr.newLine();
      wr.write(q1.getQueryString());
      wr.newLine();
      wr.newLine();

      wr.write("Time taken without index is: " + withoutIndexTimeRegion.get(it));
      wr.newLine();
      wr.newLine();

      // Query q2 = (Query) itr2.next();
      wr.write("Time taken with index is: " + withIndexTimeRegion.get(it));
      wr.newLine();
      wr.newLine();

      wr.write("Size of result set without index is: " + withoutIndexResultSetSize.get(it));
      wr.newLine();
      wr.newLine();
      wr.write("Size of result set with index is: " + withIndexResultSetSize.get(it));
      wr.newLine();
      wr.newLine();

      wr.write("Indices used are: ");
      wr.newLine();
      wr.newLine();

      ArrayList al = (ArrayList) indexNameRegion.get(it);

      if (al.size() == 0) {
        wr.write("No indices are getting used in this query");
        wr.newLine();
        wr.newLine();
      } else {
        for (final Object o : al) {
          wr.write(o.toString());
          wr.newLine();
        }
      }

      printCntr++;
      wr.write("===========================================================================");
      wr.newLine();
      wr.newLine();
      wr.flush();
    }

    wr.write("===========================================================================");
    wr.flush();

  }
Get the performance of Range query in an AND junction.
geode-core/src/performanceTest/java/org/apache/geode/cache/query/BaseLineAndCompareQueryPerfJUnitTest.java