多篇整合版:最全电商erp系统接口测试实战

之前我们讲了电商ERP系统接口简介以及如何使用post方式获取接口请求
,今天我们来讲解如何用JMeter实现接口功能、性能测试。

内容:

  • JMeter实现接口功能测试

  • JMeter实现接口的性能测试

图片

JMeter实现接口功能测试

图片

企业性能测试编写脚本过程:接口功能测试脚本调试通过--->脚本优化(性能测试脚本)。

接口脚本调试

图片

  • 新增商品详情接口的请求4要素

1、请求地址:

https://open.jackyun.com/open-platform/developer/intercept/testtool/buildparamandrequest

2、请求方法:post

3、请求头

Host: open.jackyun.comConnection: keep-aliveContent-Length: 6677sec-ch-ua: ";Not A Brand";v="99", "Chromium";v="94"Accept: */*Content-Type: application/x-www-form-urlencoded; charset=UTF-8X-Requested-With: XMLHttpRequestsec-ch-ua-mobile: ?0User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Core/1.94.200.400 QQBrowser/11.8.5310.400sec-ch-ua-platform: "Windows"Origin: https://open.jackyun.comSec-Fetch-Site: same-originSec-Fetch-Mode: corsSec-Fetch-Dest: emptyReferer: https://open.jackyun.com/developer/console/page/testtool.html?apiname=erp.goods.skuimportbatch&from=jackyunwebAccept-Encoding: gzip, deflate, brAccept-Language: zh-CN,zh;q=0.9Cookie: 53revisit=1680485326445; _ati=688404030667; Hm_lvt_4293e6f16d3e0252d48cf7a1252f995f=1687759229; Qs_lvt_352880=1680485326%2C1683769042%2C1687759230; Qs_pv_352880=902333099737909600%2C3189451156430100000%2C3125342331411176400%2C2032507965245106700%2C3752838942850185700; jkusername=88888; yhusername=visitor; SESSION=0891f98a-1f45-4a2e-95c9-fbf046636678; openplatfrom=jackyunweb

(左右滑动查看完整代码)

4、请求体

bizcontent=[{"skuImageUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","goodsNameEn":"","isPeriodManage":0,"rightGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","isDoorService":0,"isProxySale":0,"skuHeight":"","shelfLiftUnit":"年","goodsName":"山梅花蜜桃晶采亮肤面膜","goodsField8":"货品属性B","goodsField9":"货品属性B","goodsField10":"货品属性B","goodsField4":" 货品属性B","goodsField11":"货品属性B","goodsField5":"货品属性B","goodsField12":"货品属性B","goodsField6":"货品属性B","goodsField13":"货品属性B","goodsField7":"货品属性B","goodsField14":"货品属性B","goodsField15":"货品属性B","mainGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","goodsField16":"货品属性B","goodsField17":"货品属性B","goodsField18":"货品属性B","goodsField19":"货品属性B","cateCode":"0101","moduleContent":[{"type":1,"showOder":"1","title":"标题","content":"这是描述"}],"skuNo":"HP001","goodsField1":"货品属性B","goodsField2":"货品属性B","goodsField3":"货品属性B","descript":"<p>这是很好的书!</p> <p><img src=\"http://jkyun.oss-cn-hangzhou.aliyuncs.com/longterm/45/system/erp/445554288029867136/1204140161368877696.jpg?Expires=4780344693&OSSAccessKeyId=LTAIh08vjrfC7HV0&Signature=Rb2zTo8%2BRXnWUx8uoBmMMJ3pgfs%3D#O1CN01vPRtFX1CP18G9GBqN-101450072.jpg\" alt=\"\" /></p> <p>&nbsp;</p>","belowGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","ownerCode":"34343","isCustomizProduction":0,"isSyncToItem":"0","goodsAlias":"","shelfLife":3,"platCateId":"110201","goodsAttr":1,"isSerialManagement":0,"skuBarcode":"123fee","materialImgUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","sellInfo":"商品卖点","topGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","skuField29":"A","skuField9":"A","skuField8":"A","skuField25":"A","skuField7":"A","skuField26":"A","skuField6":"A","skuField27":"A","skuField5":"A","skuField28":"A","skuField4":"A","skuField3":"A","skuField2":"A","skuField1":"A","cateName":"笔记本","outSkuCode":"12232","skuField30":"A","skuField18":"A","skuField19":"A","brandName":"","unitName":"件","skuField14":"A","skuField15":"A","skuField16":"A","skuField17":"A","isPickupCard":0,"goodsMemo":"","skuWidth":"","volume":0,"skuField21":"A","leftGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","skuField22":"A","isProsaleProduct":0,"goodsVideoUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","skuField23":"A","isProductionMaterials":0,"skuField24":"A","fixPrice":1.20,"skuWeight":"","skuField20":"A","goodsField20":"货品属性B","isBatchManagement":0,"goodsField21":"货品属性B","goodsField22":"货品属性B","goodsField23":"货品属性B","goodsField24":"货品属性B","goodsField25":"货品属性B","costValuationMethod":0,"goodsField26":"货品属性B","goodsField27":"货品属性B","goodsField28":"货品属性B","goodsField29":"货品属性B","warehouseCode":"C0001","skuName":"规格1","skuField10":"A","skuField11":"A","mainBarcode":"CODE0001","skuField12":"A","abcCate":"A类","skuField13":"A","goodsNo":"1196","goodsField30":"货品属性B","skuLength":"","isPaidService":0}]&method=erp.goods.skuimportbatch&appkey=28773818&version=v1.0&contenttype=json

(左右滑动查看完整代码)

  • JMeter填写请求4要素

1、http取样器填写内容。

图片

2、请求头分别填写在:http信息头管理器和http cookie管理器。

图片

图片

图片

新增接口脚本优化

图片

接口脚本需要参数化的内容包括如下:

1、公共信息的参数化:前缀

2、请求参数的参数化:前缀+当前时间+随机数

3、断言:前缀+当前时间

  • 公共信息参数化

前缀信息进行参数化:

图片

  • 获取当前时间的函数介绍

图片

获取当前时间的函数:${__time(YMdHm,)}

  • 随机函数的介绍

图片

生成的随机函数:${__Random(1,100,)}

  • 请求参数的参数化

将上面1-3中参数进行拼接,如下:${prename}${__time(YMdHm,)}${__Random(1,100,)}

将拼接后的参数代替请求参数中的4个必填字段的固定值,脚本如下:

{"skuImageUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","goodsNameEn":"","isPeriodManage":0,"rightGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","isDoorService":0,"isProxySale":0,"skuHeight":"","shelfLiftUnit":"年","goodsName":"山梅花蜜桃晶采亮肤面膜","goodsField8":"货品属性B","goodsField9":"货品属性B","goodsField10":"货品属性B","goodsField4":" 货品属性B","goodsField11":"货品属性B","goodsField5":"货品属性B","goodsField12":"货品属性B","goodsField6":"货品属性B","goodsField13":"货品属性B","goodsField7":"货品属性B","goodsField14":"货品属性B","goodsField15":"货品属性B","mainGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","goodsField16":"货品属性B","goodsField17":"货品属性B","goodsField18":"货品属性B","goodsField19":"货品属性B","cateCode":"0101","moduleContent":[{"type":1,"showOder":"1","title":"标题","content":"这是描述"}],"skuNo":"${prename}${__time(YMdHm,)}${__Random(1,100,)}","goodsField1":"货品属性B","goodsField2":"货品属性B","goodsField3":"货品属性B","descript":"<p>这是很好的书!</p> <p><img src=\"http://jkyun.oss-cn-hangzhou.aliyuncs.com/longterm/45/system/erp/445554288029867136/1204140161368877696.jpg?Expires=4780344693&OSSAccessKeyId=LTAIh08vjrfC7HV0&Signature=Rb2zTo8%2BRXnWUx8uoBmMMJ3pgfs%3D#O1CN01vPRtFX1CP18G9GBqN-101450072.jpg\" alt=\"\" /></p> <p>&nbsp;</p>","belowGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","ownerCode":"34343","isCustomizProduction":0,"isSyncToItem":"0","goodsAlias":"","shelfLife":3,"platCateId":"110201","goodsAttr":1,"isSerialManagement":0,"skuBarcode":"${prename}${__time(YMdHm,)}${__Random(1,100,)}","materialImgUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","sellInfo":"商品卖点","topGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","skuField29":"A","skuField9":"A","skuField8":"A","skuField25":"A","skuField7":"A","skuField26":"A","skuField6":"A","skuField27":"A","skuField5":"A","skuField28":"A","skuField4":"A","skuField3":"A","skuField2":"A","skuField1":"A","cateName":"笔记本","outSkuCode":"${prename}${__time(YMdHm,)}${__Random(1,100,)}","skuField30":"A","skuField18":"A","skuField19":"A","brandName":"","unitName":"件","skuField14":"A","skuField15":"A","skuField16":"A","skuField17":"A","isPickupCard":0,"goodsMemo":"","skuWidth":"","volume":0,"skuField21":"A","leftGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","skuField22":"A","isProsaleProduct":0,"goodsVideoUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","skuField23":"A","isProductionMaterials":0,"skuField24":"A","fixPrice":1.2,"skuWeight":"","skuField20":"A","goodsField20":"货品属性B","isBatchManagement":0,"goodsField21":"货品属性B","goodsField22":"货品属性B","goodsField23":"货品属性B","goodsField24":"货品属性B","goodsField25":"货品属性B","costValuationMethod":0,"goodsField26":"货品属性B","goodsField27":"货品属性B","goodsField28":"货品属性B","goodsField29":"货品属性B","warehouseCode":"C0001","skuName":"规格1","skuField10":"A","skuField11":"A","mainBarcode":"CODE0001","skuField12":"A","abcCate":"A类","skuField13":"A","goodsNo":"${prename}${__time(YMdHm,)}${__Random(1,100,)}","goodsField30":"货品属性B","skuLength":"","isPaidService":0}

(左右滑动查看完整代码)

图片

  • 断言

图片

查询接口脚本

图片

查询接口请求4要素:

1、请求地址:https://open.jackyun.com/open-platform/developer/intercept/testtool/buildparamandrequest

2、请求方法:post

3、请求头:

Host: open.jackyun.comConnection: keep-aliveContent-Length: 893sec-ch-ua: ";Not A Brand";v="99", "Chromium";v="94"Accept: */*Content-Type: application/x-www-form-urlencoded; charset=UTF-8X-Requested-With: XMLHttpRequestsec-ch-ua-mobile: ?0User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Core/1.94.200.400 QQBrowser/11.8.5310.400sec-ch-ua-platform: "Windows"Origin: https://open.jackyun.comSec-Fetch-Site: same-originSec-Fetch-Mode: corsSec-Fetch-Dest: emptyReferer: https://open.jackyun.com/developer/console/page/testtool.html?apiname=erp.storage.goodslist&from=jackyunwebAccept-Encoding: gzip, deflate, brAccept-Language: zh-CN,zh;q=0.9Cookie: 53revisit=1680485326445; _ati=688404030667; Hm_lvt_4293e6f16d3e0252d48cf7a1252f995f=1687759229; Qs_lvt_352880=1680485326%2C1683769042%2C1687759230; Qs_pv_352880=902333099737909600%2C3189451156430100000%2C3125342331411176400%2C2032507965245106700%2C3752838942850185700; jkusername=88888; yhusername=visitor; SESSION=0891f98a-1f45-4a2e-95c9-fbf046636678; acw_tc=276aede816895769228234156e315d1dddf88a5616cf1761833897fff3e36a; openplatfrom=jackyunweb

