Skip to content

p2a8t4a5a/Performance_Framework

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Performance_Framework


Appendix

Preconfiguration
Installing
Framework architecture
How to load Flask app

Preconfiguration(optional but preferable)


You need this items for performance framework

Installing


For installing and building framework you need to:

  1. Download repository: here
  2. For quick install navigate to repository dir and choose framework load tool(jmeter or gatling). docker-compose up -d
  3. If you want to install separate container
  docker compose up -d kibana 
  docker compose up -d logstash
  docker compose up -d filebeat
  docker compose up -d metricbeat
  docker compose up -d portainer
  docker compose up -d web
  docker compose up -d jenkins

If you want only build container use this command.

docker-compose build -d

After building and creating containers services have such adresses and ports:

  • Jenkins: localhost:8080
  • Kibana: localhost:5601
  • Portainer: localhost:9000
  • Flask app: localhost:5000
  1. Navigate to jenkins(Login: admin, Password: admin, localhost:8080).
  • If you want to use github(by default basic scipts download from github repository) add credentials by this path options->credentials By default in jenkins you can see one job - gatling. It is gatling tests based on Gradle builder + gatling Job used pipeline script(Type of pipeline: scripted).
  • Change you github credentials. Click on gatling job. Choose Configure.
  • After that choose Pipeline syntax. alt-текст
  • Choose in dropdown git and fill all needed info. alt-текст
  • Add your credentials alt-текст
  • Generate and copy code. alt-текст
  • Paste into pipeline script. alt-текст
  • If you want to know more about pipeline scripting you may read more here
  1. Navigate to kibana(localhost:5601).
  • You need to add dashboard.
  • Open Settings.
  • Open Saved objects.
    alt-текст
  • Click import and choose file in path(framework_path/kibana/gatling.ndjson or framework_path/kibana/jmeter.ndjson)
    alt-текст
  • After that check that you have all indices.
  • Select index management. And check that you have gatling or jmeter index
    alt-текст
  1. Run performance script to check that the framework works.

Framework architecture


Framework consist of such aplications:

  • Elasticsearch. Need to store all data and creating templates based on data.
  • Kibana. Visualization of data.
  • Filebeat. Need to read data from load machine and send to logstash.
  • Logstash. Modify data to common format and send to elasticsearch.
  • Metricbeat. Get server metrics from docker containers and from host.
  • Jenkins. Automate performance process.Need to run gatling and jmeter jobs.
  • Portainer. Managing all docker containers.
  • Flask app. Simple application with blog. Store data in SQLite3

Architecture structure of framework with gatling


alt-текст

Architecture structure of framework with jmeter


alt-текст

How to load Flask app


  1. Open command line and write command
ipconfig
  1. Copy IP address and add port 5000. The final address is: YOUR_IP:5000
  2. Add to your jmeter or gatling this address.
  3. Done

Jenkins jmeter test run


How to run jmeter test. You can run test with parameters: THREAD - number of paralel users, LOOP - number of repeats, DURATION - duration of test(you can create perf test depends on loop or duration parameter. By default uses LOOP parameter).
alt-текст
Also you can add your own parameters to pipeline and performance script and customize this job or create another.

Kibana dashboard for jmeter tests


For performance monitoring to kibana dashboad added. Here some screenshots of vizualizations. alt-текст


On the .gif you can see some vizualizations

  • Jmeter_controls. Filters to choose Transaction name, Response code, CSV_File
  • Jmeter_average. Average response time of all transactions. If you choose in jmeter-controls Transaction name the average response will filter for choosen transaction.
  • Jmeter_percentiles. Percentiles of response time.
  • Jmeter_Errors_Num. Show number of errors in the performance test.
  • Jmeter_Data_Table. Show aggregate table metrics for each transactions.
  • Jmeter_Response_Codes. Show response codes for all transactions.
  • Jmeter_Response_Codes_Series. Show count of response codes depends on time.
  • Jmeter_Response_Time_Percentiles. Show response percentiles.
  • Jmeter_Count_vs_Average. Average response time distribution for each transaction.
  • Jmeter_Response_Active_Threads. Average response time with number of active threads.
  • Jmeter_Throughput. Number of transactions per time metric.
  • Jmeter_Bytes. Number of received bytes.

You can add another vizualizations to dashboard or create your own based on jmeter index.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.1%
  • C 0.6%
  • HTML 0.1%
  • PowerShell 0.1%
  • Mako 0.1%
  • JavaScript 0.0%