public void printCqQueryExecutionTime(VM server) {
    server.invoke(new CacheSerializableRunnable("printCqQueryExecutionTime") {
      @Override
      public void run2() throws CacheException {
        CqServiceImpl cqService = null;
        try {
          cqService =
              (CqServiceImpl) ((DefaultQueryService) getCache().getQueryService()).getCqService();
        } catch (Exception ex) {
          LogWriterUtils.getLogWriter().info("Failed to get the internal CqService.", ex);
          Assert.fail("Failed to get the internal CqService.", ex);
        }

        long timeTaken = cqService.getCqServiceVsdStats().getCqQueryExecutionTime();
        LogWriterUtils.getLogWriter().info("Total Time taken to Execute CQ Query :" + timeTaken);
        System.out.println("Total Time taken to Execute CQ Query :" + timeTaken);
      }
    });
  }
Performance test for Matching CQ optimization changes.
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java