(左右滑动查看完整代码)

4、请求体

appkey=28773818&method=erp.storage.goodslist&contenttype=JSON&version=v1.0&pageIndex=0&pageSize=1&startDate=&skuName=&isBlockup=&startDateModifiedGoods=&goodsNo=test20230717&endDateModifiedSku=&endDate=&cateName=&abcCate=&isPackageGood=&skuIsBlockup=&skuBarcode=&goodsName=&assistBarcode=&endDateModifiedGoods=&startDateModifiedSku=&bizcontent={"pageIndex":"0","pageSize":"1","startDate":"","skuName":"","isBlockup":"","startDateModifiedGoods":"","goodsNo":"${skuno}","endDateModifiedSku":"","endDate":"","cateName":"","abcCate":"","isPackageGood":"","skuIsBlockup":"","skuBarcode":"","goodsName":"","assistBarcode":"","endDateModifiedGoods":"","startDateModifiedSku":""}

(左右滑动查看完整代码)

查询货品接口断言:

图片

上下游接口传值

图片

1、上游接口使用边界提取器提取值,截图如下:

图片

2、下游接口引用参数:${skuno}

图片

图片

JMeter实现接口的性能测试

图片

性能测试分析

图片

  • 实际使用场景

系统上线之前的货品准备工作、双十一大促之前的货品准备工作,多名订单操作人员或者仓管员同时导入货品,存在导入货品功能的并发,且每个操作人员导入的货品编号不同(该系统不允许重复导入货品编号相同的货品)。

  • JMeter模拟思路

