{"id":13763247,"url":"https://github.com/wso2/performance-apim","last_synced_at":"2025-04-06T18:17:12.050Z","repository":{"id":23551217,"uuid":"93613025","full_name":"wso2/performance-apim","owner":"wso2","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-20T02:37:11.000Z","size":22629,"stargazers_count":46,"open_issues_count":1,"forks_count":40,"subscribers_count":121,"default_branch":"master","last_synced_at":"2025-03-30T17:09:33.143Z","etag":null,"topics":["api-management"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wso2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-07T08:45:47.000Z","updated_at":"2025-02-20T10:35:04.000Z","dependencies_parsed_at":"2024-01-15T04:10:20.853Z","dependency_job_id":"45bb883c-4c92-4f6d-b6e5-6cbde408a6b5","html_url":"https://github.com/wso2/performance-apim","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wso2%2Fperformance-apim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wso2%2Fperformance-apim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wso2%2Fperformance-apim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wso2%2Fperformance-apim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wso2","download_url":"https://codeload.github.com/wso2/performance-apim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526768,"owners_count":20953143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-management"],"created_at":"2024-08-03T15:00:39.018Z","updated_at":"2025-04-06T18:17:12.023Z","avatar_url":"https://github.com/wso2.png","language":"Shell","funding_links":[],"categories":["Performance"],"sub_categories":["Microgateway"],"readme":"# Artifacts for WSO2 API Manager and WSO2 API Microgateway Performance Tests\n\n---\n|  Branch | Build Status |\n| :------ |:------------ |\n| master  | [![Build Status](https://wso2.org/jenkins/buildStatus/icon?job=platform-builds/performance-apim)](https://wso2.org/jenkins/job/platform-builds/job/performance-apim/) |\n---\n\nThis repository has artifacts to be used for WSO2 API Manager Performance Tests.\n\nThe [distribution](distribution) directory has the scripts and the Maven project to build the final distribution package\n to be used for performance tests.\n\nThe package (**performance-apim-distribution-${version}.tar.gz**) built by the distribution maven module is the\n package required for API Manager performance tests from this repository.\n\nThe scripts in this repository depend on the scripts in\n \"[performance-common](https://github.com/wso2/performance-common/)\" repository.\n\n**Note:** The scripts are only compatible with **WSO2 API Manager 3.1.0**.\n\nFollowing is the recommended deployment for performance testing All-in-one WSO2 API Manager.\n\n![API Manager All-in-one Deployment](diagrams/APIM_Performance_Test_All_in_one_Deployment.jpg)\n\n## Package contents\n\nFollowing is the tree view of the contents inside distribution package.\n\n```console\nubuntu@server:~$ tree --charset=ascii | sed -e 's/[0-9]\\.[0-9]\\.[0-9].*\\.jar/${version}.jar/g'\n.\n|-- apim\n|   |-- apim-start.sh\n|   |-- conf\n|   |   |-- datasources\n|   |   |   `-- master-datasources.xml\n|   |   |-- registry.xml\n|   |   `-- user-mgt.xml\n|   |-- configure.sh\n|   |-- create-api.sh\n|   |-- generate-tokens.sh\n|   |-- micro-gw\n|   |   |-- create-micro-gw.sh\n|   |   |-- generate-jwt-tokens.sh\n|   |   |-- jwt-generator-${version}.jar\n|   |   |-- micro-gw-start.sh\n|   |   `-- wso2carbon.jks\n|   `-- sqls\n|       `-- create-databases.sql\n|-- cloudformation\n|   |-- cloudformation-common.sh\n|   |-- create-template.py\n|   |-- download-logs.sh\n|   |-- get-wum-updated-wso2-product.sh\n|   |-- python-requirements.txt\n|   |-- run-micro-gw-performance-tests.sh\n|   |-- run-performance-tests.sh\n|   `-- templates\n|       |-- apim_micro_gw_perf_test_cfn.yaml\n|       |-- apim_perf_test_cfn.yaml\n|       `-- common_perf_test_cfn.yaml\n|-- common\n|   `-- common.sh\n|-- java\n|   `-- install-java.sh\n|-- jmeter\n|   |-- apimchart.py\n|   |-- apim-test.jmx\n|   |-- create-charts.py\n|   |-- create-comparison-charts.py\n|   |-- create-summary-csv.sh\n|   |-- create-summary-markdown.py\n|   |-- csv-to-markdown-converter.py\n|   |-- install-jmeter.sh\n|   |-- jmeter-server-start.sh\n|   |-- perf-test-common.sh\n|   |-- run-micro-gw-performance-tests.sh\n|   |-- run-performance-tests.sh\n|   |-- templates\n|   |   `-- summary.md\n|   `-- user.properties\n|-- jtl-splitter\n|   |-- jtl-splitter-${version}.jar\n|   `-- jtl-splitter.sh\n|-- netty-service\n|   |-- netty-http-echo-service-${version}.jar\n|   `-- netty-start.sh\n|-- payloads\n|   |-- generate-payloads.sh\n|   `-- payload-generator-${version}.jar\n|-- sar\n|   `-- install-sar.sh\n`-- setup\n    |-- setup-apim-micro-gw.sh\n    |-- setup-apim.sh\n    |-- setup-common.sh\n    |-- setup-jmeter-client.sh\n    |-- setup-jmeter.sh\n    `-- setup-netty.sh\n\n16 directories, 52 files\n```\n\nEach directory has executable scripts.\n\nThis package must be extracted in user home directory of all JMeter nodes and the API Manager node used for the\n performance tests.\n\n**Note:** These scripts will work only on Debian based systems like Ubuntu.\n\nSee following sections for more details.\n\n## Running performance tests on AWS\n\nThe performance tests can be run on AWS\n\n### Testing WSO2 API Manager Gateway\n\nUse `cloudformation/run-performance-tests.sh` to run performance tests on WSO2 API Manager Gateway.\n\n```console\nubuntu@server:~$ ./cloudformation/run-performance-tests.sh -h\n\nUsage: \n./cloudformation/run-performance-tests.sh -f \u003cperformance_scripts_distribution\u003e [-d \u003cresults_dir\u003e] -k \u003ckey_file\u003e -n \u003ckey_name\u003e\n   -j \u003cjmeter_distribution\u003e -o \u003coracle_jdk_distribution\u003e -g \u003cgcviewer_jar_path\u003e\n   -s \u003cstack_name_prefix\u003e -b \u003cs3_bucket_name\u003e -r \u003cs3_bucket_region\u003e\n   -J \u003cjmeter_client_ec2_instance_type\u003e -S \u003cjmeter_server_ec2_instance_type\u003e\n   -N \u003cnetty_ec2_instance_type\u003e \n   -a \u003cwso2am_distribution\u003e -c \u003cmysql_connector_jar\u003e -A \u003cwso2am_ec2_instance_type\u003e -D \u003cwso2am_rds_db_instance_class\u003e\n   [-t \u003cnumber_of_stacks\u003e] [-p \u003cparallel_parameter_option\u003e] [-w \u003cminimum_stack_creation_wait_time\u003e]\n   [-h] -- [run_performance_tests_options]\n\n-f: Distribution containing the scripts to run performance tests.\n-d: The results directory. Default value is a directory with current time. For example, results-20190124105848.\n-k: Amazon EC2 Key File. Amazon EC2 Key Name must match with this file name.\n-n: Amazon EC2 Key Name.\n-j: Apache JMeter (tgz) distribution.\n-o: Oracle JDK distribution.\n-g: Path of GCViewer Jar file, which will be used to analyze GC logs.\n-s: The Amazon CloudFormation Stack Name Prefix.\n-b: Amazon S3 Bucket Name.\n-r: Amazon S3 Bucket Region.\n-J: Amazon EC2 Instance Type for JMeter Client.\n-S: Amazon EC2 Instance Type for JMeter Server.\n-N: Amazon EC2 Instance Type for Netty (Backend) Service.\n-a: WSO2 API Manager Distribution.\n-c: MySQL Connector JAR file.\n-A: Amazon EC2 Instance Type for WSO2 API Manager.\n-D: Amazon EC2 DB Instance Class for WSO2 API Manager RDS Instance.\n-t: Number of stacks to create. Default: 1.\n-p: Parameter option of the test script, which will be used to run tests in parallel.\n    Default: u. Allowed option characters: ubsm.\n-w: The minimum time to wait in minutes before polling for cloudformation stack's CREATE_COMPLETE status.\n    Default: 5.\n-h: Display this help and exit.\n```\n\nPerformance test script options. (run_performance_test_options)\n```\n-m: Application heap memory sizes. You can give multiple options to specify multiple heap memory sizes. Allowed suffixes: M, G.\n-u: Concurrent Users to test. You can give multiple options to specify multiple users.\n-b: Message sizes in bytes. You can give multiple options to specify multiple message sizes.\n-s: Backend Sleep Times in milliseconds. You can give multiple options to specify multiple sleep times.\n-d: Test Duration in seconds. Default 900.\n-w: Warm-up time in seconds. Default 300.\n-j: Heap Size of JMeter Server. Allowed suffixes: M, G. Default 4G.\n-k: Heap Size of JMeter Client. Allowed suffixes: M, G. Default 2G.\n-l: Heap Size of Netty Service. Allowed suffixes: M, G. Default 4G.\n-i: Scenario name to to be included. You can give multiple options to filter scenarios.\n-e: Scenario name to to be excluded. You can give multiple options to filter scenarios.\n```\n\n### Testing WSO2 API Microgateway\n\nUse `cloudformation/run-micro-gw-performance-tests.sh` to run performance tests on WSO2 API Microgateway.\n\n```console\nubuntu@server:~$ ./cloudformation/run-micro-gw-performance-tests.sh -h\n\nUsage: \n./cloudformation/run-micro-gw-performance-tests.sh -f \u003cperformance_scripts_distribution\u003e [-d \u003cresults_dir\u003e] -k \u003ckey_file\u003e -n \u003ckey_name\u003e\n   -j \u003cjmeter_distribution\u003e -o \u003coracle_jdk_distribution\u003e -g \u003cgcviewer_jar_path\u003e\n   -s \u003cstack_name_prefix\u003e -b \u003cs3_bucket_name\u003e -r \u003cs3_bucket_region\u003e\n   -J \u003cjmeter_client_ec2_instance_type\u003e -S \u003cjmeter_server_ec2_instance_type\u003e\n   -N \u003cnetty_ec2_instance_type\u003e \n   -a \u003cwso2am_distribution\u003e -c \u003cwso2am_micro_gw_distribution\u003e -A \u003cwso2am_ec2_instance_type\u003e\n   [-t \u003cnumber_of_stacks\u003e] [-p \u003cparallel_parameter_option\u003e] [-w \u003cminimum_stack_creation_wait_time\u003e]\n   [-h] -- [run_performance_tests_options]\n\n-f: Distribution containing the scripts to run performance tests.\n-d: The results directory. Default value is a directory with current time. For example, results-20190124105955.\n-k: Amazon EC2 Key File. Amazon EC2 Key Name must match with this file name.\n-n: Amazon EC2 Key Name.\n-j: Apache JMeter (tgz) distribution.\n-o: Oracle JDK distribution.\n-g: Path of GCViewer Jar file, which will be used to analyze GC logs.\n-s: The Amazon CloudFormation Stack Name Prefix.\n-b: Amazon S3 Bucket Name.\n-r: Amazon S3 Bucket Region.\n-J: Amazon EC2 Instance Type for JMeter Client.\n-S: Amazon EC2 Instance Type for JMeter Server.\n-N: Amazon EC2 Instance Type for Netty (Backend) Service.\n-a: WSO2 API Manager Distribution.\n-c: WSO2 API Microgateway Distribution.\n-A: Amazon EC2 Instance Type for WSO2 API Manager.\n-t: Number of stacks to create. Default: 1.\n-p: Parameter option of the test script, which will be used to run tests in parallel.\n    Default: u. Allowed option characters: ubsm.\n-w: The minimum time to wait in minutes before polling for cloudformation stack's CREATE_COMPLETE status.\n    Default: 5.\n-h: Display this help and exit.\n```\n\nPerformance test script options. (run_performance_test_options)\n```\n-m: Application heap memory sizes. You can give multiple options to specify multiple heap memory sizes. Allowed suffixes: M, G.\n-u: Concurrent Users to test. You can give multiple options to specify multiple users.\n-b: Message sizes in bytes. You can give multiple options to specify multiple message sizes.\n-s: Backend Sleep Times in milliseconds. You can give multiple options to specify multiple sleep times.\n-d: Test Duration in seconds. Default 900.\n-w: Warm-up time in seconds. Default 300.\n-j: Heap Size of JMeter Server. Allowed suffixes: M, G. Default 4G.\n-k: Heap Size of JMeter Client. Allowed suffixes: M, G. Default 2G.\n-l: Heap Size of Netty Service. Allowed suffixes: M, G. Default 4G.\n-c: Number of cpus (--cpus option for docker)\n-i: Scenario name to to be included. You can give multiple options to filter scenarios.\n-e: Scenario name to to be excluded. You can give multiple options to filter scenarios.\n```\n\n## Running performance tests on other enviroments\n\nThe scripts can also be used to run performance tests on environments other than AWS.\n\nFollowing are the high-level steps to run the performance tests.\n\n* Copy the `performance-apim` distribution to all servers.\n* Extract the packages in user home directory\n* Use scripts in `setup` directory to setup each server.\nNote: `setup-common.sh` is a common script, which should not be executed directly.\n* Run the WSO2 API Manager Gateway performance tests using `jmeter/run-performance-test.sh` script in JMeter Client.\n* Run the WSO2 API Microgateway performance tests using `jmeter/run-micro-gw-performance-tests.sh` script in JMeter Client.\n* Use `jmeter/create-summary-csv.sh` to generate a summary.csv file from the test results.\n* Use `jmeter/create-summary-markdown.py` to generate a summary report in markdown format.\n\n## License\n\nCopyright 2017 WSO2 Inc. (http://wso2.com)\n\nLicensed under the Apache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwso2%2Fperformance-apim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwso2%2Fperformance-apim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwso2%2Fperformance-apim/lists"}