{"id":64716,"date":"2026-01-23T23:56:27","date_gmt":"2026-01-23T15:56:27","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/64716.html"},"modified":"2026-01-23T23:56:27","modified_gmt":"2026-01-23T15:56:27","slug":"%e3%80%90%e6%80%a7%e8%83%bd%e6%b5%8b%e8%af%95%e3%80%913_locust-_locust%e5%ae%9e%e7%8e%b0%e6%b7%b7%e5%90%88%e4%b8%9a%e5%8a%a1%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/64716.html","title":{"rendered":"\u3010\u6027\u80fd\u6d4b\u8bd5\u30113_Locust _locust\u5b9e\u73b0\u6df7\u5408\u4e1a\u52a1\u5b9e\u73b0"},"content":{"rendered":"<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u4e00\u3001\u6267\u884c\u6df7\u5408\u4efb\u52a1\u7684\u6bd4\u91cd<\/li>\n<li>\u4e8c\u3001\u7279\u6b8a\u65b9\u6cd5<\/li>\n<\/ul>\n<h2>\u4e00\u3001\u6267\u884c\u6df7\u5408\u4efb\u52a1\u7684\u6bd4\u91cd<\/h2>\n<p>1\u3001\u4e3e\u4f8b&#xff1a;\u6df7\u5408\u4e1a\u52a1\u573a\u666f\u3002500\u7528\u6237\u5e76\u53d1\u8bbf\u95ee<\/p>\n<ul>\n<li>\u9996\u9875&#xff1a;150<\/li>\n<li>\u641c\u7d22\u5546\u54c1&#xff1a;200<\/li>\n<li>\u6ce8\u518c&#xff1a;20<\/li>\n<li>\u767b\u5f55&#xff1a;80<\/li>\n<li>\u4e0b\u5355&#xff1a;50<\/li>\n<\/ul>\n<p>2\u3001\u8bed\u6cd5&#xff1a;<\/p>\n<p>\u5728&#064;task\u540e\u6dfb\u52a0( )\u5199\u5165\u9700\u8981\u8bbe\u5b9a\u7684\u6bd4\u91cd\u503c\u5373\u53ef\u3002<\/p>\n<p><span class=\"token keyword\">from<\/span> locust <span class=\"token keyword\">import<\/span> TaskSet<span class=\"token punctuation\">,<\/span> HttpLocust<span class=\"token punctuation\">,<\/span> task<br \/>\n<span class=\"token triple-quoted-string string\">&#034;&#034;&#034;<br \/>\nlocust\u6bd4\u91cd&#xff1a;500\u7528\u6237\u5e76\u53d1\u9001<br \/>\n&#8211; \u9996\u9875&#xff1a;150<br \/>\n&#8211; \u641c\u7d22\u5546\u54c1&#xff1a;200<br \/>\n&#8211; \u6ce8\u518c&#xff1a;20<br \/>\n&#8211; \u767b\u5f55&#xff1a;80<br \/>\n&#8211; \u4e0b\u5355&#xff1a;50<br \/>\n&#034;&#034;&#034;<\/span><br \/>\n<span class=\"token comment\"># 1.\u5b9a\u4e49 \u4efb\u52a1\u96c6 \u548c \u4efb\u52a1<\/span><br \/>\n<span class=\"token keyword\">class<\/span> <span class=\"token class-name\">TaskClass<\/span><span class=\"token punctuation\">(<\/span>TaskSet<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span>  <span class=\"token comment\"># \u8981\u7ee7\u627fTaskSet\u7c7b&#xff0c; TaskClass\u8868\u793a\u4e00\u4e2a\u4efb\u52a1\u96c6<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;&#034;\u5b9a\u4e49\u4efb\u52a1&#034;&#034;&#034;<\/span><\/p>\n<p>    <span class=\"token comment\"># \u8bbf\u95ee\u9996\u9875<\/span><br \/>\n    <span class=\"token decorator annotation punctuation\">&#064;task<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">150<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">index<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        result <span class=\"token operator\">&#061;<\/span> self<span class=\"token punctuation\">.<\/span>client<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/?&#061;index&#034;<\/span><span class=\"token punctuation\">)<\/span>     <span class=\"token comment\"># \u6b64\u884c\u4ee3\u7801\u76f8\u5f53\u4e8erequests.Session().get()<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u54cd\u5e94\u7ed3\u679c&#xff1a;&#034;<\/span><span class=\"token punctuation\">,<\/span> result<span class=\"token punctuation\">.<\/span>text<span class=\"token punctuation\">)<\/span>    <span class=\"token comment\"># \u6253\u5370\u7ed3\u679c<\/span><\/p>\n<p>    <span class=\"token comment\"># \u641c\u7d22<\/span><br \/>\n    <span class=\"token decorator annotation punctuation\">&#064;task<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">200<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">search<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        result <span class=\"token operator\">&#061;<\/span> self<span class=\"token punctuation\">.<\/span>client<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/?&#061;search&#034;<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6b64\u884c\u4ee3\u7801\u76f8\u5f53\u4e8erequests.Session().get()<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u54cd\u5e94\u7ed3\u679c&#xff1a;&#034;<\/span><span class=\"token punctuation\">,<\/span> result<span class=\"token punctuation\">.<\/span>text<span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6253\u5370\u7ed3\u679c<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6ce8\u518c<\/span><br \/>\n    <span class=\"token decorator annotation punctuation\">&#064;task<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">20<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">register<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        result <span class=\"token operator\">&#061;<\/span> self<span class=\"token punctuation\">.<\/span>client<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/?&#061;register&#034;<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6b64\u884c\u4ee3\u7801\u76f8\u5f53\u4e8erequests.Session().get()<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u54cd\u5e94\u7ed3\u679c&#xff1a;&#034;<\/span><span class=\"token punctuation\">,<\/span> result<span class=\"token punctuation\">.<\/span>text<span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6253\u5370\u7ed3\u679c<\/span><\/p>\n<p>    <span class=\"token comment\"># \u767b\u5f55<\/span><br \/>\n    <span class=\"token decorator annotation punctuation\">&#064;task<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">80<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">login<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        result <span class=\"token operator\">&#061;<\/span> self<span class=\"token punctuation\">.<\/span>client<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/?&#061;login&#034;<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6b64\u884c\u4ee3\u7801\u76f8\u5f53\u4e8erequests.Session().get()<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u54cd\u5e94\u7ed3\u679c&#xff1a;&#034;<\/span><span class=\"token punctuation\">,<\/span> result<span class=\"token punctuation\">.<\/span>text<span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6253\u5370\u7ed3\u679c<\/span><\/p>\n<p>    <span class=\"token comment\"># \u4e0b\u5355<\/span><br \/>\n    <span class=\"token decorator annotation punctuation\">&#064;task<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">50<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">order<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        result <span class=\"token operator\">&#061;<\/span> self<span class=\"token punctuation\">.<\/span>client<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/?&#061;order&#034;<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6b64\u884c\u4ee3\u7801\u76f8\u5f53\u4e8erequests.Session().get()<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u54cd\u5e94\u7ed3\u679c&#xff1a;&#034;<\/span><span class=\"token punctuation\">,<\/span> result<span class=\"token punctuation\">.<\/span>text<span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6253\u5370\u7ed3\u679c<\/span><\/p>\n<p><span class=\"token comment\"># 2.#\u5b9a\u4e49\u7528\u6237\u7c7b<\/span><br \/>\n<span class=\"token keyword\">class<\/span> <span class=\"token class-name\">User<\/span><span class=\"token punctuation\">(<\/span>HttpLocust<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># \u7ed1\u5b9a\u4efb\u52a1<\/span><br \/>\n    task_set <span class=\"token operator\">&#061;<\/span> TaskClass   <span class=\"token comment\"># task_set \u5c5e\u6027\u540d\u4e0d\u80fd\u53d8&#xff1b; \u6ce8\u610f&#xff1a;TaskClass \u540e&#xff0c;\u6ca1\u6709 ()<\/span><\/p>\n<p>    <span class=\"token comment\"># \u8bbe\u7f6e \u7528\u6237\u95f4 \u6700\u5c0f\u5ef6\u8fdf\u65f6\u95f4 &#8211; \u5355\u4f4d ms<\/span><br \/>\n    min_wait <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1000<\/span><\/p>\n<p>    <span class=\"token comment\"># \u8bbe\u7f6e \u7528\u6237\u95f4 \u6700\u5927\u5ef6\u8fdf\u65f6\u95f4<\/span><br \/>\n    max_wait <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">3000<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6307\u5b9a \u4e3b\u673a\u5730\u5740<\/span><br \/>\n    host <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;https:\/\/www.baidu.com&#034;<\/span><\/p>\n<h2>\u4e8c\u3001\u7279\u6b8a\u65b9\u6cd5<\/h2>\n<ul>\n<li>on_start&#xff1a; \u524d\u7f6e\u65b9\u6cd5(\u524d\u7f6e\u4efb\u52a1)&#xff0c;\u5728\u6bcf\u4e2a\u4efb\u52a1\u6267\u884c\u4e4b\u524d&#xff0c;\u88ab\u81ea\u52a8\u8c03\u7528\u4e00\u6b21\u3002\u4f3c\u4e8esetup<\/li>\n<li>on_stop&#xff1a; \u540e\u7f6e\u65b9\u6cd5(\u540e\u7f6e\u4efb\u52a1)&#xff0c; \u5728\u6bcf\u4e2a\u4efb\u52a1\u6267\u884c\u7ed3\u675f\u4e4b\u540e&#xff0c;\u81ea\u52a8\u88ab\u8c03\u7528\u4e00\u6b21\u3002\u7c7b\u4f3c\u4e8eteardown<\/li>\n<\/ul>\n<p><span class=\"token keyword\">from<\/span> locust <span class=\"token keyword\">import<\/span> TaskSet<span class=\"token punctuation\">,<\/span> HttpLocust<span class=\"token punctuation\">,<\/span> task<\/p>\n<p><span class=\"token comment\"># 1.\u5b9a\u4e49 \u4efb\u52a1\u96c6 \u548c \u4efb\u52a1<\/span><br \/>\n<span class=\"token keyword\">class<\/span> <span class=\"token class-name\">TaskClass<\/span><span class=\"token punctuation\">(<\/span>TaskSet<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span>  <span class=\"token comment\"># TaskClass \u8868\u793a\u4efb\u52a1\u96c6<\/span><br \/>\n    <span class=\"token comment\"># \u4e0d\u9700\u8981\u6dfb\u52a0\u88c5\u9970\u5668 &#064;task<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">on_start<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;&#8212;&#8212;\u4efb\u52a1\u5f00\u59cb\u4e86&#xff01;&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token comment\"># \u4e0d\u9700\u8981\u6dfb\u52a0\u88c5\u9970\u5668 &#064;task<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">on_stop<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;&#061;&#061;&#061;&#061;&#061;&#061;\u4efb\u52a1\u7ed3\u675f\u4e86&#xff01;&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;&#034;\u5b9a\u4e49\u4efb\u52a1&#034;&#034;&#034;<\/span><br \/>\n    <span class=\"token comment\"># \u8bbf\u95ee\u9996\u9875-\u4efb\u52a1&#xff08;\u4f1a\u88ab\u81ea\u52a8\u8c03\u7528&#xff09;<\/span><br \/>\n    <span class=\"token decorator annotation punctuation\">&#064;task<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">index<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        result <span class=\"token operator\">&#061;<\/span> self<span class=\"token punctuation\">.<\/span>client<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/&#034;<\/span><span class=\"token punctuation\">)<\/span>     <span class=\"token comment\"># \u6b64\u884c\u4ee3\u7801\u76f8\u5f53\u4e8erequests.Session().get()<\/span><br \/>\n        <span class=\"token comment\"># print(&#034;\u54cd\u5e94\u7ed3\u679c&#xff1a;&#034;, result.text)    # \u6253\u5370\u7ed3\u679c<\/span><br \/>\n<span class=\"token comment\">#<\/span><\/p>\n<p><span class=\"token comment\"># 2.\u5b9a\u4e49 \u7528\u6237\u7c7b<\/span><br \/>\n<span class=\"token keyword\">class<\/span> <span class=\"token class-name\">User<\/span><span class=\"token punctuation\">(<\/span>HttpLocust<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># \u7ed1\u5b9a\u4efb\u52a1<\/span><br \/>\n    task_set <span class=\"token operator\">&#061;<\/span> TaskClass   <span class=\"token comment\"># task_set \u5c5e\u6027\u540d\u4e0d\u80fd\u53d8&#xff1b; \u6ce8\u610f&#xff1a;TaskClass \u540e&#xff0c;\u6ca1\u6709 ()<\/span><\/p>\n<p>    <span class=\"token comment\"># \u8bbe\u7f6e \u7528\u6237\u95f4 \u6700\u5c0f\u5ef6\u8fdf\u65f6\u95f4 &#8211; \u5355\u4f4d ms<\/span><br \/>\n    min_wait <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1000<\/span><\/p>\n<p>    <span class=\"token comment\"># \u8bbe\u7f6e \u7528\u6237\u95f4 \u6700\u5927\u5ef6\u8fdf\u65f6\u95f4<\/span><br \/>\n    max_wait <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">3000<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6307\u5b9a \u4e3b\u673a\u5730\u5740<\/span><br \/>\n    host <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;https:\/\/www.baidu.com&#034;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123155625-69739a29e3d18.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u76ee\u5f55\u4e00\u3001\u6267\u884c\u6df7\u5408\u4efb\u52a1\u7684\u6bd4\u91cd\u4e8c\u3001\u7279\u6b8a\u65b9\u6cd5\u4e00\u3001\u6267\u884c\u6df7\u5408\u4efb\u52a1\u7684\u6bd4\u91cd<br \/>\n1\u3001\u4e3e\u4f8b&#xff1a;\u6df7\u5408\u4e1a\u52a1\u573a\u666f\u3002500\u7528\u6237\u5e76\u53d1\u8bbf\u95ee<br \/>\n\u9996\u9875&#xff1a;150\u641c\u7d22\u5546\u54c1&#xff1a;200\u6ce8\u518c&#xff1a;20\u767b\u5f55&#xff1a;80\u4e0b\u5355&#xff1a;50<br \/>\n2\u3001\u8bed\u6cd5&#xff1a;<br \/>\n\u5728task\u540e\u6dfb\u52a0( )\u5199\u5165\u9700\u8981\u8bbe\u5b9a\u7684\u6bd4\u91cd\u503c\u5373\u53ef\u3002<br \/>\nfrom locust import TaskSet, HttpLocust, task<br \/>\n\\&#8221;\\&#8221;\\&#8221;<br \/>\nlocust\u6bd4\u91cd&#xff1a;500\u7528\u6237<\/p>\n","protected":false},"author":2,"featured_media":64715,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6846,1002,78],"topic":[],"class_list":["post-64716","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-locust","tag-1002","tag-78"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u6027\u80fd\u6d4b\u8bd5\u30113_Locust _locust\u5b9e\u73b0\u6df7\u5408\u4e1a\u52a1\u5b9e\u73b0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/64716.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u6027\u80fd\u6d4b\u8bd5\u30113_Locust _locust\u5b9e\u73b0\u6df7\u5408\u4e1a\u52a1\u5b9e\u73b0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u76ee\u5f55\u4e00\u3001\u6267\u884c\u6df7\u5408\u4efb\u52a1\u7684\u6bd4\u91cd\u4e8c\u3001\u7279\u6b8a\u65b9\u6cd5\u4e00\u3001\u6267\u884c\u6df7\u5408\u4efb\u52a1\u7684\u6bd4\u91cd 1\u3001\u4e3e\u4f8b&#xff1a;\u6df7\u5408\u4e1a\u52a1\u573a\u666f\u3002500\u7528\u6237\u5e76\u53d1\u8bbf\u95ee \u9996\u9875&#xff1a;150\u641c\u7d22\u5546\u54c1&#xff1a;200\u6ce8\u518c&#xff1a;20\u767b\u5f55&#xff1a;80\u4e0b\u5355&#xff1a;50 2\u3001\u8bed\u6cd5&#xff1a; \u5728task\u540e\u6dfb\u52a0( )\u5199\u5165\u9700\u8981\u8bbe\u5b9a\u7684\u6bd4\u91cd\u503c\u5373\u53ef\u3002 from locust import TaskSet, HttpLocust, task &quot;&quot;&quot; locust\u6bd4\u91cd&#xff1a;500\u7528\u6237\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/64716.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-23T15:56:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123155625-69739a29e3d18.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64716.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/64716.html\",\"name\":\"\u3010\u6027\u80fd\u6d4b\u8bd5\u30113_Locust _locust\u5b9e\u73b0\u6df7\u5408\u4e1a\u52a1\u5b9e\u73b0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-23T15:56:27+00:00\",\"dateModified\":\"2026-01-23T15:56:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/64716.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/64716.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64716.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u6027\u80fd\u6d4b\u8bd5\u30113_Locust _locust\u5b9e\u73b0\u6df7\u5408\u4e1a\u52a1\u5b9e\u73b0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010\u6027\u80fd\u6d4b\u8bd5\u30113_Locust _locust\u5b9e\u73b0\u6df7\u5408\u4e1a\u52a1\u5b9e\u73b0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/64716.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u6027\u80fd\u6d4b\u8bd5\u30113_Locust _locust\u5b9e\u73b0\u6df7\u5408\u4e1a\u52a1\u5b9e\u73b0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u76ee\u5f55\u4e00\u3001\u6267\u884c\u6df7\u5408\u4efb\u52a1\u7684\u6bd4\u91cd\u4e8c\u3001\u7279\u6b8a\u65b9\u6cd5\u4e00\u3001\u6267\u884c\u6df7\u5408\u4efb\u52a1\u7684\u6bd4\u91cd 1\u3001\u4e3e\u4f8b&#xff1a;\u6df7\u5408\u4e1a\u52a1\u573a\u666f\u3002500\u7528\u6237\u5e76\u53d1\u8bbf\u95ee \u9996\u9875&#xff1a;150\u641c\u7d22\u5546\u54c1&#xff1a;200\u6ce8\u518c&#xff1a;20\u767b\u5f55&#xff1a;80\u4e0b\u5355&#xff1a;50 2\u3001\u8bed\u6cd5&#xff1a; \u5728task\u540e\u6dfb\u52a0( )\u5199\u5165\u9700\u8981\u8bbe\u5b9a\u7684\u6bd4\u91cd\u503c\u5373\u53ef\u3002 from locust import TaskSet, HttpLocust, task \"\"\" locust\u6bd4\u91cd&#xff1a;500\u7528\u6237","og_url":"https:\/\/www.wsisp.com\/helps\/64716.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-23T15:56:27+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260123155625-69739a29e3d18.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/64716.html","url":"https:\/\/www.wsisp.com\/helps\/64716.html","name":"\u3010\u6027\u80fd\u6d4b\u8bd5\u30113_Locust _locust\u5b9e\u73b0\u6df7\u5408\u4e1a\u52a1\u5b9e\u73b0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-23T15:56:27+00:00","dateModified":"2026-01-23T15:56:27+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/64716.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/64716.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/64716.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u6027\u80fd\u6d4b\u8bd5\u30113_Locust _locust\u5b9e\u73b0\u6df7\u5408\u4e1a\u52a1\u5b9e\u73b0"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=64716"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64716\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/64715"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=64716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=64716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=64716"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=64716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}