使用JMeter的“if控制器”控制模拟不同的操作人员,且不同的操作员导入货品编号的随机数范围不同,多名操作人员使用csv文件存储;比如,操作员A导入货品编号为:1-100;操作员导入货品编号为:101-200,以此类推。

比如随机数:101-200的新增货品接口请求参数:

{"skuImageUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","goodsNameEn":"","isPeriodManage":0,"rightGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","isDoorService":0,"isProxySale":0,"skuHeight":"","shelfLiftUnit":"年","goodsName":"山梅花蜜桃晶采亮肤面膜","goodsField8":"货品属性B","goodsField9":"货品属性B","goodsField10":"货品属性B","goodsField4":" 货品属性B","goodsField11":"货品属性B","goodsField5":"货品属性B","goodsField12":"货品属性B","goodsField6":"货品属性B","goodsField13":"货品属性B","goodsField7":"货品属性B","goodsField14":"货品属性B","goodsField15":"货品属性B","mainGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","goodsField16":"货品属性B","goodsField17":"货品属性B","goodsField18":"货品属性B","goodsField19":"货品属性B","cateCode":"0101","moduleContent":[{"type":1,"showOder":"1","title":"标题","content":"这是描述"}],"skuNo":"${prename}${__time(YMdHm,)}${__Random(101,200,)}","goodsField1":"货品属性B","goodsField2":"货品属性B","goodsField3":"货品属性B","descript":"<p>这是很好的书!</p> <p><img src=\"http://jkyun.oss-cn-hangzhou.aliyuncs.com/longterm/45/system/erp/445554288029867136/1204140161368877696.jpg?Expires=4780344693&OSSAccessKeyId=LTAIh08vjrfC7HV0&Signature=Rb2zTo8%2BRXnWUx8uoBmMMJ3pgfs%3D#O1CN01vPRtFX1CP18G9GBqN-101450072.jpg\" alt=\"\" /></p> <p> </p>","belowGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","ownerCode":"34343","isCustomizProduction":0,"isSyncToItem":"0","goodsAlias":"","shelfLife":3,"platCateId":"110201","goodsAttr":1,"isSerialManagement":0,"skuBarcode":"${prename}${__time(YMdHm,)}${__Random(101,200,)}","materialImgUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","sellInfo":"商品卖点","topGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","skuField29":"A","skuField9":"A","skuField8":"A","skuField25":"A","skuField7":"A","skuField26":"A","skuField6":"A","skuField27":"A","skuField5":"A","skuField28":"A","skuField4":"A","skuField3":"A","skuField2":"A","skuField1":"A","cateName":"笔记本","outSkuCode":"${prename}${__time(YMdHm,)}${__Random(101,200,)}","skuField30":"A","skuField18":"A","skuField19":"A","brandName":"","unitName":"件","skuField14":"A","skuField15":"A","skuField16":"A","skuField17":"A","isPickupCard":0,"goodsMemo":"","skuWidth":"","volume":0,"skuField21":"A","leftGoodsUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","skuField22":"A","isProsaleProduct":0,"goodsVideoUrl":"http://wdgjtest.oss-cn-hangzhou.aliyuncs.com/45/341960689798062080.jpg?Expires=4677564907&OSSAccessKeyId=LTAI2P5paDiiYDCJ&Signature=7gKXbqG2QWeG7sUByBk8J9ummno%3D","skuField23":"A","isProductionMaterials":0,"skuField24":"A","fixPrice":1.2,"skuWeight":"","skuField20":"A","goodsField20":"货品属性B","isBatchManagement":0,"goodsField21":"货品属性B","goodsField22":"货品属性B","goodsField23":"货品属性B","goodsField24":"货品属性B","goodsField25":"货品属性B","costValuationMethod":0,"goodsField26":"货品属性B","goodsField27":"货品属性B","goodsField28":"货品属性B","goodsField29":"货品属性B","warehouseCode":"C0001","skuName":"规格1","skuField10":"A","skuField11":"A","mainBarcode":"CODE0001","skuField12":"A","abcCate":"A类","skuField13":"A","goodsNo":"${prename}${__time(YMdHm,)}${__Random(101,200,)}","goodsField30":"货品属性B","skuLength":"","isPaidService":0}

