This documentation is for WSO2 Governance Registry 5.2.0. View documentation for the latest release.
Skip to end of metadata
Go to start of metadata

JProfiler and JMeter Tools are used to perform load tests for WSO2 Governance Registry.

To configure JProfiler in Non GUI mode:

After creating a JProfiler session, it is necessary to create triggers to get the snapshots saved from time to time. These snapshots can be analyzed after completing the tests. Use the following steps to add a trigger in JProfiler. Please note that you have to be using JProfiler7, which is the latest version currently available.

  1. In the Session Settings window, go to Triggers Settings.
  2. Click the Add Trigger button. The Create Trigger dialog box appears.
  3. Choose Timer as the Tigger Type and click the Next button.
  4. There you can configure the timer. The timer intervals are defined as 2 minutes. 
  5. Click the Next button.
  6. You can define the action in the screen that displays. Click on Add Action button and choose Save Snapshot
  7. Click the Ok button to proceed.
  8. Enter the snapshot file name and select the “add a unique number to the snapshot file name” checkbox.
  9. Then you can finish the Trigger Wizard.
  10. After completing the JProfiler Session settings, open the .JProfiler7/config.xml file and find the relevant Session ID.
  11. If you are using remote profiling, copy the local .JProfiler7/config.xml file into the remote .profiler7 folder.

After setting the above configurations, add the following line into the file: 


Once the server is started, the snapshot file is stored under server home.


If you are unable to use JProfiler, you can use Jmap to measure the heap size. The following command can be used to save the heap dump:

jmap -dump:live,format=b,file=heap.bin <pid> heap.hprof

To deploy load test service:

  1. Download the load test project and build it [].
  2. Place the load test JAR file into the <GREG_HOME>/repository/components/dropins folder.
  3. Once the Governance Registry server is started, the LoadTestServcie is deployed.
  4. Using the deployed LoadTestServcie we can perform the following operations: 
    1. addServices
    2. listService
    3. findService

Database size measuring script:

Once a relevant number of services are deployed into the database, the database size can be measured using the following script. 

Note that this script is for MySQL database.

SELECT table_schema "DB Name", Round(Sum(data_length + index_length) / 1024 / 1024, 3) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;

Load Test Steps:

  1. Start the Governance Registry server instance.
  2. Add the following number of services: 10,50,100, 500,1000, 3000, 5000, 10000 into the Governance Registry instance using JMeter script (G-Reg Load Test - Pre.jmx) [].
  3. Reduce the indexing start time to 60 seconds and keep the system idle for 7 minutes after adding the services.

Test 1:

Complete the following tests and measure the execution time (execution time print in the console).

  • Database Size
  • Add service execution Time
  • Time to list all artifacts
  • Time to find specific artifact( first 3 tests search 9th position and other test searches 99th position)
  • Using Heap dumps measure the heap usage.

Test 2:

For different number of services, change the client concurrency level using the JMeter script and measure the response time for “Search specific service” as mentioned above and analyze the memory using a memory snapshot.


  • All calculations can be made using Excel and min, max and average values can be calculated using inbuilt functions
  • All graphs are made using ChatGo website.
  • No labels