Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Running Query Analyzer in a Cortex Development Environment

Running Query Analyzer in a Cortex Development Environment

  1. Update the MAVEN_OPTS system variable:
    • For Windows, open command prompt and run the following:
      set MAVEN_OPTS=%MAVEN_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6969
       -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
    • For Linux, start a terminal and run the following:
      export MAVEN_OPTS="$MAVEN_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6969 
      -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
    This enables remote JMX connections, so that you can connect to the application through JMX and configure logging as required. Use the mvnDebug command to enable debugging
  2. Run Cortex in the same terminal.
  3. Navigate to the extensions/cortex/ext-cortex-webapp module and run the following command:
    mvn tomcat8:run-war
  4. Execute a request in Cortex Studio to prime caches.
  5. Start the Query Analyzer using the Felix Console.
  6. Execute the request in Cortex Studio again.
  7. Stop the Query Analyzer using the Felix Console.
  8. To view query statistics, open {$user_home}/ep/db_statistics.json.

    Use an online JSON viewer, such as http://jsoneditoronline.org/, or install a JSON viewer in your IDE to view the results.