(左右滑动查看完整代码)

性能测试脚本设计

图片

csv数据文件设置:

图片

图片

性能脚本优化

图片

csv文件参数引用,如下:

图片

添加“if控制器”和事务控制器,如下:

图片

注意:if控制器这个勾去掉。

图片

线程组设置:

图片

启动性能测试脚本生成聚合报告:

图片

备注:本次只实现一个货品一个sku的场景。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/241496.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

java学生选课系统 数据库版

首先让我们创建一个数据库 让我们向表中插入数据然后查询它

WSL 配置 Docker 内存和 CPU 资源限制

我用的电脑一共有40G内存&#xff0c;最近发现电脑重启后&#xff0c;VmmemWSL 进程很快就会占用一多半的内存&#xff08;20G&#xff09;&#xff0c;电脑中有多个停止运行的容器&#xff0c;正常启动状态的只有一个 MySQL 服务&#xff0c;通过 docker stats 查看占用内存也…

【详解优先级队列(堆)】

目录 堆的概念 堆的性质 堆的存储方式 堆的创建 堆的向下调整 向下过程(以小堆为例) 向下过程(以大堆为例) 建堆的时间复杂度O(n) 堆的插入与删除 堆的插入 向上调整建堆的时间复杂度O(nlogn) 堆的删除 常见习题 常用接口介绍 PriorityQueue的特性 Pri…

