当前位置:网站首页>Soft test (VII) performance test (1) brief introduction

Soft test (VII) performance test (1) brief introduction

2022-07-26 15:08:00 M1kasal

Preface

This chapter mainly introduces 【 Performance testing 】

  • ps: Why write performance test related content , To be honest, at present, the company I work in rarely conducts performance testing , Not that a complete performance testing platform has been built , It is simply used for some interfaces Jmeter Test it , But what? , This kind of problem is often encountered during the interview , So simply summarize

One 、 Basic concepts of performance testing

First of all, let's briefly mention Why should we do performance testing ?

  • 1、 It can meet users' needs : For example, like some Large amount of visits Website ( Microblogging , Take-out food ), When the concurrent traffic reaches a certain level, the system will crash .
  • 2、 Minimize costs : For example, I don't know how many servers to deploy when a new service goes online , Simply put, if a server is slow , Just deploy a few more .
  • 3、 Evaluate application system performance , Provide basis for system capacity planning of operation and maintenance 、 Provide application tuning reference for development

What aspects of development can we optimize performance ?

Under normal circumstances , The performance needs to be optimized , for instance High concurrency scenario , The whole performance is very low , Performance optimization is definitely needed in development , that How to optimize the performance of development , In fact, this is Java During the interview in the project, I often encounter ( Then I'll explain it briefly from my point of view )

ps: There are many performance optimization methods , Here I will briefly talk about several things I know

  • 1、sql tuning ( Query avoids full table query / avoid where After the statement or/and/>=/<=/like Full blur, etc )
    It was written a long time ago blog, It's easy to look at :https://blog.csdn.net/Makasa/article/details/101218523
  • 2、 Implementing distributed services
    For example, the current popular springboot Microservice architecture ,zookeeper+Dubbo Distributed service architecture , Simply put, it is to divide modules , We integrate the functions provided by a single service , Reduce the coupling before the code
  • 3、 The page is static
    It is mainly generated dynamically html The page is saved as static content , Later, the user's request comes , Direct access to static pages , No longer rendered by services . It can greatly improve the response speed and concurrency of pages
  • 4、 Use caching (redis…)
    It can reduce the reading and writing of the database , You can read the database for the first time , Then save the data to redis Inside , Then take the data directly from redis Take in
  • 5、 You can buy more servers , Distribute concurrent visits

So what is performance testing ?

  • Performance testing : namely Simulate the impact of multiple user operations on server hardware performance
 It has some indicators :
1、 Concurrency 
2、TPS( throughput , Every time s Processing ability )
3、RT( response time )
4、 Server resource usage (cpu The occupancy rate of 、 Memory usage 、 Inquire about Cache Command rate 、 disk IO Literacy rate )


Two 、 Common performance testing tools

Apache ab:Apache HTTP Server performance benchmark tool

Apache Jmeter: Support a lot of protocols , Free open source , Use Java Language Development

LoadRunner: Support a lot of protocols , Toll collection software , Use C Language Development

Locust: Yes Web Interface , Support a lot of protocols , Free open source , Use python Language Development

nGrinder:Naver The company is based on Grinder Developed Performance test platform .Grinder Is one that can run jython( stay JVM Running on python)、groovy Application idioms for writing test scripts . Freeware , Use Java Language development .( function ngrinder-controller.war, The default account and password are admin

原网站

版权声明
本文为[M1kasal]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/207/202207261459073820.html