Skip to content
eostermueller edited this page Dec 5, 2015 · 85 revisions

Step 1: Install and Run

  1. Download wuqiSpank-0.08.jar to your machine, assuming myserver.com

  2. THIS REQUIRES JAVA 1.7. Launch wuqiSpank web app by running
    java -jar wuqiSpank-0.08.jar. This prompt/shell will appear to 'hang' -- it must remain open/running.

  3. On any machine you want, Test wuqiSpank by hitting this URL in your favorite browser: http://myserver.com:8080/wuqiSpank .

  4. Nothing much to see, right? Read on to Step 2 to feed SQL to wuqiSpank.

Step 2: Feeding SQL to wuqiSpank

If your SQL is not from a Java application use [Text File Import](Text File Import).

Otherwise, wuqiSpank can capture/trace SQL statements from your JDBC app using the following instructions. For simplicity, these instructions assume that your JDBC app and the wuqiSpank you started above are on the exact same machine, myserver.com.

  1. Download intrace-agent.jar to myserver.com.

  2. If you downloaded intrace-agent.jar to c:\mypath, add the following JVM parameter to the Java JDBC web app to be traced:

    -javaagent:c:\mypath\intrace-agent.jar=[gzip-true[exit-stack-trace-true
    
  3. Make sure the app you want to trace uses one of the five supported JDBC drivers.

  4. Exercise your JDBC web application, so wuqiSpank has some SQL to review.

  5. View the SQL Sequence Diagrams at http://myserver.com:8080/wuqiSpank. You must refresh your browser to see newly captured traces.

Step 3: SQL Performance

After you finish the above instructions, wuqiSpank will show you SQL Sequence Diagrams, like this. The following shows how to graph response time and throughput metrics for all SQL executed in your applications, like this.

To simplify this doc, instructions assume that all four of the main components will all run on the same machine, using default port numbers. Theses four components are: the wuqiSpank web application, your SUT (system under test), InfluxDB and Grafana

This doc shows how to deploy these components on separate machines and change port numbers, in case you have a conflict.

  1. Install InfluxDB. Default port number: 8086.

  2. Install Grafana. Default port number: 3000.

  3. This Grafana dashboard knows how to display response time & throughput data from the SQL metrics that wuqiSpank writes to InfluxDB.

Step 4: Table Classification Meeting

wuqiSpank colors the background of certain tables to help developers remember the special needs of that kind of table. So before working with wuqiSpank, developers (and perhaps a DBA) should meet to decided these two things.

  1. Which tables should be cached because their data seldom changes? This page details how to flag these 'static' tables as blue.

  2. Which tables are the most likely to grow large in production? This page details how to flag these 'growth' tables as red. Developers should take extra care to minimize these queries to the largest tables. Perhaps the largest 10% of all tables should be included in this list.

Configure

Be sure to check out wuqiSpank's Commonly Used Configuration.