实战1-python爬取安全客新闻

一般步骤&#xff1a;确定网站--搭建关系--发送请求--接受响应--筛选数据--保存本地 1.拿到网站首先要查看我们要爬取的目录是否被允许 一般网站都会议/robots.txt目录&#xff0c;告诉你哪些地址可爬&#xff0c;哪些不可爬&#xff0c;以安全客为例子 2. 首先测试在不登录的…

使用MIB builder自定义物联网网关的MIB结构

文章目录 物联网网关初识&#xff08;了解即可&#xff09;IoT的通用MIB库结构MIB Builder开发流程指导问题总结子叶没所属分组值范围不为0 物联网网关初识&#xff08;了解即可&#xff09; 网关又称网间连接器、协议转换器。简单说&#xff0c;物联网网关是一台智能计算机&a…

【Java】网络编程-UDP回响服务器客户端简单代码编写

这一篇文章我们将讲述网络编程中UDP服务器客户端的编程代码 1、前置知识 UDP协议全称是用户数据报协议&#xff0c;在网络中它与TCP协议一样用于处理数据包&#xff0c;是一种无连接的协议。 UDP的特点有&#xff1a;无连接、尽最大努力交付、面向报文、没有拥塞控制 本文讲…

《算法通关村——回溯模板如何解决回溯问题》

《算法通关村——回溯模板如何解决回溯问题》 93. 复原 IP 地址 有效 IP 地址 正好由四个整数&#xff08;每个整数位于 0 到 255 之间组成&#xff0c;且不能含有前导 0&#xff09;&#xff0c;整数之间用 . 分隔。 例如&#xff1a;"0.1.2.201" 和 "192.1…

IDEA2023找不到add framework support怎么解决

问题: 我的idea版本是2023.01&#xff0c;新版idea右键项目没有Add Framework Support&#xff0c;help里面也找不到相关的。 从project structue的facets里面添加就行了&#xff0c;都是一样的。 1.依旧是新建一个项目 2.file-->project structure--->facets 左上角加…

JavaEE 09 锁策略

1.锁策略 1.1 乐观锁与悲观锁 其实前三个锁是同一种锁,只是站在不同的角度上去进行描述,此处的乐观与悲观其实是指在预测的角度上看会发生锁竞争的概率大小,概率大的则是悲观锁,概率小的则是乐观锁 乐观锁在加锁的时候就会做较少的事情,加锁的速度较快,但是消耗的cpu资源等也会…

crmeb v5自动生成代码报错(adminInfo方法或404路由不存在的问题)

