{"id":1323,"date":"2025-09-21T15:47:45","date_gmt":"2025-09-21T07:47:45","guid":{"rendered":"https:\/\/eve2333.top\/?p=1323"},"modified":"2025-09-21T15:47:45","modified_gmt":"2025-09-21T07:47:45","slug":"%e7%89%9b%e5%88%b8onecoupon%e7%b3%bb%e7%bb%9f-%e7%ac%ac%e2%91%a4%e7%ab%a0%e8%8a%82%ef%bc%9a%e9%9d%a2%e8%af%95%e6%9c%8d%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/eve2333.top\/?p=1323","title":{"rendered":"\u725b\u5238oneCoupon\u7cfb\u7edf \u7b2c\u2464\u7ae0\u8282\uff1a\u9762\u8bd5\u670d\u52a1"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\"><strong>\u7b2c31\u5c0f\u8282\uff1a\u538b\u6d4b\u725b\u5238\u67e5\u8be2\u53ef\u7528\/\u4e0d\u53ef\u7528\u4f18\u60e0\u5238\u529f\u80fd<\/strong><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u6ce8\u610f\u4e8b\u9879<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-qps\">1. \u4ec0\u4e48\u662f QPS\uff1f<\/h3>\n\n\n\n<p>QPS \u8868\u793a\u7cfb\u7edf\u6bcf\u79d2\u80fd\u591f\u5904\u7406\u7684\u8bf7\u6c42\u6570\u91cf\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u7cfb\u7edf\u5728\u4e00\u79d2\u5185\u5904\u7406\u4e86\u591a\u5c11\u4e2a\u67e5\u8be2\uff08\u6216\u8bf7\u6c42\uff09\u3002\u5e38\u7528\u4e8e\u63cf\u8ff0 <strong>\u63a5\u53e3<\/strong> \u6216 <strong>API \u8bf7\u6c42<\/strong> \u7684\u5904\u7406\u80fd\u529b\uff0c\u901a\u5e38\u4e0e Web \u670d\u52a1\u3001\u6570\u636e\u5e93\u67e5\u8be2\u7b49\u76f8\u5173\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\u7535\u5546\u7f51\u7ad9\u7684\u5546\u54c1\u67e5\u8be2\uff0c\u6574\u4e2a\u5546\u54c1\u670d\u52a1\u96c6\u7fa4\uff0c\u5bf9\u5916\u63d0\u4f9b\u7684\u67e5\u8be2\u63a5\u53e3\uff0c\u6bcf\u79d2\u652f\u6491 8800 \u6b21\uff0c\u90a3\u5c31\u610f\u5473\u7740\u8fd9\u4e2a\u63a5\u53e3 QPS \u662f 8800\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-tps\">2. \u4ec0\u4e48\u662f TPS\uff1f<\/h3>\n\n\n\n<p>TPS \u8868\u793a\u7cfb\u7edf\u6bcf\u79d2\u5904\u7406\u7684\u4e8b\u52a1\u6570\u91cf\u3002\u4e8b\u52a1\u901a\u5e38\u662f\u4e00\u7ec4\u64cd\u4f5c\u7684\u96c6\u5408\uff0c\u9700\u8981\u4fdd\u8bc1\u6574\u4e2a\u64cd\u4f5c\u96c6\u7684\u539f\u5b50\u6027\uff08\u5168\u90e8\u6210\u529f\u6216\u5168\u90e8\u5931\u8d25\uff09\u3002\u5e38\u7528\u4e8e\u63cf\u8ff0\u6d89\u53ca\u6570\u636e\u5e93\u64cd\u4f5c\u6216\u590d\u6742\u4e1a\u52a1\u573a\u666f\u7684\u7cfb\u7edf\uff0c\u5982\u4e0b\u5355\u3001\u652f\u4ed8\u7b49\u9700\u8981\u6570\u636e\u4e00\u81f4\u6027\u7684\u573a\u666f\u3002\u5728\u5206\u5e03\u5f0f\u7cfb\u7edf\u4e2d\uff0cTPS \u662f\u4e00\u4e2a\u66f4\u4e25\u8c28\u7684\u6307\u6807\uff0c\u56e0\u4e3a\u5b83\u5f3a\u8c03 <strong>\u4e8b\u52a1\u5b8c\u6574\u6027\u548c\u4e00\u81f4\u6027<\/strong>\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u5904\u7406\u8bf7\u6c42\u7684\u6570\u91cf\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\u7535\u5546\u7f51\u7ad9\u7684\u4e0b\u5355\u63a5\u53e3\uff0c\u6574\u4e2a\u8ba2\u5355\u670d\u52a1\u96c6\u7fa4\uff0c\u5bf9\u5916\u63d0\u4f9b\u7684\u4e0b\u5355\u63a5\u53e3\uff0c\u6bcf\u79d2\u652f\u6491 2800 \u6b21\uff0c\u90a3\u5c31\u610f\u5473\u7740\u8fd9\u4e2a\u63a5\u53e3 TPS \u662f 2800\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-qps-tps\">3. \u5e76\u53d1\u91cf\u6307\u7684 QPS \u8fd8\u662f TPS\uff1f<\/h3>\n\n\n\n<p>\u5e76\u53d1\u91cf\u57fa\u672c\u7b49\u4e8e\u541e\u5410\u91cf\u6982\u5ff5\uff0c\u5927\u5bb6\u77e5\u9053\u5373\u53ef\u3002\u90a3\u804a\u5230\u5e76\u53d1\u91cf\u6216\u8005\u541e\u5410\u91cf\uff0c\u6307\u7684\u662f QPS \u8fd8\u662f TPS \u5462\uff1f<\/p>\n\n\n\n<p>\u5982\u679c\u9879\u76ee\u5373\u6709 QPS \u573a\u666f\u540c\u65f6\u4e5f\u6709 TPS \u573a\u666f\uff0c\u6211\u4eec\u4e00\u822c\u662f\u5c06 TPS \u7684\uff0c\u56e0\u4e3a TPS \u7684\u76f8\u5173\u6280\u672f\u4eae\u70b9\u6bd4\u8f83\u591a\u3002\u62ff\u725b\u5238\u9879\u76ee\u4e3e\u4f8b\uff0cQPS \u6709\u4f18\u60e0\u5238\u53ef\u7528\/\u4e0d\u53ef\u7528\u5217\u8868\uff0cTPS \u6709\u5151\u6362\u4f18\u60e0\u5238\u573a\u666f\u3002\u7b80\u800c\u8a00\u4e4b\uff0c\u5982\u679c\u9762\u8bd5\u5b98\u95ee\u5e76\u53d1\u91cf\uff0c\u90a3\u4e48\u4e00\u822c\u6cdb\u6307\u725b\u5238\u5151\u6362\u4f18\u60e0\u5238\u63a5\u53e3\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u95ee\u5177\u4f53 TPS \u6216\u8005 QPS \u7684\u8bdd\uff0c\u6211\u4eec\u53ef\u4ee5\u5206\u522b\u56de\u7b54\u5151\u6362\u4f18\u60e0\u5238\u548c\u4f18\u60e0\u5238\u53ef\u7528\/\u4e0d\u53ef\u7528\u5217\u8868\u63a5\u53e3\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u73af\u5883<\/h2>\n\n\n\n<p>\u8f6f\u4ef6\u67b6\u6784\u4e2d\uff0c\u7cfb\u7edf\u8bbe\u8ba1\u662f\u4e00\u90e8\u5206\uff0c\u57fa\u7840\u8bbe\u65bd\u662f\u4e00\u90e8\u5206\u3002\u7cfb\u7edf\u8bbe\u8ba1\u4e00\u822c\u5c31\u662f\u770b\u6211\u4eec\u7684\u4ee3\u7801\u548c\u67b6\u6784\u662f\u5982\u4f55\u8fd0\u4f5c\u7684\uff0c\u6bd4\u5982\u4ee3\u7801\u4e2d\u8fd0\u884c\u4e86\u5148\u67e5\u8be2\u7f13\u5b58 Redis \u518d\u67e5\u8be2\u6570\u636e\u5e93 MySQL\uff0c\u9632\u6b62\u7f13\u5b58\u51fb\u7a7f\u548c\u7a7f\u900f\u7b49\u8bbe\u8ba1\u3002\u57fa\u7840\u8bbe\u65bd\u6307\u7684\u662f\u90e8\u7f72\u7684\u89c4\u683c\uff0c\u6bd4\u5982 Redis \u4ec0\u4e48\u914d\u7f6e\u3001MySQL \u4ec0\u4e48\u914d\u7f6e\u3001\u90e8\u7f72\u4e86\u51e0\u53f0\u725b\u5238 oneCoupon \u670d\u52a1\u4ee5\u53ca\u6bcf\u53f0\u90e8\u7f72\u673a\u5668\u7684\u914d\u7f6e\u662f\u591a\u5c11\u3002<\/p>\n\n\n\n<p>\u5728\u548c\u9762\u8bd5\u5b98\u8bf4\u65f6\uff0c\u4e00\u5b9a\u8981\u5148\u660e\u786e\u81ea\u5df1\u7684\u90e8\u7f72\u914d\u7f6e\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728\u81ea\u5df1\u672c\u5730\u7535\u8111\u4e0a\u8fdb\u884c\u7684\u6d4b\u8bd5\uff0c\u7535\u8111\u914d\u7f6e MacBook M2 Max 12C64G\u3002<\/li>\n\n\n\n<li>\u542f\u52a8\u4e86\u4e00\u4e2a\u725b\u5238 SettlementApplication \u7ed3\u7b97\u670d\u52a1\u3002<\/li>\n\n\n\n<li>\u901a\u8fc7 Jmeter \u914d\u7f6e\u4e86 80 \u4e2a\u7ebf\u7a0b\u5faa\u73af 1000 \u6b21\u538b\u6d4b\uff0c\u6700\u7ec8\u541e\u5410\u91cf 7033\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u7ed3\u679c<\/h2>\n\n\n\n<p>Jmeter \u6211\u914d\u7f6e\u4e86 80 \u4e2a\u7ebf\u7a0b\uff0c\u5faa\u73af\u6b21\u6570\u8bbe\u7f6e\u4e86 1000\uff0c\u610f\u5473\u7740\u6709 80 \u4e2a\u7ebf\u7a0b\u4f1a\u8c03\u7528 1000 \u6b21\u725b\u5238\u63a5\u53e3\uff0c\u6700\u7ec8\u4f1a\u6a21\u62df\u4ea7\u751f 80000 \u6b21\u7528\u6237\u8bf7\u6c42\u3002<\/p>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u8bbe\u7f6e 80 \u4e2a\u7ebf\u7a0b\uff1f\u56e0\u4e3a\u6bcf\u53f0\u7535\u8111\u7684 CPU \u6027\u80fd\u4e0d\u540c\uff0c\u8fd9\u4e2a\u6570\u636e\u9700\u8981\u5927\u5bb6\u4e0d\u65ad\u538b\u6d4b\u627e\u5230\u6700\u4f18\u7ed3\u679c\u3002\u5176\u5b9e\u518d\u5f80\u4e0a\u63d0\u5347\u7ebf\u7a0b\u6570\u8fd8\u80fd\u63d0\u9ad8\u70b9\u541e\u5410\u91cf\uff0c\u4e0d\u8fc7\u5e76\u4e0d\u5927\uff0c\u6700\u7ec8\u6211\u5c31\u4ee5 80 \u4e3a\u7ed3\u8bba\u4e86\u3002<\/p>\n\n\n\n<p>\u4ee5\u6211\u7684\u7535\u8111\u914d\u7f6e\u538b\u6d4b\uff0c\u7ed3\u679c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/article-images.zsxq.com\/FgwZb1MBim_3e-ZRXvp1jE4opuxp\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"jmeter\">Jmeter \u538b\u6d4b\u811a\u672c<\/h2>\n\n\n\n<p>\u5c06\u4ee5\u4e0b\u4ee3\u7801\u590d\u5236\u5230\u6587\u672c\u7f16\u8f91\u5668\u4e2d\uff0c\u4fdd\u5b58\u4e3a oneCouponListQueryCoupons.jmx \u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 Jmeter \u6253\u5f00\u5373\u53ef\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;&lt;jmeterTestPlan version=\"1.2\" properties=\"5.0\" jmeter=\"5.6\"&gt;&lt;hashTree&gt;&lt;TestPlan guiclass=\"TestPlanGui\" testclass=\"TestPlan\" testname=\"\u725b\u5238\u67e5\u8be2\u4f18\u60e0\u5238\u5217\u8868\u6d4b\u8bd5\u8ba1\u5212\"&gt;&lt;elementProp name=\"TestPlan.user_defined_variables\" elementType=\"Arguments\" guiclass=\"ArgumentsPanel\" testclass=\"Arguments\" testname=\"\u7528\u6237\u5b9a\u4e49\u7684\u53d8\u91cf\"&gt;&lt;collectionProp name=\"Arguments.arguments\"\/&gt;&lt;\/elementProp&gt;&lt;\/TestPlan&gt;&lt;hashTree&gt;&lt;ThreadGroup guiclass=\"ThreadGroupGui\" testclass=\"ThreadGroup\" testname=\"\u7ebf\u7a0b\u7ec4\"&gt;&lt;elementProp name=\"ThreadGroup.main_controller\" elementType=\"LoopController\" guiclass=\"LoopControlPanel\" testclass=\"LoopController\" testname=\"\u5faa\u73af\u63a7\u5236\u5668\"&gt;&lt;stringProp name=\"LoopController.loops\"&gt;1000&lt;\/stringProp&gt;&lt;\/elementProp&gt;&lt;stringProp name=\"ThreadGroup.num_threads\"&gt;80&lt;\/stringProp&gt;&lt;stringProp name=\"ThreadGroup.ramp_time\"&gt;1&lt;\/stringProp&gt;&lt;boolProp name=\"ThreadGroup.scheduler\"&gt;false&lt;\/boolProp&gt;&lt;stringProp name=\"ThreadGroup.duration\"&gt;&lt;\/stringProp&gt;&lt;stringProp name=\"ThreadGroup.delay\"&gt;&lt;\/stringProp&gt;&lt;\/ThreadGroup&gt;&lt;hashTree&gt;&lt;HTTPSamplerProxy guiclass=\"HttpTestSampleGui\" testclass=\"HTTPSamplerProxy\" testname=\"HTTP\u8bf7\u6c42\"&gt;&lt;boolProp name=\"HTTPSampler.postBodyRaw\"&gt;true&lt;\/boolProp&gt;&lt;elementProp name=\"HTTPsampler.Arguments\" elementType=\"Arguments\"&gt;&lt;collectionProp name=\"Arguments.arguments\"&gt;&lt;elementProp name=\"\" elementType=\"HTTPArgument\"&gt;&lt;stringProp name=\"Argument.value\"&gt;{&amp;#xd;&amp;quot;orderAmount&amp;quot;: 226,&amp;#xd;&amp;quot;shopNumber&amp;quot;: &amp;quot;1810714735922956666&amp;quot;,&amp;#xd;&amp;quot;goodsList&amp;quot;: &#91;&amp;#xd;\n &nbsp;  {&amp;#xd;&amp;quot;goodsNumber&amp;quot;: &amp;quot;001&amp;quot;,&amp;#xd;&amp;quot;goodsAmount&amp;quot;: 80&amp;#xd;\n &nbsp;  },&amp;#xd;\n &nbsp;  {&amp;#xd;&amp;quot;goodsNumber&amp;quot;: &amp;quot;002&amp;quot;,&amp;#xd;&amp;quot;goodsAmount&amp;quot;: 26&amp;#xd;\n &nbsp;  },&amp;#xd;\n &nbsp;  {&amp;#xd;&amp;quot;goodsNumber&amp;quot;: &amp;quot;003&amp;quot;,&amp;#xd;&amp;quot;goodsAmount&amp;quot;: 100&amp;#xd;\n &nbsp;  }&amp;#xd;\n  ]&amp;#xd;\n}&lt;\/stringProp&gt;&lt;stringProp name=\"Argument.metadata\"&gt;=&lt;\/stringProp&gt;&lt;\/elementProp&gt;&lt;\/collectionProp&gt;&lt;\/elementProp&gt;&lt;stringProp name=\"HTTPSampler.domain\"&gt;127.0.0.1&lt;\/stringProp&gt;&lt;stringProp name=\"HTTPSampler.port\"&gt;10030&lt;\/stringProp&gt;&lt;stringProp name=\"HTTPSampler.path\"&gt;\/api\/settlement\/coupon-query-sync&lt;\/stringProp&gt;&lt;stringProp name=\"HTTPSampler.method\"&gt;POST&lt;\/stringProp&gt;&lt;boolProp name=\"HTTPSampler.follow_redirects\"&gt;true&lt;\/boolProp&gt;&lt;boolProp name=\"HTTPSampler.use_keepalive\"&gt;true&lt;\/boolProp&gt;&lt;\/HTTPSamplerProxy&gt;&lt;hashTree\/&gt;&lt;ResultCollector guiclass=\"ViewResultsFullVisualizer\" testclass=\"ResultCollector\" testname=\"\u67e5\u770b\u7ed3\u679c\u6811\"&gt;&lt;boolProp name=\"ResultCollector.error_logging\"&gt;false&lt;\/boolProp&gt;&lt;objProp&gt;&lt;name&gt;saveConfig&lt;\/name&gt;&lt;value class=\"SampleSaveConfiguration\"&gt;&lt;time&gt;true&lt;\/time&gt;&lt;latency&gt;true&lt;\/latency&gt;&lt;timestamp&gt;true&lt;\/timestamp&gt;&lt;success&gt;true&lt;\/success&gt;&lt;label&gt;true&lt;\/label&gt;&lt;code&gt;true&lt;\/code&gt;&lt;message&gt;true&lt;\/message&gt;&lt;threadName&gt;true&lt;\/threadName&gt;&lt;dataType&gt;true&lt;\/dataType&gt;&lt;encoding&gt;false&lt;\/encoding&gt;&lt;assertions&gt;true&lt;\/assertions&gt;&lt;subresults&gt;true&lt;\/subresults&gt;&lt;responseData&gt;false&lt;\/responseData&gt;&lt;samplerData&gt;false&lt;\/samplerData&gt;&lt;xml&gt;false&lt;\/xml&gt;&lt;fieldNames&gt;true&lt;\/fieldNames&gt;&lt;responseHeaders&gt;false&lt;\/responseHeaders&gt;&lt;requestHeaders&gt;false&lt;\/requestHeaders&gt;&lt;responseDataOnError&gt;false&lt;\/responseDataOnError&gt;&lt;saveAssertionResultsFailureMessage&gt;true&lt;\/saveAssertionResultsFailureMessage&gt;&lt;assertionsResultsToSave&gt;0&lt;\/assertionsResultsToSave&gt;&lt;bytes&gt;true&lt;\/bytes&gt;&lt;sentBytes&gt;true&lt;\/sentBytes&gt;&lt;url&gt;true&lt;\/url&gt;&lt;threadCounts&gt;true&lt;\/threadCounts&gt;&lt;idleTime&gt;true&lt;\/idleTime&gt;&lt;connectTime&gt;true&lt;\/connectTime&gt;&lt;\/value&gt;&lt;\/objProp&gt;&lt;stringProp name=\"filename\"&gt;&lt;\/stringProp&gt;&lt;\/ResultCollector&gt;&lt;hashTree\/&gt;&lt;ResultCollector guiclass=\"StatVisualizer\" testclass=\"ResultCollector\" testname=\"\u805a\u5408\u62a5\u544a\"&gt;&lt;boolProp name=\"ResultCollector.error_logging\"&gt;false&lt;\/boolProp&gt;&lt;objProp&gt;&lt;name&gt;saveConfig&lt;\/name&gt;&lt;value class=\"SampleSaveConfiguration\"&gt;&lt;time&gt;true&lt;\/time&gt;&lt;latency&gt;true&lt;\/latency&gt;&lt;timestamp&gt;true&lt;\/timestamp&gt;&lt;success&gt;true&lt;\/success&gt;&lt;label&gt;true&lt;\/label&gt;&lt;code&gt;true&lt;\/code&gt;&lt;message&gt;true&lt;\/message&gt;&lt;threadName&gt;true&lt;\/threadName&gt;&lt;dataType&gt;true&lt;\/dataType&gt;&lt;encoding&gt;false&lt;\/encoding&gt;&lt;assertions&gt;true&lt;\/assertions&gt;&lt;subresults&gt;true&lt;\/subresults&gt;&lt;responseData&gt;false&lt;\/responseData&gt;&lt;samplerData&gt;false&lt;\/samplerData&gt;&lt;xml&gt;false&lt;\/xml&gt;&lt;fieldNames&gt;true&lt;\/fieldNames&gt;&lt;responseHeaders&gt;false&lt;\/responseHeaders&gt;&lt;requestHeaders&gt;false&lt;\/requestHeaders&gt;&lt;responseDataOnError&gt;false&lt;\/responseDataOnError&gt;&lt;saveAssertionResultsFailureMessage&gt;true&lt;\/saveAssertionResultsFailureMessage&gt;&lt;assertionsResultsToSave&gt;0&lt;\/assertionsResultsToSave&gt;&lt;bytes&gt;true&lt;\/bytes&gt;&lt;sentBytes&gt;true&lt;\/sentBytes&gt;&lt;url&gt;true&lt;\/url&gt;&lt;threadCounts&gt;true&lt;\/threadCounts&gt;&lt;idleTime&gt;true&lt;\/idleTime&gt;&lt;connectTime&gt;true&lt;\/connectTime&gt;&lt;\/value&gt;&lt;\/objProp&gt;&lt;stringProp name=\"filename\"&gt;&lt;\/stringProp&gt;&lt;\/ResultCollector&gt;&lt;hashTree\/&gt;&lt;\/hashTree&gt;&lt;HeaderManager guiclass=\"HeaderPanel\" testclass=\"HeaderManager\" testname=\"HTTP\u4fe1\u606f\u5934\u7ba1\u7406\u5668\"&gt;&lt;collectionProp name=\"HeaderManager.headers\"&gt;&lt;elementProp name=\"\" elementType=\"Header\"&gt;&lt;stringProp name=\"Header.name\"&gt;Content-Type&lt;\/stringProp&gt;&lt;stringProp name=\"Header.value\"&gt;application\/json;charset=UTF-8&lt;\/stringProp&gt;&lt;\/elementProp&gt;&lt;\/collectionProp&gt;&lt;\/HeaderManager&gt;&lt;hashTree\/&gt;&lt;\/hashTree&gt;&lt;\/hashTree&gt;&lt;\/jmeterTestPlan&gt;<\/code><\/pre>\n\n\n\n<p>\u590d\u5236\u5b8c\u6210\u6253\u5f00\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5f00\u59cb\u6d4b\u8bd5\u4e86\u3002\u6267\u884c\u7ebf\u7a0b\u548c\u5faa\u73af\u6b21\u6570\u5927\u5bb6\u591a\u8fdb\u884c\u8c03\u8bd5\uff0c\u76f4\u5230\u9002\u914d\u51fa\u6700\u9002\u5408\u81ea\u5df1\u672c\u5730\u7535\u8111\u7684\uff0c\u8fd9\u6837\u9762\u8bd5\u65f6\u4e5f\u80fd\u548c\u9762\u8bd5\u5b98\u6709\u7406\u6709\u636e\u7684\u8f93\u51fa\u3002<\/p>\n\n\n\n<p>\u622a\u56fe\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/article-images.zsxq.com\/FmfejqeLna2MfjyXDEIDp4hKRHHY\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n\n\n<p>\u6211\u4e3a\u7528\u6237\u9886\u53d6\u4e86\u5341\u51e0\u5f20\u4f18\u60e0\u5238\uff0c\u8fd9\u6837\u53ef\u4ee5\u771f\u5b9e\u6a21\u62df\u51fa\u7528\u6237\u7684\u884c\u4e3a\u4e60\u60ef\uff0c\u907f\u514d\u53ea\u521b\u5efa 1 \u4e2a 2 \u4e2a\u7684\u4f18\u60e0\u5238\uff0c\u6027\u80fd\u4f1a\u597d\u70b9\uff0c\u4f46\u662f\u548c\u771f\u5b9e\u573a\u666f\u6709\u70b9\u51fa\u5165\u3002<\/p>\n\n\n\n<p>Jmeter \u8bf7\u6c42\u538b\u6d4b\u5355\u6b21\u7ed3\u679c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\"code\":\"0\",\"message\":null,\"data\":{\"availableCouponList\":&#91;{\"id\":\"1843290380169883650\",\"target\":1,\"goods\":null,\"type\":2,\"consumeRule\":\"{\\\"termsOfUse\\\":100,\\\"maximumDiscountAmount\\\":20,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"discountRate\\\":\\\"0.6\\\",\\\"validityPeriod\\\":48}\",\"couponAmount\":20},{\"id\":\"1843290379737870337\",\"target\":1,\"goods\":null,\"type\":1,\"consumeRule\":\"{\\\"termsOfUse\\\":100,\\\"maximumDiscountAmount\\\":10,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":48}\",\"couponAmount\":10},{\"id\":\"1843290372464947202\",\"target\":1,\"goods\":null,\"type\":0,\"consumeRule\":\"{\\\"maximumDiscountAmount\\\":10,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":48}\",\"couponAmount\":10},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843870627484684290\",\"target\":1,\"goods\":\"\",\"type\":0,\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\"couponAmount\":3},{\"id\":\"1843290379234553857\",\"target\":0,\"goods\":\"001\",\"type\":0,\"consumeRule\":\"{\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":48}\",\"couponAmount\":3}],\"notAvailableCouponList\":&#91;{\"id\":\"1843290380593508353\",\"target\":1,\"goods\":null,\"type\":2,\"consumeRule\":\"{\\\"termsOfUse\\\":300,\\\"maximumDiscountAmount\\\":40,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"discountRate\\\":\\\"0.6\\\",\\\"validityPeriod\\\":48}\",\"couponAmount\":null}]},\"requestId\":null,\"success\":true,\"fail\":false}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u7b2c32\u5c0f\u8282\uff1a\u538b\u6d4b\u725b\u5238\u5e76\u884c\u67e5\u8be2\u53ef\u7528\/\u4e0d\u53ef\u7528\u4f18\u60e0\u5238\u529f\u80fd<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u6ce8\u610f\u4e8b\u9879<\/h2>\n\n\n\n<p>\u4ec0\u4e48\u662f QPS\uff1f\u4ec0\u4e48\u662f TPS\uff1f\u9879\u76ee\u5e76\u53d1\u91cf\u6307\u7684\u662f QPS \u8fd8\u662f TPS\uff1f\u8be6\u60c5\u67e5\u770b\u4e0a\u4e00\u7ae0\u8282\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u73af\u5883<\/h2>\n\n\n\n<p>\u8f6f\u4ef6\u67b6\u6784\u4e2d\uff0c\u7cfb\u7edf\u8bbe\u8ba1\u662f\u4e00\u90e8\u5206\uff0c\u57fa\u7840\u8bbe\u65bd\u662f\u4e00\u90e8\u5206\u3002\u7cfb\u7edf\u8bbe\u8ba1\u4e00\u822c\u5c31\u662f\u770b\u6211\u4eec\u7684\u4ee3\u7801\u548c\u67b6\u6784\u662f\u5982\u4f55\u8fd0\u4f5c\u7684\uff0c\u6bd4\u5982\u4ee3\u7801\u4e2d\u8fd0\u884c\u4e86\u5148\u67e5\u8be2\u7f13\u5b58 Redis \u518d\u67e5\u8be2\u6570\u636e\u5e93 MySQL\uff0c\u9632\u6b62\u7f13\u5b58\u51fb\u7a7f\u548c\u7a7f\u900f\u7b49\u8bbe\u8ba1\u3002\u57fa\u7840\u8bbe\u65bd\u6307\u7684\u662f\u90e8\u7f72\u7684\u89c4\u683c\uff0c\u6bd4\u5982 Redis \u4ec0\u4e48\u914d\u7f6e\u3001MySQL \u4ec0\u4e48\u914d\u7f6e\u3001\u90e8\u7f72\u4e86\u51e0\u53f0\u725b\u5238 oneCoupon \u670d\u52a1\u4ee5\u53ca\u6bcf\u53f0\u90e8\u7f72\u673a\u5668\u7684\u914d\u7f6e\u662f\u591a\u5c11\u3002<\/p>\n\n\n\n<p>\u5728\u548c\u9762\u8bd5\u5b98\u8bf4\u65f6\uff0c\u4e00\u5b9a\u8981\u5148\u660e\u786e\u81ea\u5df1\u7684\u90e8\u7f72\u914d\u7f6e\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728\u81ea\u5df1\u672c\u5730\u7535\u8111\u4e0a\u8fdb\u884c\u7684\u6d4b\u8bd5\uff0c\u7535\u8111\u914d\u7f6e MacBook M2 Max 12C64G\u3002<\/li>\n\n\n\n<li>\u542f\u52a8\u4e86\u4e00\u4e2a\u725b\u5238 SettlementApplication \u7ed3\u7b97\u670d\u52a1\u3002<\/li>\n\n\n\n<li>\u901a\u8fc7 Jmeter \u914d\u7f6e\u4e86 80 \u4e2a\u7ebf\u7a0b\u5faa\u73af 1000 \u6b21\u538b\u6d4b\uff0c\u6700\u7ec8\u541e\u5410\u91cf 5707\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u7ed3\u679c<\/h2>\n\n\n\n<p>Jmeter \u6211\u914d\u7f6e\u4e86 80 \u4e2a\u7ebf\u7a0b\uff0c\u5faa\u73af\u6b21\u6570\u8bbe\u7f6e\u4e86 1000\uff0c\u610f\u5473\u7740\u6709 80 \u4e2a\u7ebf\u7a0b\u4f1a\u8c03\u7528 1000 \u6b21\u725b\u5238\u63a5\u53e3\uff0c\u6700\u7ec8\u4f1a\u6a21\u62df\u4ea7\u751f 80000 \u6b21\u7528\u6237\u8bf7\u6c42\u3002<\/p>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u8bbe\u7f6e 80 \u4e2a\u7ebf\u7a0b\uff1f\u56e0\u4e3a\u6bcf\u53f0\u7535\u8111\u7684 CPU \u6027\u80fd\u4e0d\u540c\uff0c\u8fd9\u4e2a\u6570\u636e\u9700\u8981\u5927\u5bb6\u4e0d\u65ad\u538b\u6d4b\u627e\u5230\u6700\u4f18\u7ed3\u679c\u3002\u5176\u5b9e\u518d\u5f80\u4e0a\u63d0\u5347\u7ebf\u7a0b\u6570\u8fd8\u80fd\u63d0\u9ad8\u70b9\u541e\u5410\u91cf\uff0c\u4e0d\u8fc7\u5e76\u4e0d\u5927\uff0c\u6700\u7ec8\u6211\u5c31\u4ee5 80 \u4e3a\u7ed3\u8bba\u4e86\u3002<\/p>\n\n\n\n<p>\u4ee5\u6211\u7684\u7535\u8111\u914d\u7f6e\u538b\u6d4b\uff0c\u7ed3\u679c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/article-images.zsxq.com\/FrSf1O5b6R9S6GZ5vUkrJipaQ7_t\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u5e76\u884c\u7528\u4e86\u7ebf\u7a0b\u6c60\u7684\u63a5\u53e3\uff0c\u541e\u5410\u91cf\u53cd\u800c\u4e0d\u5982\u540c\u6b65\u67e5\u8be2\u7684\u5462\uff1f\u5728\u8fd9\u91cc\u6211\u68b3\u7406\u4e86\u51e0\u4e2a\u539f\u56e0\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4efb\u52a1\u5207\u6362\u548c\u7ebf\u7a0b\u6c60\u4e0a\u4e0b\u6587\u5207\u6362\u5f00\u9500<\/strong>\uff1a\u5728\u591a\u7ebf\u7a0b\u6267\u884c\u4e2d\uff0c\u6bcf\u4e2a <code>CompletableFuture<\/code> \u90fd\u4f1a\u88ab\u5206\u914d\u5230\u4e00\u4e2a\u7ebf\u7a0b\u53bb\u6267\u884c\uff0c\u800c\u7ebf\u7a0b\u4e0a\u4e0b\u6587\u5207\u6362\u548c\u4efb\u52a1\u8c03\u5ea6\u662f\u6709\u5f00\u9500\u7684\u3002\u5f53\u4efb\u52a1\u975e\u5e38\u7ec6\u7c92\u5ea6\uff08\u4f8b\u5982\u6bcf\u4e2a <code>forEach<\/code> \u4e2d\u7684\u64cd\u4f5c\uff09\u65f6\uff0c\u8fd9\u79cd\u5f00\u9500\u4f1a\u5360\u636e\u8f83\u5927\u7684\u6bd4\u4f8b\uff0c\u4ece\u800c\u62b5\u6d88\u6389\u591a\u7ebf\u7a0b\u5e26\u6765\u7684\u6027\u80fd\u63d0\u5347\u3002<\/li>\n\n\n\n<li><strong>\u7ebf\u7a0b\u8d44\u6e90\u7ade\u4e89\u5bfc\u81f4\u6027\u80fd\u4e0b\u964d<\/strong>\uff1a\u5f53 <code>ExecutorService<\/code> \u7ebf\u7a0b\u6c60\u4e2d\u7684\u7ebf\u7a0b\u6570\u8fc7\u591a\u65f6\uff0c\u53ef\u80fd\u5bfc\u81f4 CPU \u8fc7\u8f7d\uff0c\u7ebf\u7a0b\u4e4b\u95f4\u4e89\u62a2 CPU \u8d44\u6e90\uff0c\u9891\u7e41\u4e0a\u4e0b\u6587\u5207\u6362\u53cd\u800c\u4f7f\u6267\u884c\u6548\u7387\u4e0b\u964d\u3002<\/li>\n\n\n\n<li><strong>\u5171\u4eab\u8d44\u6e90\u8bbf\u95ee\u65f6\u7684\u9501\u7ade\u4e89<\/strong>\uff1a\u5728\u5e76\u884c\u5904\u7406\u4e2d\uff0c\u5982\u679c\u4e0d\u540c\u7ebf\u7a0b\u8bbf\u95ee\u540c\u4e00\u4e2a\u5171\u4eab\u8d44\u6e90\uff08\u4f8b\u5982 <code>availableCouponList<\/code> \u548c <code>notAvailableCouponList<\/code>\uff09\u65f6\uff0c\u4f1a\u5b58\u5728\u9501\u7ade\u4e89\u3002\u5373\u4f7f\u4f7f\u7528\u4e86\u7ebf\u7a0b\u5b89\u5168\u7684\u96c6\u5408\uff08<code>Collections.synchronizedList<\/code>\uff09\uff0c\u5728\u9891\u7e41\u7684 <code>add<\/code> \u64cd\u4f5c\u4e2d\u4ecd\u7136\u4f1a\u6709\u540c\u6b65\u9501\u7684\u4e89\u62a2\uff0c\u5bfc\u81f4\u6574\u4f53\u6027\u80fd\u4e0b\u964d\u3002<\/li>\n\n\n\n<li><strong>\u975e I\/O \u5bc6\u96c6\u578b\u4efb\u52a1\u672c\u8eab\u4e0d\u9002\u5408\u591a\u7ebf\u7a0b<\/strong>\uff1a\u5904\u7406\u903b\u8f91\uff08\u4f8b\u5982 <code>handleCouponLogic<\/code>\uff09\u672c\u8d28\u4e0a\u662f\u7b80\u5355\u7684\u5bf9\u8c61\u8f6c\u6362\u548c\u6761\u4ef6\u5224\u65ad\uff0c\u5e76\u4e0d\u662f CPU \u5bc6\u96c6\u578b\u6216\u8005\u590d\u6742\u7684 I\/O \u5904\u7406\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u591a\u7ebf\u7a0b\u5206\u89e3\u4efb\u52a1\u5e76\u4e0d\u80fd\u663e\u8457\u63d0\u5347\u6548\u7387\uff0c\u53cd\u800c\u56e0\u7ebf\u7a0b\u5207\u6362\u5e26\u6765\u66f4\u591a\u5f00\u9500\uff0c\u5bfc\u81f4\u591a\u7ebf\u7a0b\u7248\u672c\u4e0d\u5982\u5355\u7ebf\u7a0b\u7248\u672c\u5feb\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u90a3\u4ec0\u4e48\u573a\u666f\u4e0b\u9002\u5408\u7528\u7ebf\u7a0b\u6c60\u5e76\u53d1\u7f16\u7a0b\uff1f<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>I\/O \u5bc6\u96c6\u578b\u4efb\u52a1<\/strong>\uff1aI\/O \u5bc6\u96c6\u578b\u4efb\u52a1\u901a\u5e38\u5305\u542b\u5927\u91cf\u7684\u7b49\u5f85\u65f6\u95f4\uff0c\u6bd4\u5982\u6587\u4ef6\u8bfb\u5199\u3001\u7f51\u7edc\u8bf7\u6c42\u3001\u6570\u636e\u5e93\u64cd\u4f5c\u7b49\u3002\u7531\u4e8e I\/O \u64cd\u4f5c\uff08\u4f8b\u5982\u78c1\u76d8\u8bfb\u5199\u3001\u7f51\u7edc\u4f20\u8f93\uff09\u5728 CPU \u4e0a\u5904\u4e8e\u963b\u585e\u72b6\u6001\uff0c\u56e0\u6b64\u6b64\u7c7b\u4efb\u52a1\u975e\u5e38\u9002\u5408\u4f7f\u7528\u591a\u7ebf\u7a0b\u6a21\u578b\u6765\u63d0\u9ad8\u541e\u5410\u91cf\u3002\u591a\u4e2a\u7ebf\u7a0b\u53ef\u4ee5\u5728 I\/O \u7b49\u5f85\u65f6\u5e76\u884c\u6267\u884c\uff0c\u4ece\u800c\u5145\u5206\u5229\u7528 CPU \u7a7a\u95f2\u65f6\u95f4\u3002\u6bd4\u5982\uff1a\u6570\u636e\u5e93\u67e5\u8be2\u64cd\u4f5c\uff08\u5982\u591a\u6570\u636e\u5e93\u5e76\u884c\u67e5\u8be2\uff09\u3001\u6587\u4ef6\u5904\u7406\uff08\u6587\u4ef6\u4e0a\u4f20\u3001\u4e0b\u8f7d\u3001\u5927\u6587\u4ef6\u7684\u8bfb\u5199\uff09\u3001\u7f51\u7edc\u8c03\u7528\uff08HTTP \u8bf7\u6c42\u3001RPC \u8c03\u7528\u3001Socket \u901a\u4fe1\uff09\u7b49\u3002<\/li>\n\n\n\n<li><strong>CPU \u5bc6\u96c6\u578b\u4efb\u52a1<\/strong>\uff1aCPU \u5bc6\u96c6\u578b\u4efb\u52a1\u901a\u5e38\u662f\u4e00\u4e9b\u9700\u8981\u5927\u91cf\u8ba1\u7b97\u7684\u4efb\u52a1\uff0c\u6bd4\u5982\u590d\u6742\u7684\u6570\u5b66\u8fd0\u7b97\u3001\u673a\u5668\u5b66\u4e60\u6a21\u578b\u8bad\u7ec3\u3001\u56fe\u50cf\u5904\u7406\u7b49\u3002\u5bf9\u4e8e\u8fd9\u7c7b\u4efb\u52a1\uff0c\u53ef\u4ee5\u4f7f\u7528\u7ebf\u7a0b\u6c60\u5c06\u4efb\u52a1\u5206\u53d1\u5230\u4e0d\u540c\u7684 CPU \u6838\u5fc3\u6267\u884c\uff0c\u4ece\u800c\u5145\u5206\u5229\u7528\u591a\u6838 CPU \u7684\u8ba1\u7b97\u80fd\u529b\u3002\u6bd4\u5982\uff1a\u5927\u91cf\u590d\u6742\u8ba1\u7b97\uff08\u5982\u6392\u5e8f\u3001\u6570\u636e\u5206\u6790\u7b49\uff09\u7b49\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"jmeter\">Jmeter \u538b\u6d4b\u811a\u672c<\/h2>\n\n\n\n<p>\u5c06\u4ee5\u4e0b\u4ee3\u7801\u590d\u5236\u5230\u6587\u672c\u7f16\u8f91\u5668\u4e2d\uff0c\u4fdd\u5b58\u4e3a oneCouponAsyncListQueryCoupons.jmx \u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 Jmeter \u6253\u5f00\u5373\u53ef\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;jmeterTestPlan version=\"1.2\" properties=\"5.0\" jmeter=\"5.6\"&gt;\n &nbsp;&lt;hashTree&gt;\n &nbsp; &nbsp;&lt;TestPlan guiclass=\"TestPlanGui\" testclass=\"TestPlan\" testname=\"\u725b\u5238\u5e76\u884c\u67e5\u8be2\u4f18\u60e0\u5238\u5217\u8868\u6d4b\u8bd5\u8ba1\u5212\"&gt;\n &nbsp; &nbsp; &nbsp;&lt;elementProp name=\"TestPlan.user_defined_variables\" elementType=\"Arguments\" guiclass=\"ArgumentsPanel\" testclass=\"Arguments\" testname=\"\u7528\u6237\u5b9a\u4e49\u7684\u53d8\u91cf\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;collectionProp name=\"Arguments.arguments\"\/&gt;\n &nbsp; &nbsp; &nbsp;&lt;\/elementProp&gt;\n &nbsp; &nbsp;&lt;\/TestPlan&gt;\n &nbsp; &nbsp;&lt;hashTree&gt;\n &nbsp; &nbsp; &nbsp;&lt;ThreadGroup guiclass=\"ThreadGroupGui\" testclass=\"ThreadGroup\" testname=\"\u7ebf\u7a0b\u7ec4\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;elementProp name=\"ThreadGroup.main_controller\" elementType=\"LoopController\" guiclass=\"LoopControlPanel\" testclass=\"LoopController\" testname=\"\u5faa\u73af\u63a7\u5236\u5668\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"LoopController.loops\"&gt;1000&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/elementProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"ThreadGroup.num_threads\"&gt;80&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"ThreadGroup.ramp_time\"&gt;1&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;boolProp name=\"ThreadGroup.scheduler\"&gt;false&lt;\/boolProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"ThreadGroup.duration\"&gt;&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"ThreadGroup.delay\"&gt;&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp;&lt;\/ThreadGroup&gt;\n &nbsp; &nbsp; &nbsp;&lt;hashTree&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;HTTPSamplerProxy guiclass=\"HttpTestSampleGui\" testclass=\"HTTPSamplerProxy\" testname=\"HTTP\u8bf7\u6c42\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;boolProp name=\"HTTPSampler.postBodyRaw\"&gt;true&lt;\/boolProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;elementProp name=\"HTTPsampler.Arguments\" elementType=\"Arguments\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;collectionProp name=\"Arguments.arguments\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;elementProp name=\"\" elementType=\"HTTPArgument\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"Argument.value\"&gt;{&amp;#xd;\n &nbsp;&amp;quot;orderAmount&amp;quot;: 226,&amp;#xd;\n &nbsp;&amp;quot;shopNumber&amp;quot;: &amp;quot;1810714735922956666&amp;quot;,&amp;#xd;\n &nbsp;&amp;quot;goodsList&amp;quot;: &#91;&amp;#xd;\n &nbsp;  {&amp;#xd;\n &nbsp; &nbsp; &nbsp;&amp;quot;goodsNumber&amp;quot;: &amp;quot;001&amp;quot;,&amp;#xd;\n &nbsp; &nbsp; &nbsp;&amp;quot;goodsAmount&amp;quot;: 80&amp;#xd;\n &nbsp;  },&amp;#xd;\n &nbsp;  {&amp;#xd;\n &nbsp; &nbsp; &nbsp;&amp;quot;goodsNumber&amp;quot;: &amp;quot;002&amp;quot;,&amp;#xd;\n &nbsp; &nbsp; &nbsp;&amp;quot;goodsAmount&amp;quot;: 26&amp;#xd;\n &nbsp;  },&amp;#xd;\n &nbsp;  {&amp;#xd;\n &nbsp; &nbsp; &nbsp;&amp;quot;goodsNumber&amp;quot;: &amp;quot;003&amp;quot;,&amp;#xd;\n &nbsp; &nbsp; &nbsp;&amp;quot;goodsAmount&amp;quot;: 100&amp;#xd;\n &nbsp;  }&amp;#xd;\n  ]&amp;#xd;\n}&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"Argument.metadata\"&gt;=&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/elementProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/collectionProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/elementProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"HTTPSampler.domain\"&gt;127.0.0.1&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"HTTPSampler.port\"&gt;10030&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"HTTPSampler.path\"&gt;\/api\/settlement\/coupon-query&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"HTTPSampler.method\"&gt;POST&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;boolProp name=\"HTTPSampler.follow_redirects\"&gt;true&lt;\/boolProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;boolProp name=\"HTTPSampler.use_keepalive\"&gt;true&lt;\/boolProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/HTTPSamplerProxy&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;hashTree\/&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;ResultCollector guiclass=\"ViewResultsFullVisualizer\" testclass=\"ResultCollector\" testname=\"\u67e5\u770b\u7ed3\u679c\u6811\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;boolProp name=\"ResultCollector.error_logging\"&gt;false&lt;\/boolProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;objProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;name&gt;saveConfig&lt;\/name&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;value class=\"SampleSaveConfiguration\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;time&gt;true&lt;\/time&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;latency&gt;true&lt;\/latency&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;timestamp&gt;true&lt;\/timestamp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;success&gt;true&lt;\/success&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;label&gt;true&lt;\/label&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;code&gt;true&lt;\/code&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;message&gt;true&lt;\/message&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;threadName&gt;true&lt;\/threadName&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;dataType&gt;true&lt;\/dataType&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;encoding&gt;false&lt;\/encoding&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;assertions&gt;true&lt;\/assertions&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;subresults&gt;true&lt;\/subresults&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;responseData&gt;false&lt;\/responseData&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;samplerData&gt;false&lt;\/samplerData&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xml&gt;false&lt;\/xml&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;fieldNames&gt;true&lt;\/fieldNames&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;responseHeaders&gt;false&lt;\/responseHeaders&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;requestHeaders&gt;false&lt;\/requestHeaders&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;responseDataOnError&gt;false&lt;\/responseDataOnError&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;saveAssertionResultsFailureMessage&gt;true&lt;\/saveAssertionResultsFailureMessage&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;assertionsResultsToSave&gt;0&lt;\/assertionsResultsToSave&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;bytes&gt;true&lt;\/bytes&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;sentBytes&gt;true&lt;\/sentBytes&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;url&gt;true&lt;\/url&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;threadCounts&gt;true&lt;\/threadCounts&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;idleTime&gt;true&lt;\/idleTime&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;connectTime&gt;true&lt;\/connectTime&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/value&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/objProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"filename\"&gt;&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/ResultCollector&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;hashTree\/&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;ResultCollector guiclass=\"StatVisualizer\" testclass=\"ResultCollector\" testname=\"\u805a\u5408\u62a5\u544a\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;boolProp name=\"ResultCollector.error_logging\"&gt;false&lt;\/boolProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;objProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;name&gt;saveConfig&lt;\/name&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;value class=\"SampleSaveConfiguration\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;time&gt;true&lt;\/time&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;latency&gt;true&lt;\/latency&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;timestamp&gt;true&lt;\/timestamp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;success&gt;true&lt;\/success&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;label&gt;true&lt;\/label&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;code&gt;true&lt;\/code&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;message&gt;true&lt;\/message&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;threadName&gt;true&lt;\/threadName&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;dataType&gt;true&lt;\/dataType&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;encoding&gt;false&lt;\/encoding&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;assertions&gt;true&lt;\/assertions&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;subresults&gt;true&lt;\/subresults&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;responseData&gt;false&lt;\/responseData&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;samplerData&gt;false&lt;\/samplerData&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xml&gt;false&lt;\/xml&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;fieldNames&gt;true&lt;\/fieldNames&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;responseHeaders&gt;false&lt;\/responseHeaders&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;requestHeaders&gt;false&lt;\/requestHeaders&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;responseDataOnError&gt;false&lt;\/responseDataOnError&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;saveAssertionResultsFailureMessage&gt;true&lt;\/saveAssertionResultsFailureMessage&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;assertionsResultsToSave&gt;0&lt;\/assertionsResultsToSave&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;bytes&gt;true&lt;\/bytes&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;sentBytes&gt;true&lt;\/sentBytes&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;url&gt;true&lt;\/url&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;threadCounts&gt;true&lt;\/threadCounts&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;idleTime&gt;true&lt;\/idleTime&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;connectTime&gt;true&lt;\/connectTime&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/value&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/objProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"filename\"&gt;&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/ResultCollector&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;hashTree\/&gt;\n &nbsp; &nbsp; &nbsp;&lt;\/hashTree&gt;\n &nbsp; &nbsp; &nbsp;&lt;HeaderManager guiclass=\"HeaderPanel\" testclass=\"HeaderManager\" testname=\"HTTP\u4fe1\u606f\u5934\u7ba1\u7406\u5668\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;collectionProp name=\"HeaderManager.headers\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;elementProp name=\"\" elementType=\"Header\"&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"Header.name\"&gt;Content-Type&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;stringProp name=\"Header.value\"&gt;application\/json;charset=UTF-8&lt;\/stringProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/elementProp&gt;\n &nbsp; &nbsp; &nbsp; &nbsp;&lt;\/collectionProp&gt;\n &nbsp; &nbsp; &nbsp;&lt;\/HeaderManager&gt;\n &nbsp; &nbsp; &nbsp;&lt;hashTree\/&gt;\n &nbsp; &nbsp;&lt;\/hashTree&gt;\n &nbsp;&lt;\/hashTree&gt;\n&lt;\/jmeterTestPlan&gt;\n\u200b<\/code><\/pre>\n\n\n\n<p>\u590d\u5236\u5b8c\u6210\u6253\u5f00\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5f00\u59cb\u6d4b\u8bd5\u4e86\u3002\u6267\u884c\u7ebf\u7a0b\u548c\u5faa\u73af\u6b21\u6570\u5927\u5bb6\u591a\u8fdb\u884c\u8c03\u8bd5\uff0c\u76f4\u5230\u9002\u914d\u51fa\u6700\u9002\u5408\u81ea\u5df1\u672c\u5730\u7535\u8111\u7684\uff0c\u8fd9\u6837\u9762\u8bd5\u65f6\u4e5f\u80fd\u548c\u9762\u8bd5\u5b98\u6709\u7406\u6709\u636e\u7684\u8f93\u51fa\u3002<\/p>\n\n\n\n<p>\u6211\u4e3a\u7528\u6237\u9886\u53d6\u4e86\u5341\u51e0\u5f20\u4f18\u60e0\u5238\uff0c\u8fd9\u6837\u53ef\u4ee5\u771f\u5b9e\u6a21\u62df\u51fa\u7528\u6237\u7684\u884c\u4e3a\u4e60\u60ef\uff0c\u907f\u514d\u53ea\u521b\u5efa 1 \u4e2a 2 \u4e2a\u7684\u4f18\u60e0\u5238\uff0c\u6027\u80fd\u4f1a\u597d\u70b9\uff0c\u4f46\u662f\u548c\u771f\u5b9e\u573a\u666f\u6709\u70b9\u51fa\u5165\u3002<\/p>\n\n\n\n<p>Jmeter \u8bf7\u6c42\u538b\u6d4b\u5355\u6b21\u7ed3\u679c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n &nbsp; &nbsp;\"code\": \"0\",\n &nbsp; &nbsp;\"message\": null,\n &nbsp; &nbsp;\"data\": {\n &nbsp; &nbsp; &nbsp; &nbsp;\"availableCouponList\": &#91;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843290380169883650\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": null,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 2,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":100,\\\"maximumDiscountAmount\\\":20,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"discountRate\\\":\\\"0.6\\\",\\\"validityPeriod\\\":48}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 20\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843290379737870337\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": null,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":100,\\\"maximumDiscountAmount\\\":10,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":48}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 10\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843290372464947202\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": null,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"maximumDiscountAmount\\\":10,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":48}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 10\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843870627484684290\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  },\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843290379234553857\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": \"001\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 0,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":48}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": 3\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }\n &nbsp; &nbsp; &nbsp;  ],\n &nbsp; &nbsp; &nbsp; &nbsp;\"notAvailableCouponList\": &#91;\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  {\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"id\": \"1843290380593508353\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"target\": 1,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"goods\": null,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"type\": 2,\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"consumeRule\": \"{\\\"termsOfUse\\\":300,\\\"maximumDiscountAmount\\\":40,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"discountRate\\\":\\\"0.6\\\",\\\"validityPeriod\\\":48}\",\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"couponAmount\": null\n &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }\n &nbsp; &nbsp; &nbsp;  ]\n &nbsp;  },\n &nbsp; &nbsp;\"requestId\": null,\n &nbsp; &nbsp;\"success\": true,\n &nbsp; &nbsp;\"fail\": false\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u7b2c33\u5c0f\u8282\uff1a\u538b\u6d4b\u725b\u5238\u4f18\u60e0\u5238\u79d2\u6740\u5238\u6027\u80fd<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u6ce8\u610f\u4e8b\u9879<\/h2>\n\n\n\n<p>\u4ec0\u4e48\u662f QPS\uff1f\u4ec0\u4e48\u662f TPS\uff1f\u9879\u76ee\u5e76\u53d1\u91cf\u6307\u7684\u662f QPS \u8fd8\u662f TPS\uff1f\u8be6\u60c5\u67e5\u770b\u538b\u6d4b\u7b2c\u4e00\u7ae0\u8282\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u73af\u5883<\/h2>\n\n\n\n<p>\u8f6f\u4ef6\u67b6\u6784\u4e2d\uff0c\u7cfb\u7edf\u8bbe\u8ba1\u662f\u4e00\u90e8\u5206\uff0c\u57fa\u7840\u8bbe\u65bd\u662f\u4e00\u90e8\u5206\u3002\u7cfb\u7edf\u8bbe\u8ba1\u4e00\u822c\u5c31\u662f\u770b\u6211\u4eec\u7684\u4ee3\u7801\u548c\u67b6\u6784\u662f\u5982\u4f55\u8fd0\u4f5c\u7684\uff0c\u6bd4\u5982\u4ee3\u7801\u4e2d\u8fd0\u884c\u4e86\u5148\u67e5\u8be2\u7f13\u5b58 Redis \u518d\u67e5\u8be2\u6570\u636e\u5e93 MySQL\uff0c\u9632\u6b62\u7f13\u5b58\u51fb\u7a7f\u548c\u7a7f\u900f\u7b49\u8bbe\u8ba1\u3002\u57fa\u7840\u8bbe\u65bd\u6307\u7684\u662f\u90e8\u7f72\u7684\u89c4\u683c\uff0c\u6bd4\u5982 Redis \u4ec0\u4e48\u914d\u7f6e\u3001MySQL \u4ec0\u4e48\u914d\u7f6e\u3001\u90e8\u7f72\u4e86\u51e0\u53f0\u725b\u5238 oneCoupon \u670d\u52a1\u4ee5\u53ca\u6bcf\u53f0\u90e8\u7f72\u673a\u5668\u7684\u914d\u7f6e\u662f\u591a\u5c11\u3002<\/p>\n\n\n\n<p>\u5728\u548c\u9762\u8bd5\u5b98\u8bf4\u65f6\uff0c\u4e00\u5b9a\u8981\u5148\u660e\u786e\u81ea\u5df1\u7684\u90e8\u7f72\u914d\u7f6e\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728\u81ea\u5df1\u672c\u5730\u7535\u8111\u4e0a\u8fdb\u884c\u7684\u6d4b\u8bd5\uff0c\u7535\u8111\u914d\u7f6e MacBook M2 Max 12C64G\u3002<\/li>\n\n\n\n<li>\u542f\u52a8\u4e86\u4e00\u4e2a\u725b\u5238 EngineApplication \u7ed3\u7b97\u670d\u52a1\u3002<\/li>\n\n\n\n<li>\u901a\u8fc7 Jmeter \u914d\u7f6e\u4e86 100 \u4e2a\u7ebf\u7a0b\u5faa\u73af 400 \u6b21\u538b\u6d4b\uff0c\u6700\u7ec8\u541e\u5410\u91cf 2588\u3002<\/li>\n<\/ul>\n\n\n\n<p>RocketMQ \u6211\u7528\u81ea\u5df1\u7535\u8111\u8dd1\u7684 Docker\uff0c\u7406\u8bba\u4e0a\u5982\u679c\u4ee3\u7801\u548c RocketMQ \u8dd1\u5728\u540c\u4e00\u53f0\u670d\u52a1\u5668\u6216\u8005\u540c\u4e00\u4e2a\u7f51\u6bb5\u4e0b\u5e94\u8be5\u4f1a\u66f4\u5feb\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u7ed3\u679c<\/h2>\n\n\n\n<p>\u79d2\u6740\u6709\u4e24\u4e2a\u63a5\u53e3\uff0c\u4e00\u4e2a\u662f\u4f9d\u8d56\u6570\u636e\u5e93\u505a\u5b9e\u65f6\u6263\u51cf\uff0c\u8fd9\u79cd\u7a33\u5b9a\u6027\u8f83\u9ad8\uff0c\u4f46\u662f\u6027\u80fd\u8ddf\u4e0d\u4e0a\uff1b\u4e00\u4e2a\u662f\u57fa\u4e8e\u7f13\u5b58\u548c\u6d88\u606f\u961f\u5217\uff0c\u6781\u7aef\u60c5\u51b5\u4e0b\u53ef\u80fd\u4f1a\u6709\u6570\u636e\u95ee\u9898\uff0c\u4f46\u662f\u4ece\u4f18\u60e0\u5238\u89d2\u5ea6\u4e0a\u53ef\u4ee5\u5bb9\u5fcd\u3002\u6240\u4ee5\uff0c\u6211\u4eec\u4e0b\u9762\u538b\u6d4b\u7ed3\u679c\u4ee5\u540e\u8005\u5c55\u5f00\u3002<\/p>\n\n\n\n<p>Jmeter \u6211\u914d\u7f6e\u4e86 100 \u4e2a\u7ebf\u7a0b\uff0c\u5faa\u73af\u6b21\u6570\u8bbe\u7f6e\u4e86 400\uff0c\u610f\u5473\u7740\u6709 100 \u4e2a\u7ebf\u7a0b\u4f1a\u8c03\u7528 400 \u6b21\u725b\u5238\u63a5\u53e3\uff0c\u6700\u7ec8\u4f1a\u6a21\u62df\u4ea7\u751f 40000 \u6b21\u7528\u6237\u8bf7\u6c42\u3002<\/p>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u8bbe\u7f6e 100 \u4e2a\u7ebf\u7a0b\uff1f\u56e0\u4e3a\u6bcf\u53f0\u7535\u8111\u7684 CPU \u6027\u80fd\u4e0d\u540c\uff0c\u8fd9\u4e2a\u6570\u636e\u9700\u8981\u5927\u5bb6\u4e0d\u65ad\u538b\u6d4b\u627e\u5230\u6700\u4f18\u7ed3\u679c\u3002\u5176\u5b9e\u518d\u5f80\u4e0a\u63d0\u5347\u7ebf\u7a0b\u6570\u8fd8\u80fd\u63d0\u9ad8\u70b9\u541e\u5410\u91cf\uff0c\u4e0d\u8fc7\u5e76\u4e0d\u5927\uff0c\u6700\u7ec8\u6211\u5c31\u4ee5 100 \u4e3a\u7ed3\u8bba\u4e86\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>\u56e0\u4e3a\u6211\u4eec\u8fd9\u4e2a\u63a5\u53e3\u5927\u90e8\u5206\u662f\u7f51\u7edc IO\uff0c\u76f8\u6bd4\u4e8e\u524d\u4e24\u6b21\u538b\u6d4b\uff0c\u5927\u90e8\u5206\u7ebf\u7a0b\u90fd\u5728\u7b49\u5f85 IO\uff0cCPU \u538b\u529b\u4f1a\u5c0f\u70b9\u3002<\/em><\/p>\n<\/blockquote>\n\n\n\n<p>\u4ee5\u6211\u7684\u7535\u8111\u914d\u7f6e\u538b\u6d4b\uff0c\u7ed3\u679c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/article-images.zsxq.com\/FrQgXKBUnsDUJ93HHrql6sNXZzgJ\" alt=\"image.png\" title=\"\"\/><\/figure>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">\u4ee3\u7801\u4e34\u65f6\u53d8\u66f4<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1\">1. \u521b\u5efa\u4f18\u60e0\u5238\u6a21\u677f<\/h3>\n\n\n\n<p>\u6211\u4eec\u5728\u521b\u5efa\u4f18\u60e0\u5238\u6a21\u677f\u65f6\uff0c\u5e93\u5b58\u548c\u5355\u7528\u6237\u9650\u9886\u90fd\u8bbe\u7f6e\u9ad8\u4e00\u4e9b\uff0c\u907f\u514d\u56e0\u4e3a\u4f18\u60e0\u5238\u6ca1\u6709\u5e93\u5b58\u6216\u8005\u88ab\u9650\u9886\u89c4\u5219\u7ed9\u6821\u9a8c\u5f02\u5e38\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\"name\":\"\u7528\u6237\u4e0b\u5355\u6ee110\u51cf3\u7279\u5927\u4f18\u60e0\",\"source\":0,\"target\":1,\"goods\":\"\",\"type\":0,\"validStartTime\":\"2024-09-21 19:33:00\",\"validEndTime\":\"2025-09-24 18:40:00\",\"stock\":20000000,\"receiveRule\":\"{\\\"limitPerPerson\\\":20000000,\\\"usageInstructions\\\":\\\"3\\\"}\",\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\"}<\/code><\/pre>\n\n\n\n<p>\u5927\u5bb6\u8bb0\u5f97\u538b\u5b8c\u4e00\u6b21\u4e4b\u540e\u521b\u5efa\u4e2a\u65b0\u6a21\u7248\u66ff\u6362\u4e0b\u8fd9\u91cc\uff0c\u907f\u514d\u89e6\u53d1\u9650\u9886\u89c4\u5219\u3002\u5982\u679c\u89e6\u53d1\u9650\u9886\u89c4\u5219\uff0c\u4f60\u4f1a\u53d1\u73b0\u541e\u5410\u91cf\u600e\u4e48\u4e00\u6b21\u6027\u63d0\u5347\u8fd9\u4e48\u591a \u54c8\u54c8\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/article-images.zsxq.com\/FhvJROGE5y5o4d1m-LPd2BgP93Ey\" alt=\"image.png\" title=\"\"\/><\/figure>\n\n\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2\">2. \u4fee\u6539\u9650\u9886\u89c4\u5219<\/h3>\n\n\n\n<p>\u5c06\u4e4b\u524d stock_decrement_and_save_user_receive.lua \u4e2d\u7684 14 \u6539\u4e3a 16\uff0c\u6539\u4e3a 16 \u540e\u80fd\u652f\u6301\u7684\u6700\u5927\u4e3a 65535\uff0c\u8fd9\u6837\u6211\u4eec\u5355\u6b21\u538b\u6d4b\u7684\u65f6\u5019\u53ea\u8981\u4e0d\u9ad8\u4e8e 65535 \u7684\u6837\u672c\uff0c\u90fd\u80fd\u591f\u652f\u6301\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>local function combineFields(firstField, secondField)-- \u786e\u5b9a SECOND_FIELD_BITS \u4e3a 16\uff0c\u56e0\u4e3a secondField \u6700\u5927\u4e3a 65535\n &nbsp; &nbsp;local SECOND_FIELD_BITS=16\n\u200b\n &nbsp; &nbsp;-- \u6839\u636e firstField \u7684\u5b9e\u9645\u503c\uff0c\u8ba1\u7b97\u5176\u5bf9\u5e94\u7684\u4e8c\u8fdb\u5236\u8868\u793a\n &nbsp; &nbsp;-- \u7531\u4e8e firstField \u7684\u8303\u56f4\u662f0-2\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u5b83\u7684\u503c\n &nbsp; &nbsp;local firstFieldValue = firstField\n\u200b\n &nbsp; &nbsp;-- \u6a21\u62df\u4f4d\u79fb\u64cd\u4f5c\uff0c\u5c06 firstField \u7684\u503c\u5de6\u79fb SECOND_FIELD_BITS \u4f4d\n &nbsp; &nbsp;local shiftedFirstField = firstFieldValue *(2^SECOND_FIELD_BITS)\n\u200b\n &nbsp; &nbsp;-- \u5c06 secondField \u7684\u503c\u4e0e\u4f4d\u79fb\u540e\u7684 firstField \u503c\u76f8\u52a0\n &nbsp; &nbsp;return shiftedFirstField + secondField\nend<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"jmeter\">Jmeter \u538b\u6d4b\u811a\u672c<\/h2>\n\n\n\n<p>\u5c06\u4ee5\u4e0b\u4ee3\u7801\u590d\u5236\u5230\u6587\u672c\u7f16\u8f91\u5668\u4e2d\uff0c\u4fdd\u5b58\u4e3a oneCouponRedeemUserCouponByMQ.jmx \u6587\u4ef6\uff0c\u5e76\u4f7f\u7528 Jmeter \u6253\u5f00\u5373\u53ef\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;&lt;jmeterTestPlan version=\"1.2\" properties=\"5.0\" jmeter=\"5.6\"&gt;&lt;hashTree&gt;&lt;TestPlan guiclass=\"TestPlanGui\" testclass=\"TestPlan\" testname=\"\u725b\u5238\u5151\u6362\u4f18\u60e0\u5238\u6d4b\u8bd5\u8ba1\u5212\"&gt;&lt;elementProp name=\"TestPlan.user_defined_variables\" elementType=\"Arguments\" guiclass=\"ArgumentsPanel\" testclass=\"Arguments\" testname=\"\u7528\u6237\u5b9a\u4e49\u7684\u53d8\u91cf\"&gt;&lt;collectionProp name=\"Arguments.arguments\"\/&gt;&lt;\/elementProp&gt;&lt;\/TestPlan&gt;&lt;hashTree&gt;&lt;ThreadGroup guiclass=\"ThreadGroupGui\" testclass=\"ThreadGroup\" testname=\"\u7ebf\u7a0b\u7ec4\"&gt;&lt;elementProp name=\"ThreadGroup.main_controller\" elementType=\"LoopController\" guiclass=\"LoopControlPanel\" testclass=\"LoopController\" testname=\"\u5faa\u73af\u63a7\u5236\u5668\"&gt;&lt;stringProp name=\"LoopController.loops\"&gt;400&lt;\/stringProp&gt;&lt;\/elementProp&gt;&lt;stringProp name=\"ThreadGroup.num_threads\"&gt;100&lt;\/stringProp&gt;&lt;stringProp name=\"ThreadGroup.ramp_time\"&gt;1&lt;\/stringProp&gt;&lt;boolProp name=\"ThreadGroup.scheduler\"&gt;false&lt;\/boolProp&gt;&lt;stringProp name=\"ThreadGroup.duration\"&gt;&lt;\/stringProp&gt;&lt;stringProp name=\"ThreadGroup.delay\"&gt;&lt;\/stringProp&gt;&lt;\/ThreadGroup&gt;&lt;hashTree&gt;&lt;HTTPSamplerProxy guiclass=\"HttpTestSampleGui\" testclass=\"HTTPSamplerProxy\" testname=\"HTTP\u8bf7\u6c42\"&gt;&lt;boolProp name=\"HTTPSampler.postBodyRaw\"&gt;true&lt;\/boolProp&gt;&lt;elementProp name=\"HTTPsampler.Arguments\" elementType=\"Arguments\"&gt;&lt;collectionProp name=\"Arguments.arguments\"&gt;&lt;elementProp name=\"\" elementType=\"HTTPArgument\"&gt;&lt;stringProp name=\"Argument.value\"&gt;{&amp;#xd;&amp;quot;source&amp;quot;: 0,&amp;#xd;&amp;quot;shopNumber&amp;quot;: &amp;quot;1810714735922956666&amp;quot;,&amp;#xd;&amp;quot;couponTemplateId&amp;quot;: &amp;quot;1844952738815803394&amp;quot;&amp;#xd;\n}&lt;\/stringProp&gt;&lt;stringProp name=\"Argument.metadata\"&gt;=&lt;\/stringProp&gt;&lt;\/elementProp&gt;&lt;\/collectionProp&gt;&lt;\/elementProp&gt;&lt;stringProp name=\"HTTPSampler.domain\"&gt;127.0.0.1&lt;\/stringProp&gt;&lt;stringProp name=\"HTTPSampler.port\"&gt;10020&lt;\/stringProp&gt;&lt;stringProp name=\"HTTPSampler.path\"&gt;\/api\/engine\/user-coupon\/redeem-mq&lt;\/stringProp&gt;&lt;stringProp name=\"HTTPSampler.method\"&gt;POST&lt;\/stringProp&gt;&lt;boolProp name=\"HTTPSampler.follow_redirects\"&gt;true&lt;\/boolProp&gt;&lt;boolProp name=\"HTTPSampler.use_keepalive\"&gt;true&lt;\/boolProp&gt;&lt;\/HTTPSamplerProxy&gt;&lt;hashTree\/&gt;&lt;ResultCollector guiclass=\"ViewResultsFullVisualizer\" testclass=\"ResultCollector\" testname=\"\u67e5\u770b\u7ed3\u679c\u6811\"&gt;&lt;boolProp name=\"ResultCollector.error_logging\"&gt;false&lt;\/boolProp&gt;&lt;objProp&gt;&lt;name&gt;saveConfig&lt;\/name&gt;&lt;value class=\"SampleSaveConfiguration\"&gt;&lt;time&gt;true&lt;\/time&gt;&lt;latency&gt;true&lt;\/latency&gt;&lt;timestamp&gt;true&lt;\/timestamp&gt;&lt;success&gt;true&lt;\/success&gt;&lt;label&gt;true&lt;\/label&gt;&lt;code&gt;true&lt;\/code&gt;&lt;message&gt;true&lt;\/message&gt;&lt;threadName&gt;true&lt;\/threadName&gt;&lt;dataType&gt;true&lt;\/dataType&gt;&lt;encoding&gt;false&lt;\/encoding&gt;&lt;assertions&gt;true&lt;\/assertions&gt;&lt;subresults&gt;true&lt;\/subresults&gt;&lt;responseData&gt;false&lt;\/responseData&gt;&lt;samplerData&gt;false&lt;\/samplerData&gt;&lt;xml&gt;false&lt;\/xml&gt;&lt;fieldNames&gt;true&lt;\/fieldNames&gt;&lt;responseHeaders&gt;false&lt;\/responseHeaders&gt;&lt;requestHeaders&gt;false&lt;\/requestHeaders&gt;&lt;responseDataOnError&gt;false&lt;\/responseDataOnError&gt;&lt;saveAssertionResultsFailureMessage&gt;true&lt;\/saveAssertionResultsFailureMessage&gt;&lt;assertionsResultsToSave&gt;0&lt;\/assertionsResultsToSave&gt;&lt;bytes&gt;true&lt;\/bytes&gt;&lt;sentBytes&gt;true&lt;\/sentBytes&gt;&lt;url&gt;true&lt;\/url&gt;&lt;threadCounts&gt;true&lt;\/threadCounts&gt;&lt;idleTime&gt;true&lt;\/idleTime&gt;&lt;connectTime&gt;true&lt;\/connectTime&gt;&lt;\/value&gt;&lt;\/objProp&gt;&lt;stringProp name=\"filename\"&gt;&lt;\/stringProp&gt;&lt;\/ResultCollector&gt;&lt;hashTree\/&gt;&lt;ResultCollector guiclass=\"StatVisualizer\" testclass=\"ResultCollector\" testname=\"\u805a\u5408\u62a5\u544a\"&gt;&lt;boolProp name=\"ResultCollector.error_logging\"&gt;false&lt;\/boolProp&gt;&lt;objProp&gt;&lt;name&gt;saveConfig&lt;\/name&gt;&lt;value class=\"SampleSaveConfiguration\"&gt;&lt;time&gt;true&lt;\/time&gt;&lt;latency&gt;true&lt;\/latency&gt;&lt;timestamp&gt;true&lt;\/timestamp&gt;&lt;success&gt;true&lt;\/success&gt;&lt;label&gt;true&lt;\/label&gt;&lt;code&gt;true&lt;\/code&gt;&lt;message&gt;true&lt;\/message&gt;&lt;threadName&gt;true&lt;\/threadName&gt;&lt;dataType&gt;true&lt;\/dataType&gt;&lt;encoding&gt;false&lt;\/encoding&gt;&lt;assertions&gt;true&lt;\/assertions&gt;&lt;subresults&gt;true&lt;\/subresults&gt;&lt;responseData&gt;false&lt;\/responseData&gt;&lt;samplerData&gt;false&lt;\/samplerData&gt;&lt;xml&gt;false&lt;\/xml&gt;&lt;fieldNames&gt;true&lt;\/fieldNames&gt;&lt;responseHeaders&gt;false&lt;\/responseHeaders&gt;&lt;requestHeaders&gt;false&lt;\/requestHeaders&gt;&lt;responseDataOnError&gt;false&lt;\/responseDataOnError&gt;&lt;saveAssertionResultsFailureMessage&gt;true&lt;\/saveAssertionResultsFailureMessage&gt;&lt;assertionsResultsToSave&gt;0&lt;\/assertionsResultsToSave&gt;&lt;bytes&gt;true&lt;\/bytes&gt;&lt;sentBytes&gt;true&lt;\/sentBytes&gt;&lt;url&gt;true&lt;\/url&gt;&lt;threadCounts&gt;true&lt;\/threadCounts&gt;&lt;idleTime&gt;true&lt;\/idleTime&gt;&lt;connectTime&gt;true&lt;\/connectTime&gt;&lt;\/value&gt;&lt;\/objProp&gt;&lt;stringProp name=\"filename\"&gt;&lt;\/stringProp&gt;&lt;\/ResultCollector&gt;&lt;hashTree\/&gt;&lt;\/hashTree&gt;&lt;HeaderManager guiclass=\"HeaderPanel\" testclass=\"HeaderManager\" testname=\"HTTP\u4fe1\u606f\u5934\u7ba1\u7406\u5668\"&gt;&lt;collectionProp name=\"HeaderManager.headers\"&gt;&lt;elementProp name=\"\" elementType=\"Header\"&gt;&lt;stringProp name=\"Header.name\"&gt;Content-Type&lt;\/stringProp&gt;&lt;stringProp name=\"Header.value\"&gt;application\/json;charset=UTF-8&lt;\/stringProp&gt;&lt;\/elementProp&gt;&lt;\/collectionProp&gt;&lt;\/HeaderManager&gt;&lt;hashTree\/&gt;&lt;\/hashTree&gt;&lt;\/hashTree&gt;&lt;\/jmeterTestPlan&gt;<\/code><\/pre>\n\n\n\n<p>\u590d\u5236\u5b8c\u6210\u6253\u5f00\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5f00\u59cb\u6d4b\u8bd5\u4e86\u3002\u6267\u884c\u7ebf\u7a0b\u548c\u5faa\u73af\u6b21\u6570\u5927\u5bb6\u591a\u8fdb\u884c\u8c03\u8bd5\uff0c\u76f4\u5230\u9002\u914d\u51fa\u6700\u9002\u5408\u81ea\u5df1\u672c\u5730\u7535\u8111\u7684\uff0c\u8fd9\u6837\u9762\u8bd5\u65f6\u4e5f\u80fd\u548c\u9762\u8bd5\u5b98\u6709\u7406\u6709\u636e\u7684\u8f93\u51fa\u3002<\/p>\n\n\n\n<p>Jmeter \u8bf7\u6c42\u538b\u6d4b\u5355\u6b21\u7ed3\u679c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\"code\":\"0\",\"message\":null,\"data\":null,\"requestId\":null,\"fail\":false,\"success\":true}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>\u7b2c34\u5c0f\u8282\uff1a\u538b\u6d4b\u4f18\u60e0\u5238\u63a8\u9001\u4efb\u52a1\u5206\u53d1\u6027\u80fd<\/strong><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u6d4b\u8bd5\u6ce8\u610f\u4e8b\u9879<\/h2>\n\n\n\n<p>\u56e0\u4e3a\u54b1\u4eec\u4f18\u60e0\u5238\u5206\u53d1\u529f\u80fd\u4e0d\u5b58\u5728\u5f88\u5927\u7684\u5e76\u53d1\u884c\u4e3a\uff0c\u6240\u4ee5\u6211\u4eec\u7684\u6d4b\u8bd5\u8def\u5f84\u662f\u5728\u6307\u5b9a\u6570\u91cf\u4e0b\u7684\u5206\u53d1\u6027\u80fd\uff0c\u6bd4\u5982\u4e3a 100 \u4e07\u7528\u6237\u5206\u53d1\u4f18\u60e0\u5238\u9700\u8981\u591a\u4e45\uff1f<\/p>\n\n\n\n<p>\u524d\u60c5\u56de\u987e\u4e00\u4e0b\uff0c\u5728 v1 \u7248\u672c\u7684\u57fa\u7840\u4e0a\uff0c\u901a\u8fc7\u5f15\u5165\u6279\u5904\u7406\u548c\u4fdd\u5b58\u5931\u8d25\u8bb0\u5f55\u7684\u903b\u8f91\uff0c\u5927\u5e45\u63d0\u5347\u4e86\u4e1a\u52a1\u6267\u884c\u6027\u80fd\uff0c\u5e76\u652f\u6301\u67e5\u770b Excel \u5206\u53d1\u7684\u9519\u8bef\u8bb0\u5f55\u3002\u76f8\u540c\u7684 5000 \u6761\u8bb0\u5f55\uff0cv1 \u7248\u672c\u6267\u884c\u65f6\u95f4\u7ea6\u4e3a 1 \u5206\u949f\uff0c\u800c v2 \u7248\u672c\u4ec5\u9700 1 \u79d2\uff0c\u5b9e\u73b0\u4e86\u63a5\u8fd1 60 \u500d\u7684\u6027\u80fd\u63d0\u5347\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u6b63\u5e38\u6765\u8bf4\u6267\u884c 100 \u4e07\u6761\u8bb0\u5f55\u662f\u9664\u4ee5 5000 \u7b49\u4e8e 200 \u79d2\uff0c\u5177\u4f53\u4e2d\u53ef\u80fd\u4f1a\u6709\u76f8\u5173\u53d8\u5316\uff0c\u6211\u4eec\u4e00\u8d77\u62ed\u76ee\u4ee5\u5f85\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u73af\u5883<\/h2>\n\n\n\n<p>\u8f6f\u4ef6\u67b6\u6784\u4e2d\uff0c\u7cfb\u7edf\u8bbe\u8ba1\u662f\u4e00\u90e8\u5206\uff0c\u57fa\u7840\u8bbe\u65bd\u662f\u4e00\u90e8\u5206\u3002\u7cfb\u7edf\u8bbe\u8ba1\u4e00\u822c\u5c31\u662f\u770b\u6211\u4eec\u7684\u4ee3\u7801\u548c\u67b6\u6784\u662f\u5982\u4f55\u8fd0\u4f5c\u7684\uff0c\u6bd4\u5982\u4ee3\u7801\u4e2d\u8fd0\u884c\u4e86\u5148\u67e5\u8be2\u7f13\u5b58 Redis \u518d\u67e5\u8be2\u6570\u636e\u5e93 MySQL\uff0c\u9632\u6b62\u7f13\u5b58\u51fb\u7a7f\u548c\u7a7f\u900f\u7b49\u8bbe\u8ba1\u3002\u57fa\u7840\u8bbe\u65bd\u6307\u7684\u662f\u90e8\u7f72\u7684\u89c4\u683c\uff0c\u6bd4\u5982 Redis \u4ec0\u4e48\u914d\u7f6e\u3001MySQL \u4ec0\u4e48\u914d\u7f6e\u3001\u90e8\u7f72\u4e86\u51e0\u53f0\u725b\u5238 oneCoupon \u670d\u52a1\u4ee5\u53ca\u6bcf\u53f0\u90e8\u7f72\u673a\u5668\u7684\u914d\u7f6e\u662f\u591a\u5c11\u3002<\/p>\n\n\n\n<p>\u5728\u548c\u9762\u8bd5\u5b98\u8bf4\u65f6\uff0c\u4e00\u5b9a\u8981\u5148\u660e\u786e\u81ea\u5df1\u7684\u90e8\u7f72\u914d\u7f6e\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728\u81ea\u5df1\u672c\u5730\u7535\u8111\u4e0a\u8fdb\u884c\u7684\u6d4b\u8bd5\uff0c\u7535\u8111\u914d\u7f6e MacBook M2 Max 12C64G\u3002<\/li>\n\n\n\n<li>\u542f\u52a8\u725b\u5238 DistributionApplication \u548c MerchantAdminApplication \u670d\u52a1\u3002<\/li>\n<\/ul>\n\n\n\n<p>RocketMQ \u6211\u7528\u81ea\u5df1\u7535\u8111\u8dd1\u7684 Docker\uff0c\u7406\u8bba\u4e0a\u5982\u679c\u4ee3\u7801\u548c RocketMQ \u8dd1\u5728\u540c\u4e00\u53f0\u670d\u52a1\u5668\u6216\u8005\u540c\u4e00\u4e2a\u7f51\u6bb5\u4e0b\u5e94\u8be5\u4f1a\u66f4\u5feb\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1\">1. \u521b\u5efa\u4f18\u60e0\u5238\u6a21\u677f<\/h3>\n\n\n\n<p>\u9996\u5148\u5462\uff0c\u54b1\u4eec\u5148\u521b\u5efa\u597d\u4f18\u60e0\u5238\u6a21\u677f\uff0c\u5728\u540e\u7ba1\u670d\u52a1\u91cc\u8c03\u7528\u521b\u5efa\u63a5\u53e3\uff0c\u83b7\u53d6\u5230\u5bf9\u5e94\u7684\u4f18\u60e0\u5238\u6a21\u677f ID \u51c6\u5907\u8c03\u7528\u521b\u5efa\u5206\u53d1\u4efb\u52a1\u3002<\/p>\n\n\n\n<p>\u8bf7\u6c42\u6570\u636e\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\"name\":\"\u7528\u6237\u4e0b\u5355\u6ee110\u51cf3\u7279\u5927\u4f18\u60e0\",\"source\":0,\"target\":1,\"goods\":\"\",\"type\":0,\"validStartTime\":\"2024-09-21 19:33:00\",\"validEndTime\":\"2025-09-24 18:40:00\",\"stock\":20000000,\"receiveRule\":\"{\\\"limitPerPerson\\\":20000000,\\\"usageInstructions\\\":\\\"3\\\"}\",\"consumeRule\":\"{\\\"termsOfUse\\\":10,\\\"maximumDiscountAmount\\\":3,\\\"explanationOfUnmetConditions\\\":\\\"3\\\",\\\"validityPeriod\\\":\\\"48\\\"}\"}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-excel\">2. \u751f\u6210\u4f18\u60e0\u5238\u5206\u53d1 Excel<\/h3>\n\n\n\n<p>\u8fd8\u8bb0\u5f97\u6211\u4eec\u7684 <code>ExcelGenerateTests<\/code> \u5355\u5143\u6d4b\u8bd5\u7c7b\u4e48\uff0c\u628a <code>writeNum<\/code> \u6539\u4e3a 100 \u4e07\uff0c\u8c03\u7528 <code>testExcelGenerate<\/code> \u751f\u6210\u5373\u53ef\u3002\u7136\u540e\u67e5\u770b\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684 tmp \u6587\u4ef6\u5939\u4e0b\u7684 <code>oneCoupon\u4efb\u52a1\u63a8\u9001Excel.xlsx<\/code> \u6587\u4ef6\uff0c\u590d\u5236\u7edd\u5bf9\u8def\u5f84\u5728\u4e0b\u9762\u6b65\u9aa4\u8bf7\u6c42\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>publicfinalclassExcelGenerateTests{\n\u200b\n &nbsp; &nbsp;\/**\n &nbsp; &nbsp; * \u5199\u5165\u4f18\u60e0\u5238\u63a8\u9001\u793a\u4f8b Excel \u7684\u6570\u636e\uff0c\u81ea\u884c\u63a7\u5236\u5373\u53ef\n &nbsp; &nbsp; *\/privatefinalint writeNum =1000000;privatefinalFaker faker =newFaker(Locale.CHINA);privatefinalString excelPath =Paths.get(\"\").toAbsolutePath().getParent()+\"\/tmp\";\n\u200b\n &nbsp; &nbsp;@TestpublicvoidtestExcelGenerate(){if(!FileUtil.exist(excelPath)){FileUtil.mkdir(excelPath);}String fileName = excelPath +\"\/oneCoupon\u4efb\u52a1\u63a8\u9001Excel.xlsx\";EasyExcel.write(fileName,ExcelGenerateDemoData.class).sheet(\"\u4f18\u60e0\u5238\u63a8\u9001\u5217\u8868\").doWrite(data());}\n\u200b\n &nbsp; &nbsp;\/\/ ......}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3\">3. \u521b\u5efa\u4f18\u60e0\u5238\u5206\u53d1\u4efb\u52a1<\/h3>\n\n\n\n<p>\u8fd8\u662f\u5728\u540e\u7ba1\u7cfb\u7edf\u4e2d\uff0c\u8c03\u7528 <strong>\u5546\u5bb6\u521b\u5efa\u4f18\u60e0\u5238\u63a8\u9001\u4efb\u52a1<\/strong> \u63a5\u53e3\uff0c\u5e76\u5c06\u4e0b\u8ff0\u7684 fileAddress \u66ff\u6362\u4e3a\u5927\u5bb6\u751f\u6210\u7684 Excel \u6587\u4ef6\u5730\u5740\u5373\u53ef\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\"taskName\":\"\u53d1\u9001\u767e\u4e07\u4f18\u60e0\u5238\u63a8\u9001\u4efb\u52a1\",\"fileAddress\":\"xxx\",\"couponTemplateId\":1845032811019386882,\"sendType\":0}<\/code><\/pre>\n\n\n\n<p>\u8fd9\u6837\u5c31\u53ef\u4ee5\u89e6\u53d1\u767e\u4e07\u5206\u53d1\u4f18\u60e0\u5238\u4efb\u52a1\u7684\u6d41\u7a0b\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u538b\u6d4b\u7ed3\u679c<\/h2>\n\n\n\n<p>\u6839\u636e\u6211\u8fd9\u8fb9\u7684\u5b9e\u65f6\u4f18\u60e0\u5238\u5206\u53d1\u6d4b\u8bd5\uff0c\u7ed3\u679c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/article-images.zsxq.com\/FuG4lKcaWjtNmcsDGkdvnUhLCEP5\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p>\u6709\u4e24\u4e2a\u5173\u952e\u65f6\u95f4\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u521b\u5efa\u65f6\u95f4\uff1a2024-10-12 17:26:40<\/li>\n\n\n\n<li>\u5b8c\u6210\u65f6\u95f4\uff1a2024-10-12 17:30:10<\/li>\n<\/ul>\n\n\n\n<p>\u4e24\u8005\u76f8\u5dee 210 \u79d2\uff0c\u4e5f\u5c31\u662f\u610f\u5473\u7740 3 \u5206\u949f\u534a\u6211\u4eec\u5b8c\u6210\u4e86\u767e\u5206\u4f18\u60e0\u5238\u7684\u5206\u53d1\u6d41\u7a0b\uff0c\u5982\u679c\u662f\u5355\u7ebf\u7a0b\u7684\u903b\u8f91\uff0c\u53ef\u80fd\u5c31\u5f97\u6162\u5230\u7334\u5e74\u9a6c\u6708\u53bb\u4e86\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e2a\u6570\u636e\u57fa\u672c\u4e0a\u7b26\u5408\u6211\u4eec\u7684\u9884\u671f\uff0c\u5927\u5bb6\u53ef\u4ee5\u672c\u5730\u8dd1\u4e00\u4e0b\uff0c\u770b\u6267\u884c\u65f6\u95f4\u5dee\u522b\u5927\u4e0d\u5927\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c31\u5c0f\u8282\uff1a\u538b\u6d4b\u725b\u5238\u67e5\u8be2\u53ef\u7528\/\u4e0d\u53ef\u7528\u4f18\u60e0\u5238\u529f\u80fd \u538b\u6d4b\u6ce8\u610f\u4e8b\u9879 1. \u4ec0\u4e48\u662f QPS\uff1f QPS \u8868\u793a\u7cfb\u7edf\u6bcf\u79d2\u80fd\u591f\u5904\u7406\u7684\u8bf7\u6c42\u6570\u91cf\uff0c\u53ef\u4ee5 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[3],"tags":[20],"class_list":["post-1323","post","type-post","status-publish","format-standard","hentry","category-3","tag-20"],"_links":{"self":[{"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/posts\/1323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eve2333.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1323"}],"version-history":[{"count":1,"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/posts\/1323\/revisions"}],"predecessor-version":[{"id":1325,"href":"https:\/\/eve2333.top\/index.php?rest_route=\/wp\/v2\/posts\/1323\/revisions\/1325"}],"wp:attachment":[{"href":"https:\/\/eve2333.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eve2333.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eve2333.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}