当前位置:网站首页>4. Immersion test
4. Immersion test
2022-07-24 23:48:00 【Clean night mortal dust】
Soak Test
and The load test Mainly related to performance evaluation , and Pressure test Involving system stability under extreme conditions , Immersion testing involves reliability for a long time .
The immersion test revealed the performance and reliability problems caused by the system under pressure for a long time .
Reliability problems are often associated with errors 、 Memory leak 、 Insufficient storage quota 、 Incorrect configuration or infrastructure failure . Performance problems are often associated with incorrect database tuning 、 Memory leak 、 Resource leaks or large amounts of data .
Pass the immersion test , You can simulate traffic for a few days in just a few hours .
You usually run this test to :
- Verify that your system is not affected by errors or memory leaks , These errors or memory leaks can cause crashes or restarts after running for hours .
- Verify that the expected application restart does not lose requests .
- Look for errors related to occasional competitive conditions .
- Make sure your database does not run out of allocated storage space and stop .
- Make sure that your logs do not run out of allocated disk storage space .
- Make sure that the external service you rely on does not stop working after executing a certain number of requests .
You may find that , Compared with the end of the test , Your application performs much better at the beginning of the test . If your database is not adjusted correctly , This usually happens . Adding indexes or allocating additional memory may help .
stay k6 Immersion test
We recommend that you configure the soaking test to be of the system capacity 80% about . If your system can process at most 500 Users , Then the soak test should be configured as 400 individual VU.
The duration of the soak test shall be in hours . We suggest you start with 1 The hour test begins , After success, extend it to a few hours . Some mistakes are related to time , Independent of the total number of requests executed .
sample-soak-test.js
import http from 'k6/http';
import {
sleep } from 'k6';
export let options = {
stages: [
{
duration: '2m', target: 400 }, // ramp up to 400 users
{
duration: '3h56m', target: 400 }, // stay at 400 for ~4 hours
{
duration: '2m', target: 0 }, // scale down. (optional)
],
};
const API_BASE_URL = 'https://test-api.k6.io';
export default function () {
http.batch([
['GET', `${
API_BASE_URL}/public/crocodiles/1/`],
['GET', `${
API_BASE_URL}/public/crocodiles/2/`],
['GET', `${
API_BASE_URL}/public/crocodiles/3/`],
['GET', `${
API_BASE_URL}/public/crocodiles/4/`],
]);
sleep(1);
}
Soaking test VU The chart should be as follows :

Warning !
Cost estimate before starting the soaking test
The soak test can simulate normal flow for days or weeks in a few hours . This means that your infrastructure and supplier costs can be high .
If you are testing the website , Then we should consider CDN Excluded from the test .
If your system uses external services , You may need to calculate the cost before starting the test .
When to do the soaking test ?
Immersion testing can help you find long-term errors and reliability problems . Many complex systems have errors of this nature .
You should perform the soak test after the standard load test is successful , And when you perform the stress test, you find that your system is stable .
Immersion testing is the last step in building a reliable system .
Refer to official documentation
Official document address : https://k6.io/docs/
边栏推荐
猜你喜欢

JS ------ Chapter II JS logic control

50 places are limited to open | with the news of oceanbase's annual press conference coming!

郑慧娟:基于统一大市场的数据资产应用场景与评估方法研究

Xiezhendong: Exploration and practice of digital transformation and upgrading of public transport industry

芯片的功耗

Sql文件导入数据库-保姆级教程

Processing PDF and JPG files in VB6

Development direction and problems of optaplanner

1、 MFC introduction

How to put long links into Excel
随机推荐
Is the income of CICC securities' new financial products 6%? I want to open an account and manage money
The idea of Google's "Ai awareness" event this month
Js----- Chapter 4 array
Simple message queue implementation nodejs + redis =mq
Analysis of WPF multi finger application development
Pointers and arrays
Network Security Learning (V) DHCP
采坑记录:TypeError: 'module' object is not callable
Mandatory interview questions: 1. shallow copy and deep copy_ Shallow copy
Learn AI through detectron2
Cross entropy loss
每周小结(*66):下一个五年
Architecture design of multi live shopping mall
[brother hero July training] day 20: search Binary Tree
Notes of Teacher Li Hongyi's 2020 in-depth learning series 5
LP liquidity pledge mining system development detailed procedure
[Nuxt 3] (十)运行时配置
What are the meanings and application scenarios of the three giants of cloud computing: IAAs, PAAS and SaaS?
2022 the most NB JVM foundation to tuning notes, thoroughly understand Alibaba P6 small case
理财产品可以达到百分之6的,我想要开户买理财产品