404 现象 调试器中出现了404 , 那肯定是路由出了问题,也就是说,crmeb 为我们生成的路由没有对应的加载上,先来看一下, 自动代码为我们生成的路由是什么样子的 所以有一种最简单的解决办法,就是 把 新生成的路由文件从子目录中挪出一级来,就可以解决404的问题了 下面来说…

python学习:浅拷贝与深拷贝详解

copy 一、 & is二、浅拷贝 & 深拷贝(一)、浅拷贝(二)、深拷贝 三、问题 一、’ ’ & ‘is’ ’ 和is是python对象比较常用的两种方式,简单来说,‘ ‘操作符比较对象之间的值是否相等,如 a b 而’is’操作符比较的是对象的身份标识是否相等,即它们是否是同一个…

「玩转 TableAgent 数据智能分析」实战数据分析演练

文章目录 前言TableAgent 功能亮点人人都是数据分析师融合创新应用的新成果 TableAgent 使用介绍登陆功能介绍申请认证 实战数据集分析一导入 CSV 文件数据发起提问TableAgent 应答结果贴切的服务推荐问题提问 实战数据集分析二分析结果分析哪个城市的未来人口最多 总结 TableA…

linux高级管理——访问MYSQL数据库

一、认识数据库系统&#xff1a; MySQL数据库系统也是一个典型的C/S(客户端/服务器&#xff09;架构的应用&#xff0c;要访问MySQL数据库需要使用专门的客户端软件。在Linux系统中&#xff0c;最简单、易用的MySQL客户端软件是其自带的mysql命令工具。 1&#xff0e;登录到My…

光伏开发设计施工一体化系统都有哪些功能?

随着全球对可再生能源的需求不断增加&#xff0c;光伏行业得到了快速发展。同时也面临着一些挑战&#xff0c;例如初始投资成本高、需要大量土地和水资源等。鹧鸪云光伏与储能软件利用技术创新&#xff0c;促进光伏行业数字化升级。 一、智能测算 1.投融资表&#xff1a;采用…

【FPGA/verilog -入门学习6】verilog频率计数器

需求 在使能信号控制下&#xff0c;计算输入脉冲的每两个上升沿之间的时钟周期数并输出&#xff0c;即输出脉冲频率的计数值 输入信号 周期性脉冲信号&#xff1a;需要做检测的脉冲频率信号 使能信号&#xff1a;高电平进行频率计数&#xff0c;低电平清零计数器 输出信号 计数…

bootstrap:下拉菜单

<!DOCTYPE html> <html> <head> <meta charset"UTF-8"> <title>下拉菜单DEMO</title> <link rel"stylesheet" type"text/css" href"/cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css"…

TCP/IP详解——网络基本概念

文章目录 一、网络基本概念1. OSI 7层模型1.1 每层对应的协议1.2 每层涉及的设备1.2.1 物理层设备1.2.2 数据链路层设备1.2.3 网络层设备1.2.4 传输层设备1.2.5 交换机和路由器的应用1.2.6 问题 2. TCP/IP 4层模型3. 物理层传输介质3.1 冲突域 4. 数据链路层4.1 以太网帧结构4.…

​flutter 代码混淆

Flutter 应用混淆&#xff1a;Flutter 应用的混淆非常简单&#xff0c;只需要在构建 release 版应用时结合使用 --obfuscate 和 --split-debug-info 这两个参数即可。–obfuscate --split-debug-info 用来指定输出调试文件的位置&#xff0c;该命令会生成一个符号映射表。目前支…

mysql字段设计规范:使用unsigned(无符号的)存储非负值

如果一个字段存储的是数值&#xff0c;并且是非负数&#xff0c;要设置为unsigned&#xff08;无符号的&#xff09;。 例如&#xff1a; 备注&#xff1a;对于类型是 FLOAT、 DOUBLE和 DECIMAL的&#xff0c;UNSIGNED属性已经废弃了&#xff0c;可能在mysql的未来某个版本去…

C#学习笔记 - C#基础知识 - C#从入门到放弃

C# 第1节 C# 简单介绍1.1 C# 是什么1.2 C# 强大的编程功能1.3 C# 发展史1.4 C#与Java区别 第2节 C#程序结构2.1 Hello world2.2 C# 结构解析 第3节 C#基本语法3.1 第1节 C# 简单介绍 1.1 C# 是什么 C# 的发音为“C Sharp”&#xff0c;是一门由微软开发并获得了 ECMA&#xf…