{"id":633,"date":"2024-05-03T01:13:52","date_gmt":"2024-05-02T16:13:52","guid":{"rendered":"https:\/\/chocottopro.com\/?p=633"},"modified":"2024-05-03T01:13:53","modified_gmt":"2024-05-02T16:13:53","slug":"locust-python%e3%81%ae%e5%9f%ba%e6%9c%ac%e3%81%a8%e4%bd%bf%e3%81%84%e6%96%b9-7%e3%81%a4%e3%81%ae%e3%82%b9%e3%83%86%e3%83%83%e3%83%97%e3%81%a7%e3%83%91%e3%83%95%e3%82%a9%e3%83%bc%e3%83%9e%e3%83%b3","status":"publish","type":"post","link":"https:\/\/chocottopro.com\/?p=633","title":{"rendered":"Locust Python\u306e\u57fa\u672c\u3068\u4f7f\u3044\u65b9 &#8211; 7\u3064\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u3092\u30de\u30b9\u30bf\u30fc\uff01"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Web\u30b7\u30b9\u30c6\u30e0\u306e\u5b89\u5b9a\u7a3c\u50cd\u3068\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u306e\u5411\u4e0a\u306b\u306f\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002<br>\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u30c4\u30fc\u30eb\u300cLocust\u300d\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3001\u52b9\u7387\u7684\u306b\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3092\u767a\u898b\u3057\u3001\u5bfe\u7b56\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br>\u672c\u8a18\u4e8b\u3067\u306f\u3001Locust Python\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u5b9f\u8df5\u7684\u306aTips\u307e\u3067\u3092\u89e3\u8aac\u3057\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u3092\u52a0\u901f\u3059\u308b\u30ce\u30a6\u30cf\u30a6\u3092\u304a\u4f1d\u3048\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-sgb-block-simple sgb-box-simple sgb-box-simple--title-normal sgb-box-simple--with-border\"><div style=\"background-color:var(--wp--preset--color--sango-main);color:#FFF\" class=\"sgb-box-simple__title\">\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3093\u3060\u3089\u308f\u304b\u308b\u3053\u3068<\/div><div class=\"sgb-box-simple__body\" style=\"border-color:var(--wp--preset--color--sango-main);background-color:#FFF\">\n<ul class=\"wp-block-list\">\n<li>Locust Python\u306e\u6982\u8981\u3068\u7279\u5fb4 <\/li>\n\n\n\n<li>Locust\u3092\u4f7f\u3063\u305f\u30c6\u30b9\u30c8\u30b7\u30ca\u30ea\u30aa\u306e\u4f5c\u6210\u65b9\u6cd5 <\/li>\n\n\n\n<li>\u30c6\u30b9\u30c8\u306e\u5b9f\u884c\u65b9\u6cd5\u3068\u7d50\u679c\u306e\u898b\u65b9 <\/li>\n\n\n\n<li>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u306e\u305f\u3081\u306e7\u3064\u306e\u30b9\u30c6\u30c3\u30d7 <\/li>\n\n\n\n<li>\u3088\u308a\u9ad8\u5ea6\u306aLocust\u306e\u4f7f\u3044\u65b9\u306eTips<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"toc\"><br \/>\n<b>Warning<\/b>:  Undefined array key \"is_admin\" in <b>\/home\/c7479301\/public_html\/chocottopro.com\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>116<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_category_top\" in <b>\/home\/c7479301\/public_html\/chocottopro.com\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>121<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_top\" in <b>\/home\/c7479301\/public_html\/chocottopro.com\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>128<\/b><br \/>\n    <div id=\"toc_container\" class=\"sgb-toc--bullets js-smooth-scroll\" data-dialog-title=\"Table of Contents\">\n      <p class=\"toc_title\">\u76ee\u6b21 <\/p>\n      <ul class=\"toc_list\">  <li class=\"first\">    <a href=\"#i-0\">Locust Python\u3068\u306f\u4f55\u304b\uff1f\u305d\u306e\u7279\u5fb4\u3068\u5229\u70b9<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-1\">Locust\u306e\u6982\u8981\u3068Python\u306b\u3088\u308b\u30b7\u30ca\u30ea\u30aa\u4f5c\u6210<\/a>      <\/li>      <li>        <a href=\"#i-2\">\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u624b\u8efd\u306b\u5c0e\u5165\u3067\u304d\u308bLocust\u306e\u9b45\u529b<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-3\">GUI\u64cd\u4f5c\u306a\u3057\u3067\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u3067\u304d\u308b\u5229\u70b9<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-4\">Locust Python\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-5\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u65b9\u6cd5<\/a>      <\/li>      <li>        <a href=\"#i-6\">\u30b7\u30ca\u30ea\u30aa\u30d5\u30a1\u30a4\u30eb\u306e\u66f8\u304d\u65b9\u3068\u5b9f\u884c\u30b3\u30de\u30f3\u30c9<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-7\">\u30c6\u30b9\u30c8\u7d50\u679c\u306e\u898b\u65b9\u3068\u30ec\u30dd\u30fc\u30c8\u89e3\u91c8\u306e\u30b3\u30c4<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-8\">Locust Python\u3067\u30ea\u30a2\u30eb\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u3092\u5b9f\u65bd\u3059\u308b7\u30b9\u30c6\u30c3\u30d7<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-9\">\u30b9\u30c6\u30c3\u30d71: \u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u6319\u52d5\u3092\u7406\u89e3\u3057\u30b7\u30ca\u30ea\u30aa\u3092\u8a2d\u8a08\u3059\u308b<\/a>      <\/li>      <li>        <a href=\"#i-10\">\u30b9\u30c6\u30c3\u30d72: \u30b7\u30ca\u30ea\u30aa\u30b3\u30fc\u30c9\u3092Python\u3067\u5b9f\u88c5\u3059\u308b<\/a>      <\/li>      <li>        <a href=\"#i-11\">\u30b9\u30c6\u30c3\u30d73: \u60f3\u5b9a\u8ca0\u8377\u306b\u57fa\u3065\u3044\u3066Locust\u306e\u8a2d\u5b9a\u3092\u884c\u3046<\/a>      <\/li>      <li>        <a href=\"#i-12\">\u30b9\u30c6\u30c3\u30d74: \u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3001\u7d50\u679c\u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3059\u308b<\/a>      <\/li>      <li>        <a href=\"#i-13\">\u30b9\u30c6\u30c3\u30d75: \u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3092\u7279\u5b9a\u3057\u3001\u6539\u5584\u30dd\u30a4\u30f3\u30c8\u3092\u6d17\u3044\u51fa\u3059<\/a>      <\/li>      <li>        <a href=\"#i-14\">\u30b9\u30c6\u30c3\u30d76: \u30b3\u30fc\u30c9\u3084\u30b7\u30b9\u30c6\u30e0\u3092\u4fee\u6b63\u3057\u3001\u518d\u30c6\u30b9\u30c8\u3092\u884c\u3046<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-15\">\u30b9\u30c6\u30c3\u30d77: \u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u3057\u3001\u7d99\u7d9a\u7684\u306b\u56de\u3059\u4ed5\u7d44\u307f\u3092\u4f5c\u308b<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-16\">\u3088\u308a\u9ad8\u5ea6\u306aLocust Python\u306e\u4f7f\u3044\u65b9Tips<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-17\">\u8907\u96d1\u306a\u30b7\u30ca\u30ea\u30aa\u3092\u52b9\u7387\u7684\u306b\u8a18\u8ff0\u3059\u308bPython\u306e\u30c6\u30af\u30cb\u30c3\u30af<\/a>      <\/li>      <li>        <a href=\"#i-18\">\u4ed6\u306e\u30c4\u30fc\u30eb\u3068\u9023\u643a\u3057\u3066\u30c6\u30b9\u30c8\u3092\u62e1\u5f35\u3059\u308b\u65b9\u6cd5<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-19\">\u5206\u6563\u30c6\u30b9\u30c8\u306b\u3088\u308b\u5927\u898f\u6a21\u8ca0\u8377\u30c6\u30b9\u30c8\u306e\u5b9f\u65bd\u65b9\u6cd5<\/a>      <\/li>    <\/ul>  <\/li>  <li class=\"last\">    <a href=\"#i-20\">\u307e\u3068\u3081\uff1aLocust Python\u3067\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u3092\u52a0\u901f\u305b\u3088\uff01<\/a>  <\/li><\/ul>\n      \n    <\/div><\/div><h2 class=\"wp-block-heading\" id=\"i-0\">Locust Python\u3068\u306f\u4f55\u304b\uff1f\u305d\u306e\u7279\u5fb4\u3068\u5229\u70b9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Locust Python\u306f\u3001Python\u3067\u66f8\u304b\u308c\u305f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u8ca0\u8377\u30c6\u30b9\u30c8\u30c4\u30fc\u30eb\u3067\u3059\u3002Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u3001API\u306a\u3069\u306e\u30b7\u30b9\u30c6\u30e0\u306b\u5bfe\u3057\u3066\u3001\u5927\u91cf\u306e\u540c\u6642\u30a2\u30af\u30bb\u30b9\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002Locust\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u304c\u3069\u308c\u3060\u3051\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306b\u8010\u3048\u3089\u308c\u308b\u304b\u3092\u691c\u8a3c\u3057\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3092\u7279\u5b9a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-1\">Locust\u306e\u6982\u8981\u3068Python\u306b\u3088\u308b\u30b7\u30ca\u30ea\u30aa\u4f5c\u6210<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u306f\u3001\u30de\u30b9\u30bf\u30fc\u30ce\u30fc\u30c9\u3068\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u304b\u3089\u306a\u308b\u5206\u6563\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u63a1\u7528\u3057\u3066\u304a\u308a\u3001\u5927\u898f\u6a21\u306a\u8ca0\u8377\u30c6\u30b9\u30c8\u304c\u884c\u3048\u307e\u3059\u3002\u30c6\u30b9\u30c8\u30b7\u30ca\u30ea\u30aa\u306fPython\u30b3\u30fc\u30c9\u3068\u3057\u3066\u8a18\u8ff0\u3059\u308b\u305f\u3081\u3001\u958b\u767a\u8005\u306b\u3068\u3063\u3066\u89aa\u548c\u6027\u304c\u9ad8\u3044\u306e\u304c\u7279\u5fb4\u3067\u3059\u3002Locust\u304c\u63d0\u4f9b\u3059\u308b\u30af\u30e9\u30b9\u3084\u30c7\u30b3\u30ec\u30fc\u30bf\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u76f4\u611f\u7684\u306b\u30b7\u30ca\u30ea\u30aa\u3092\u8868\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3067\u3001API\u3078\u306eGET\u30ea\u30af\u30a8\u30b9\u30c8\u3068POST\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3059\u308b\u30b7\u30ca\u30ea\u30aa\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from locust import HttpUser, task, between\n\nclass MyUser(HttpUser):\n    wait_time = between(1, 3)  # 1~3\u79d2\u306e\u30a6\u30a7\u30a4\u30c8\u3092\u8a2d\u5b9a\n\n    @task\n    def my_task(self):\n        self.client.get(\"\/api\/endpoint\")  # API\u306bGET\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\n        self.client.post(\"\/api\/endpoint\", json={\"key\": \"value\"})  # POST\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-2\">\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u624b\u8efd\u306b\u5c0e\u5165\u3067\u304d\u308bLocust\u306e\u9b45\u529b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u306f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30c4\u30fc\u30eb\u3067\u3042\u308b\u305f\u3081\u3001\u7121\u6599\u3067\u5229\u7528\u3067\u304d\u3001\u30b3\u30b9\u30c8\u3092\u6291\u3048\u3089\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3084\u62e1\u5f35\u304c\u53ef\u80fd\u3067\u3059\u3002\u6d3b\u767a\u306a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3088\u308b\u7d99\u7d9a\u7684\u306a\u958b\u767a\u304c\u884c\u308f\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u65b0\u3057\u3044\u6a5f\u80fd\u306e\u8ffd\u52a0\u3084\u4e0d\u5177\u5408\u306e\u4fee\u6b63\u304c\u901f\u3084\u304b\u306b\u884c\u308f\u308c\u308b\u306e\u3082\u30e1\u30ea\u30c3\u30c8\u306e\u4e00\u3064\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5546\u7528\u306e\u30c4\u30fc\u30eb\u3068\u6bd4\u3079\u308b\u3068\u3001\u30d9\u30f3\u30c0\u30fc\u30ed\u30c3\u30af\u30a4\u30f3\u306e\u30ea\u30b9\u30af\u304c\u4f4e\u3044\u306e\u3082\u9b45\u529b\u3067\u3059\u3002Locust\u3067\u4f5c\u6210\u3057\u305f\u30c6\u30b9\u30c8\u30b7\u30ca\u30ea\u30aa\u306f\u3001\u4ed6\u306e\u30c4\u30fc\u30eb\u306b\u79fb\u884c\u3057\u3084\u3059\u3044\u305f\u3081\u3001\u5c06\u6765\u306e\u9078\u629e\u80a2\u3092\u5e83\u304f\u6301\u3066\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-3\">GUI\u64cd\u4f5c\u306a\u3057\u3067\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u3067\u304d\u308b\u5229\u70b9<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u306f\u3001GUI\u3067\u306e\u64cd\u4f5c\u304c\u4e0d\u8981\u306a\u305f\u3081\u3001\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u304c\u5bb9\u6613\u3067\u3059\u3002Jenkins\u3001CircleCI\u306a\u3069\u306eCI\u30c4\u30fc\u30eb\u3068\u9023\u643a\u3055\u305b\u308b\u3053\u3068\u3067\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u3092\u7d99\u7d9a\u7684\u306b\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<br>\u30c6\u30b9\u30c8\u30b7\u30ca\u30ea\u30aa\u304c\u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u3067\u7ba1\u7406\u3055\u308c\u308b\u305f\u3081\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\uff08Git\u7b49\uff09\u306b\u3088\u308b\u5909\u66f4\u5c65\u6b74\u306e\u8ffd\u8de1\u3084\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30b7\u30ca\u30ea\u30aa\u306e\u54c1\u8cea\u3092\u9ad8\u304f\u4fdd\u3061\u3001\u30c1\u30fc\u30e0\u3067\u306e\u5354\u696d\u304c\u30b9\u30e0\u30fc\u30ba\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305f\u3001\u81ea\u52d5\u5316\u306b\u3088\u308a\u3001\u624b\u52d5\u30c6\u30b9\u30c8\u306b\u6bd4\u3079\u5727\u5012\u7684\u306b\u9ad8\u901f\u306b\u30c6\u30b9\u30c8\u304c\u5b9f\u884c\u3067\u304d\u3001\u4eba\u7684\u30df\u30b9\u3082\u9632\u3052\u307e\u3059\u3002<br>\u7d50\u679c\u3068\u3057\u3066\u3001\u77ed\u3044\u30b5\u30a4\u30af\u30eb\u3067 freguent\u306b\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u3092\u56de\u3059\u3053\u3068\u304c\u3067\u304d\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u4fe1\u983c\u6027\u3092\u7d99\u7d9a\u7684\u306b\u62c5\u4fdd\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u306f\u3001\u30b7\u30f3\u30d7\u30eb\u306a\u69cb\u6210\u306a\u304c\u3089\u3082\u5f37\u529b\u306a\u6a5f\u80fd\u3092\u5099\u3048\u305f\u3001\u30a8\u30f3\u30b8\u30cb\u30a2\u53cb\u597d\u7684\u306a\u30c4\u30fc\u30eb\u3068\u8a00\u3048\u308b\u3067\u3057\u3087\u3046\u3002\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3078\u9069\u7528\u3059\u308b\u3053\u3068\u3067\u3001Web\u30b7\u30b9\u30c6\u30e0\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u3092\u52a0\u901f\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-4\">Locust Python\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Locust Python\u3092\u4f7f\u3063\u305f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u306f\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-5\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u65b9\u6cd5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u3001pip\u3092\u4f7f\u3063\u3066Locust\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002Python\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f3.6\u4ee5\u4e0a\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">pip install locust<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001<code>locust<\/code>\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u7528\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b21\u306b\u3001\u30c6\u30b9\u30c8\u30b7\u30ca\u30ea\u30aa\u3092\u8a18\u8ff0\u3057\u305fPython\u30d5\u30a1\u30a4\u30eb\u3092\u7528\u610f\u3057\u307e\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u3001<code>HttpUser<\/code>\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\u3057\u3001<code>task<\/code>\u30c7\u30b3\u30ec\u30fc\u30bf\u3092\u4ed8\u3051\u305f\u30e1\u30bd\u30c3\u30c9\u3067\u30b7\u30ca\u30ea\u30aa\u306e\u30bf\u30b9\u30af\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<code>wait_time<\/code>\u5c5e\u6027\u3067\u3001\u30bf\u30b9\u30af\u9593\u306e\u30a6\u30a7\u30a4\u30c8\u6642\u9593\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-6\">\u30b7\u30ca\u30ea\u30aa\u30d5\u30a1\u30a4\u30eb\u306e\u66f8\u304d\u65b9\u3068\u5b9f\u884c\u30b3\u30de\u30f3\u30c9<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306f\u3001\u30b7\u30ca\u30ea\u30aa\u30d5\u30a1\u30a4\u30eb\u306e\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from locust import HttpUser, task, between\n\nclass MyUser(HttpUser):\n    wait_time = between(1, 3)\n\n    @task\n    def my_task(self):\n        self.client.get(\"\/api\/endpoint\")<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u4f8b\u3067\u306f\u3001<code>MyUser<\/code>\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\u3057\u3001<code>my_task<\/code>\u30e1\u30bd\u30c3\u30c9\u3067<code>\/api\/endpoint<\/code>\u306b\u5bfe\u3057\u3066GET\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u3066\u3044\u307e\u3059\u3002<code>wait_time<\/code>\u5c5e\u6027\u3067\u3001\u30bf\u30b9\u30af\u9593\u306e\u30a6\u30a7\u30a4\u30c8\u6642\u9593\u30921\u301c3\u79d2\u306e\u9593\u3067\u30e9\u30f3\u30c0\u30e0\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b7\u30ca\u30ea\u30aa\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067Locust\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">locust -f scenario.py<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-f<\/code>\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3001\u30b7\u30ca\u30ea\u30aa\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u304c\u8d77\u52d5\u3059\u308b\u3068\u3001WebUI\u304c\u7acb\u3061\u4e0a\u304c\u308a\u307e\u3059\u3002\u30d6\u30e9\u30a6\u30b6\u304b\u3089<code>http:\/\/localhost:8089<\/code>\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001WebUI\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002WebUI\u3067\u30e6\u30fc\u30b6\u30fc\u6570\u3084Spawn rate\u3092\u8a2d\u5b9a\u3057\u3001\u300cStart swarming\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3053\u3068\u3067\u30c6\u30b9\u30c8\u3092\u958b\u59cb\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-7\">\u30c6\u30b9\u30c8\u7d50\u679c\u306e\u898b\u65b9\u3068\u30ec\u30dd\u30fc\u30c8\u89e3\u91c8\u306e\u30b3\u30c4<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c6\u30b9\u30c8\u306e\u5b9f\u884c\u4e2d\u306f\u3001WebUI\u306eStatistics\u30bf\u30d6\u3067\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u7d71\u8a08\u60c5\u5831\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\u30ec\u30b9\u30dd\u30f3\u30b9\u30bf\u30a4\u30e0\u306e\u4e2d\u592e\u5024\u308495\u30d1\u30fc\u30bb\u30f3\u30bf\u30a4\u30eb\u5024\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u6210\u529f\u7387\u306a\u3069\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Charts\u30bf\u30d6\u3067\u306f\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u6570\u3084\u30ec\u30b9\u30dd\u30f3\u30b9\u30bf\u30a4\u30e0\u306e\u63a8\u79fb\u304c\u30b0\u30e9\u30d5\u5316\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u6319\u52d5\u306e\u5909\u5316\u3092\u8996\u899a\u7684\u306b\u628a\u63e1\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Failures\u30bf\u30d6\u3067\u306f\u3001\u5931\u6557\u3057\u305f\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u8a73\u7d30\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3069\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u304b\u3092\u78ba\u8a8d\u3057\u3001\u539f\u56e0\u306e\u7279\u5b9a\u306b\u5f79\u7acb\u3066\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c6\u30b9\u30c8\u7d42\u4e86\u5f8c\u306f\u3001\u30ec\u30dd\u30fc\u30c8\u3092CSV\u3084HTML\u5f62\u5f0f\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30ec\u30dd\u30fc\u30c8\u3092\u57fa\u306b\u3001\u7d50\u679c\u306e\u89e3\u91c8\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ec\u30b9\u30dd\u30f3\u30b9\u30bf\u30a4\u30e0\u304c\u9577\u3044\u3001\u30a8\u30e9\u30fc\u7387\u304c\u9ad8\u3044\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u7279\u5b9a\u3057\u3001\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3068\u306a\u3063\u3066\u3044\u308b\u51e6\u7406\u3092\u6d17\u3044\u51fa\u3057\u307e\u3059\u3002\u30a2\u30af\u30bb\u30b9\u6570\u306e\u5897\u52a0\u306b\u5bfe\u3057\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u30bf\u30a4\u30e0\u3084\u30a8\u30e9\u30fc\u7387\u304c\u3069\u3046\u5909\u5316\u3059\u308b\u304b\u3092\u898b\u308b\u3053\u3068\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u30ad\u30e3\u30d1\u30b7\u30c6\u30a3\u3092\u63a8\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6539\u5584\u65bd\u7b56\u3092\u6253\u3063\u305f\u5f8c\u306b\u518d\u5ea6\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3001\u65bd\u7b56\u524d\u5f8c\u306e\u7d50\u679c\u3092\u6bd4\u8f03\u3059\u308b\u3053\u3068\u3067\u3001\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306e\u52b9\u679c\u3092\u6e2c\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5b9a\u91cf\u7684\u306b\u8a55\u4fa1\u3057\u3001\u6539\u5584\u306ePDCA\u30b5\u30a4\u30af\u30eb\u3092\u56de\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u7d99\u7d9a\u7684\u306a\u30c6\u30b9\u30c8\u306e\u5b9f\u65bd\u304c\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u4fe1\u983c\u6027\u3092\u9ad8\u3081\u308b\u3053\u3068\u306b\u3064\u306a\u304c\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-8\">Locust Python\u3067\u30ea\u30a2\u30eb\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u3092\u5b9f\u65bd\u3059\u308b7\u30b9\u30c6\u30c3\u30d7<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Locust Python\u3092\u4f7f\u3063\u3066\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u3092\u5b9f\u65bd\u3059\u308b\u969b\u306f\u3001\u4ee5\u4e0b\u306e7\u3064\u306e\u30b9\u30c6\u30c3\u30d7\u3092\u8e0f\u3080\u3053\u3068\u304c\u52b9\u679c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-9\">\u30b9\u30c6\u30c3\u30d71: \u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u6319\u52d5\u3092\u7406\u89e3\u3057\u30b7\u30ca\u30ea\u30aa\u3092\u8a2d\u8a08\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u3001\u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u30b7\u30b9\u30c6\u30e0\u3084API\u306e\u4ed5\u69d8\u3092\u628a\u63e1\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u5b9f\u969b\u306e\u5229\u7528\u30b7\u30ca\u30ea\u30aa\u3092\u6d17\u3044\u51fa\u3057\u307e\u3059\u3002\u30b7\u30ca\u30ea\u30aa\u3092\u30bf\u30b9\u30af\u306b\u5206\u89e3\u3057\u3001\u5b9f\u884c\u9806\u3084\u6761\u4ef6\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u5fc5\u8981\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u3084\u691c\u8a3c\u9805\u76ee\u3092\u660e\u78ba\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-10\">\u30b9\u30c6\u30c3\u30d72: \u30b7\u30ca\u30ea\u30aa\u30b3\u30fc\u30c9\u3092Python\u3067\u5b9f\u88c5\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b21\u306b\u3001Locustfile\u306b\u30e6\u30fc\u30b6\u30fc\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\u3057\u3001\u30bf\u30b9\u30af\u3092\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u5b9f\u88c5\u3057\u307e\u3059\u3002API\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u9001\u4fe1\u306b\u306f<code>self.client.get()<\/code>\u3084<code>self.client.post()<\/code>\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9\u3084\u5185\u5bb9\u3092\u691c\u8a3c\u3059\u308b\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u3082\u5fd8\u308c\u305a\u306b\u5165\u308c\u307e\u3057\u3087\u3046\u3002\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001\u521d\u671f\u5316\u3084\u5f8c\u51e6\u7406\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306f\u3001\u30b7\u30ca\u30ea\u30aa\u30b3\u30fc\u30c9\u306e\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from locust import HttpUser, task, between\n\nclass MyUser(HttpUser):\n    wait_time = between(1, 3)\n\n    def on_start(self):\n        # \u521d\u671f\u5316\u51e6\u7406\n        self.client.post(\"\/api\/login\", json={\"username\": \"test_user\", \"password\": \"test_pass\"})\n\n    @task\n    def task1(self):\n        response = self.client.get(\"\/api\/endpoint\")\n        assert response.status_code == 200\n        assert \"expected_text\" in response.text\n\n    @task\n    def task2(self):\n        data = {\"key1\": \"value1\", \"key2\": \"value2\"}\n        response = self.client.post(\"\/api\/endpoint\", json=data)\n        assert response.status_code == 201\n        assert response.json()[\"result\"] == \"success\"<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-11\">\u30b9\u30c6\u30c3\u30d73: \u60f3\u5b9a\u8ca0\u8377\u306b\u57fa\u3065\u3044\u3066Locust\u306e\u8a2d\u5b9a\u3092\u884c\u3046<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u60f3\u5b9a\u3059\u308b\u540c\u6642\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u6570\u3068\u30e6\u30fc\u30b6\u30fc\u6570\u306e\u5897\u52a0\u30da\u30fc\u30b9\u3092\u6c7a\u3081\u307e\u3059\u3002\u307e\u305f\u3001Web\u30a2\u30af\u30bb\u30b9\u306e\u30a6\u30a7\u30a4\u30c8\u6642\u9593\u3092\u8abf\u6574\u3057\u3001\u73fe\u5b9f\u7684\u306a\u8ca0\u8377\u3092\u518d\u73fe\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-12\">\u30b9\u30c6\u30c3\u30d74: \u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3001\u7d50\u679c\u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u3092\u8d77\u52d5\u3057\u3001WebUI\u304b\u3089\u8a2d\u5b9a\u3092\u5165\u529b\u3057\u3066\u30c6\u30b9\u30c8\u3092\u958b\u59cb\u3057\u307e\u3059\u3002\u30c6\u30b9\u30c8\u5b9f\u884c\u4e2d\u306f\u3001WebUI\u3067\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u7d71\u8a08\u60c5\u5831\u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3057\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3044\u306a\u3044\u304b\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u30bf\u30a4\u30e0\u304c\u8a31\u5bb9\u7bc4\u56f2\u5185\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u5fc5\u8981\u306a\u30e1\u30c8\u30ea\u30af\u30b9\u306f\u8a18\u9332\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-13\">\u30b9\u30c6\u30c3\u30d75: \u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3092\u7279\u5b9a\u3057\u3001\u6539\u5584\u30dd\u30a4\u30f3\u30c8\u3092\u6d17\u3044\u51fa\u3059<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c6\u30b9\u30c8\u7d50\u679c\u304b\u3089\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u30bf\u30a4\u30e0\u304c\u9577\u3044\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3084\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u3044\u308b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u7279\u5b9a\u3057\u307e\u3059\u3002\u30a2\u30af\u30bb\u30b9\u6570\u3068\u6027\u80fd\u306e\u95a2\u4fc2\u3092\u30b0\u30e9\u30d5\u3067\u53ef\u8996\u5316\u3057\u3001\u50be\u5411\u3092\u8aad\u307f\u53d6\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3068\u306a\u3063\u3066\u3044\u308b\u30ea\u30bd\u30fc\u30b9\u3092\u63a8\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-14\">\u30b9\u30c6\u30c3\u30d76: \u30b3\u30fc\u30c9\u3084\u30b7\u30b9\u30c6\u30e0\u3092\u4fee\u6b63\u3057\u3001\u518d\u30c6\u30b9\u30c8\u3092\u884c\u3046<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u7279\u5b9a\u3057\u305f\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u7b87\u6240\u306e\u30b3\u30fc\u30c9\u3092\u898b\u76f4\u3057\u3001\u6539\u5584\u3057\u307e\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u30ea\u30bd\u30fc\u30b9\u3092\u5897\u5f37\u3059\u308b\u306a\u3069\u3001\u30a4\u30f3\u30d5\u30e9\u9762\u306e\u6539\u5584\u3082\u691c\u8a0e\u3057\u307e\u3057\u3087\u3046\u3002\u4fee\u6b63\u5f8c\u3001\u518d\u5ea6\u30b9\u30c6\u30c3\u30d74\u306e\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3001\u6539\u5584\u52b9\u679c\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-15\">\u30b9\u30c6\u30c3\u30d77: \u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u3057\u3001\u7d99\u7d9a\u7684\u306b\u56de\u3059\u4ed5\u7d44\u307f\u3092\u4f5c\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u5f8c\u306b\u3001\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3068\u7d99\u7d9a\u7684\u306a\u5b9f\u884c\u306e\u4ed5\u7d44\u307f\u3092\u4f5c\u308a\u307e\u3059\u3002CI\u30c4\u30fc\u30eb\u3068\u9023\u643a\u3057\u3001\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5b9f\u884c\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002\u5b9a\u671f\u7684\u306b\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3001\u7d50\u679c\u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3057\u307e\u3059\u3002\u30b7\u30b9\u30c6\u30e0\u306e\u5909\u66f4\u6642\u306b\u306f\u3001\u81ea\u52d5\u7684\u306b\u30c6\u30b9\u30c8\u304c\u8d70\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u30c6\u30b9\u30c8\u7d50\u679c\u306f\u53ef\u8996\u5316\u3057\u3001\u30c1\u30fc\u30e0\u5185\u3067\u5171\u6709\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0a\u306e7\u3064\u306e\u30b9\u30c6\u30c3\u30d7\u3092\u7e70\u308a\u8fd4\u3057\u5b9f\u65bd\u3059\u308b\u3053\u3068\u3067\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u3092\u30b7\u30b9\u30c6\u30e0\u6539\u5584\u306ePDCA\u30b5\u30a4\u30af\u30eb\u306b\u7d44\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5404\u30b9\u30c6\u30c3\u30d7\u3067\u5f97\u3089\u308c\u305f\u77e5\u898b\u3092\u84c4\u7a4d\u3057\u3001\u7d99\u7d9a\u7684\u306b\u30b7\u30b9\u30c6\u30e0\u3092\u6539\u5584\u3057\u3066\u3044\u304f\u3053\u3068\u304c\u3001\u5b89\u5b9a\u3057\u305f\u30b5\u30fc\u30d3\u30b9\u904b\u7528\u306b\u3064\u306a\u304c\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locust Python\u306f\u3001\u30b7\u30f3\u30d7\u30eb\u306a\u8a18\u8ff0\u3067\u30ea\u30a2\u30eb\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u3092\u5b9f\u73fe\u3067\u304d\u308b\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002\u305c\u3072\u3001\u3053\u306e\u30b9\u30c6\u30c3\u30d7\u30ac\u30a4\u30c9\u3092\u53c2\u8003\u306b\u3001\u81ea\u793e\u306e\u30b7\u30b9\u30c6\u30e0\u3078\u306e\u9069\u7528\u3092\u691c\u8a0e\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e \u201c\u898b\u3048\u308b\u5316\u201d \u304b\u3089\u59cb\u307e\u308b\u6539\u5584\u6d3b\u52d5\u304c\u3001\u30d3\u30b8\u30cd\u30b9\u306e\u6210\u529f\u3092\u652f\u3048\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-16\">\u3088\u308a\u9ad8\u5ea6\u306aLocust Python\u306e\u4f7f\u3044\u65b9Tips<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306b\u3001\u3088\u308a\u9ad8\u5ea6\u306a\u4f7f\u3044\u65b9\u306eTips\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-17\">\u8907\u96d1\u306a\u30b7\u30ca\u30ea\u30aa\u3092\u52b9\u7387\u7684\u306b\u8a18\u8ff0\u3059\u308bPython\u306e\u30c6\u30af\u30cb\u30c3\u30af<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b7\u30ca\u30ea\u30aa\u304c\u8907\u96d1\u306b\u306a\u3063\u3066\u304f\u308b\u3068\u3001\u30b3\u30fc\u30c9\u306e\u8aad\u307f\u3084\u3059\u3055\u3084\u4fdd\u5b88\u6027\u304c\u60aa\u5316\u3057\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u30b7\u30ca\u30ea\u30aa\u3092\u30af\u30e9\u30b9\u3084\u30e1\u30bd\u30c3\u30c9\u306b\u5206\u5272\u3057\u3001\u518d\u5229\u7528\u6027\u3092\u9ad8\u3081\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305f\u3001<code>TaskSet<\/code>\u3092\u4f7f\u3063\u3066\u95a2\u9023\u3059\u308b\u30bf\u30b9\u30af\u3092\u30b0\u30eb\u30fc\u30d7\u5316\u3059\u308b\u3053\u3068\u3067\u3001\u30b7\u30ca\u30ea\u30aa\u306e\u69cb\u9020\u304c\u660e\u78ba\u306b\u306a\u308a\u307e\u3059\u3002<code>on_start<\/code>\u3084<code>on_stop<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u6d3b\u7528\u3059\u308c\u3070\u3001\u521d\u671f\u5316\u51e6\u7406\u3084\u5f8c\u51e6\u7406\u3092\u5171\u901a\u5316\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>wait_time<\/code>\u3092\u52d5\u7684\u306b\u5909\u66f4\u3059\u308b\u3053\u3068\u3067\u3001\u591a\u69d8\u306a\u8ca0\u8377\u30d1\u30bf\u30fc\u30f3\u3092\u8868\u73fe\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u30d4\u30fc\u30af\u6642\u306e\u8ca0\u8377\u3092\u518d\u73fe\u3057\u305f\u3044\u5834\u5408\u306f\u3001<code>wait_time<\/code>\u3092\u77ed\u304f\u3059\u308b\u3053\u3068\u3067\u5b9f\u73fe\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306f\u3001\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u6d3b\u7528\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from locust import HttpUser, TaskSet, task, between\n\ndef login(self):\n    self.client.post(\"\/login\", json={\"username\": \"testuser\", \"password\": \"testpass\"})\n\ndef logout(self):\n    self.client.post(\"\/logout\")\n\nclass UserTasks(TaskSet):\n    def on_start(self):\n        login(self)\n\n    @task\n    def task1(self):\n        self.client.get(\"\/api\/endpoint1\")\n\n    @task\n    def task2(self):\n        self.client.post(\"\/api\/endpoint2\", json={\"key\": \"value\"})\n\n    def on_stop(self):\n        logout(self)\n\nclass MyUser(HttpUser):\n    tasks = [UserTasks]\n    wait_time = between(1, 5)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-18\">\u4ed6\u306e\u30c4\u30fc\u30eb\u3068\u9023\u643a\u3057\u3066\u30c6\u30b9\u30c8\u3092\u62e1\u5f35\u3059\u308b\u65b9\u6cd5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u3068\u4ed6\u306e\u30c4\u30fc\u30eb\u3092\u9023\u643a\u3055\u305b\u308b\u3053\u3068\u3067\u3001\u30c6\u30b9\u30c8\u306e\u5e45\u3092\u5e83\u3052\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u3048\u3070\u3001Prometheus\u306a\u3069\u306e\u76e3\u8996\u30c4\u30fc\u30eb\u3068\u9023\u643a\u3057\u3001Locust\u306e\u30e1\u30c8\u30ea\u30af\u30b9\u3092\u53ce\u96c6\u30fb\u53ef\u8996\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002Grafana\u3092\u4f7f\u3063\u3066\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u4f5c\u6210\u3059\u308c\u3070\u3001\u30c6\u30b9\u30c8\u7d50\u679c\u3092\u4fef\u77b0\u3057\u3084\u3059\u304f\u306a\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305f\u3001Jenkins\u306a\u3069\u306eCI\/CD\u30c4\u30fc\u30eb\u3068\u9023\u643a\u3055\u305b\u3001\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5b9f\u884c\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002\u30c6\u30b9\u30c8\u3092\u30d3\u30eb\u30c9\uff0f\u30c7\u30d7\u30ed\u30a4\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306b\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u7d99\u7d9a\u7684\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">UI\u30c6\u30b9\u30c8\u30c4\u30fc\u30eb\u3067\u3042\u308bSelenium\u3084Appium\u3068\u7d44\u307f\u5408\u308f\u305b\u308c\u3070\u3001\u8ca0\u8377\u30c6\u30b9\u30c8\u3068UI\u30c6\u30b9\u30c8\u3092\u540c\u6642\u306b\u5b9f\u65bd\u3067\u304d\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u64cd\u4f5c\u306b\u8fd1\u3044\u5f62\u3067\u306e\u30c6\u30b9\u30c8\u304c\u884c\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-19\">\u5206\u6563\u30c6\u30b9\u30c8\u306b\u3088\u308b\u5927\u898f\u6a21\u8ca0\u8377\u30c6\u30b9\u30c8\u306e\u5b9f\u65bd\u65b9\u6cd5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u306f\u5206\u6563\u74b0\u5883\u3067\u306e\u30c6\u30b9\u30c8\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<code>--master<\/code>\u30d5\u30e9\u30b0\u3092\u4f7f\u3063\u3066\u30de\u30b9\u30bf\u30fc\u30ce\u30fc\u30c9\u3092\u8d77\u52d5\u3057\u3001\u8907\u6570\u306e\u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u3092\u7528\u610f\u3059\u308b\u3053\u3068\u3067\u3001\u5927\u898f\u6a21\u306a\u8ca0\u8377\u30c6\u30b9\u30c8\u304c\u5b9f\u65bd\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306f\u3001\u5206\u6563\u30c6\u30b9\u30c8\u306e\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u30de\u30b9\u30bf\u30fc\u30ce\u30fc\u30c9\u306e\u8d77\u52d5\nlocust -f locustfile.py --master\n\n# \u30ef\u30fc\u30ab\u30fc\u30ce\u30fc\u30c9\u306e\u8d77\u52d5\nlocust -f locustfile.py --worker --master-host=&lt;\u30de\u30b9\u30bf\u30fc\u30ce\u30fc\u30c9\u306eIP\u30a2\u30c9\u30ec\u30b9&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>--expect-workers<\/code>\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30ef\u30fc\u30ab\u30fc\u6570\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u5168\u30ce\u30fc\u30c9\u306e\u8d77\u52d5\u3092\u5f85\u3063\u3066\u304b\u3089\u30c6\u30b9\u30c8\u3092\u958b\u59cb\u3067\u304d\u307e\u3059\u3002<br>\u30c6\u30b9\u30c8\u5b9f\u884c\u4e2d\u306f\u3001\u30de\u30b9\u30bf\u30fc\u30ce\u30fc\u30c9\u306eWebUI\u3067\u30ef\u30fc\u30ab\u30fc\u306e\u72b6\u614b\u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5206\u6563\u30c6\u30b9\u30c8\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u6570\u4e07\u3001\u6570\u5341\u4e07\u898f\u6a21\u306e\u540c\u6642\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u6570\u3067\u306e\u30c6\u30b9\u30c8\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u672c\u756a\u74b0\u5883\u306b\u8fd1\u3044\u8ca0\u8377\u3092\u304b\u3051\u308b\u3053\u3068\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u9650\u754c\u70b9\u3092\u898b\u6975\u3081\u3089\u308c\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0a\u3001Locust\u306e\u9ad8\u5ea6\u306a\u4f7f\u3044\u65b9\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\u3053\u3068\u3067\u3001\u30c6\u30b9\u30c8\u306e\u7cbe\u5ea6\u3068\u52b9\u7387\u3092\u9ad8\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br>\u30b7\u30ca\u30ea\u30aa\u306e\u69cb\u9020\u5316\u3001\u4ed6\u30c4\u30fc\u30eb\u3068\u306e\u9023\u643a\u3001\u5206\u6563\u30c6\u30b9\u30c8\u306e\u6d3b\u7528\u306a\u3069\u3001\u3055\u307e\u3056\u307e\u306a\u5de5\u592b\u3092\u53d6\u308a\u5165\u308c\u3066\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u3092\u6210\u529f\u306b\u5c0e\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-20\">\u307e\u3068\u3081\uff1aLocust Python\u3067\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u3092\u52a0\u901f\u305b\u3088\uff01<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u8a18\u4e8b\u3067\u306f\u3001Locust Python\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u3001\u3088\u308a\u5b9f\u8df5\u7684\u306aTips\u307e\u3067\u3092\u5e45\u5e83\u304f\u7d39\u4ecb\u3057\u3066\u304d\u307e\u3057\u305f\u3002<br>\u3053\u3053\u3067\u6539\u3081\u3066\u3001Locust Python\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u306e\u91cd\u8981\u6027\u3092\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u306f\u3001Python\u3067\u66f8\u304b\u308c\u305f\u30b7\u30ca\u30ea\u30aa\u3092\u4f7f\u3063\u3066\u30c6\u30b9\u30c8\u3092\u884c\u3046\u305f\u3081\u3001\u958b\u767a\u8005\u306e\u8996\u70b9\u3067\u304d\u3081\u7d30\u304b\u306a\u691c\u8a3c\u304c\u53ef\u80fd\u3067\u3059\u3002<br>\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u306b\u3088\u308a\u3001\u4eba\u7684\u30df\u30b9\u3092\u6392\u9664\u3057\u3001\u52b9\u7387\u3068\u518d\u73fe\u6027\u3092\u9ad8\u3081\u3089\u308c\u307e\u3059\u3002<br>\u307e\u305f\u3001\u5206\u6563\u30c6\u30b9\u30c8\u306b\u3088\u3063\u3066\u3001\u6570\u4e07\u3001\u6570\u5341\u4e07\u898f\u6a21\u306e\u30e6\u30fc\u30b6\u30fc\u6570\u3067\u306e\u30c6\u30b9\u30c8\u3092\u5b9f\u73fe\u3067\u304d\u308b\u306e\u3082\u5927\u304d\u306a\u5229\u70b9\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u3092\u4ed6\u306e\u30c4\u30fc\u30eb\u3068\u9023\u643a\u3055\u305b\u308b\u3053\u3068\u3067\u3001\u30c6\u30b9\u30c8\u306e\u5e45\u304c\u3055\u3089\u306b\u5e83\u304c\u308a\u307e\u3059\u3002<br>\u4f8b\u3048\u3070\u3001\u76e3\u8996\u30c4\u30fc\u30eb\u3068\u7d44\u307f\u5408\u308f\u305b\u308c\u3070\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6307\u6a19\u306e\u53ef\u8996\u5316\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<br>UI\u30c6\u30b9\u30c8\u30c4\u30fc\u30eb\u3068\u306e\u4f75\u7528\u3067\u3001\u3088\u308a\u30ea\u30a2\u30eb\u306a\u30e6\u30fc\u30b6\u30fc\u64cd\u4f5c\u306b\u8fd1\u3044\u5f62\u3067\u306e\u30c6\u30b9\u30c8\u3082\u53ef\u80fd\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30ea\u30c3\u30c8\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3092\u65e9\u671f\u306b\u767a\u898b\u3057\u3001\u5bfe\u7b56\u3067\u304d\u308b<\/li>\n\n\n\n<li>\u30b5\u30fc\u30d3\u30b9\u306e\u5b89\u5b9a\u7a3c\u50cd\u3068\u3001\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u306e\u5411\u4e0a\u306b\u3064\u306a\u304c\u308b<\/li>\n\n\n\n<li>\u958b\u767a\u5de5\u6570\u3092\u524a\u6e1b\u3057\u3064\u3064\u3001\u9ad8\u54c1\u8cea\u306a\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3067\u304d\u308b<\/li>\n\n\n\n<li>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u306ePDCA\u30b5\u30a4\u30af\u30eb\u3092\u56de\u3057\u3001\u7d99\u7d9a\u7684\u306a\u6539\u5584\u304c\u53ef\u80fd\u306b\u306a\u308b<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u3067\u306f\u3001\u306a\u305c\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u3092\u65e5\u3005\u306e\u958b\u767a\u30d7\u30ed\u30bb\u30b9\u306b\u7d44\u307f\u8fbc\u3080\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b7\u30b9\u30c6\u30e0\u306e\u898f\u6a21\u304c\u5927\u304d\u304f\u306a\u308b\u307b\u3069\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u554f\u984c\u306f\u9855\u5728\u5316\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<br>\u5f8c\u304b\u3089\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3092\u884c\u3046\u3068\u3001\u5927\u304d\u306a\u30b3\u30b9\u30c8\u304c\u304b\u304b\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br>\u30ea\u30ea\u30fc\u30b9\u5f8c\u306b\u6027\u80fd\u554f\u984c\u304c\u767a\u751f\u3059\u308c\u3070\u3001\u30d3\u30b8\u30cd\u30b9\u306b\u751a\u5927\u306a\u5f71\u97ff\u3092\u53ca\u307c\u3057\u304b\u306d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u610f\u8b58\u3057\u305f\u958b\u767a\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u9577\u671f\u7684\u306a\u6210\u9577\u3092\u652f\u3048\u308b\u57fa\u76e4\u3068\u306a\u308b\u306e\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locust Python\u306f\u3001\u958b\u767a\u8005\u306b\u3068\u3063\u3066\u4f7f\u3044\u3084\u3059\u304f\u3001\u52b9\u679c\u7684\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u30c4\u30fc\u30eb\u3067\u3059\u3002<br>\u30b7\u30ca\u30ea\u30aa\u306e\u4f5c\u6210\u304b\u3089\u5206\u6563\u30c6\u30b9\u30c8\u307e\u3067\u3001Locust\u3092\u4f7f\u3048\u3070\u7c21\u5358\u306b\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30fc\u30c9\u304b\u3089\u59cb\u3081\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from locust import HttpUser, task, between\n\nclass MyUser(HttpUser):\n    wait_time = between(1, 3)\n\n    @task\n    def my_task(self):\n        self.client.get(\"\/api\/endpoint\")<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u305c\u3072\u3001Locust\u3092\u6d3b\u7528\u3057\u3066\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u3092\u30ea\u30ea\u30fc\u30b9\u30b5\u30a4\u30af\u30eb\u306b\u7d44\u307f\u8fbc\u3093\u3067\u307f\u3066\u304f\u3060\u3055\u3044\u3002<br>\u65e5\u3005\u306e\u7a4d\u307f\u91cd\u306d\u304c\u3001\u30d3\u30b8\u30cd\u30b9\u306e\u6210\u9577\u3068\u5b89\u5b9a\u7a3c\u50cd\u3092\u652f\u3048\u308b\u3053\u3068\u306b\u3064\u306a\u304c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Locust\u3092\u5473\u65b9\u306b\u3064\u3051\u3066\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u3092\u52a0\u901f\u3055\u305b\u307e\u3057\u3087\u3046\uff01<br>\u3088\u308a\u826f\u3044\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u306e\u63d0\u4f9b\u3068\u3001\u30d3\u30b8\u30cd\u30b9\u306e\u767a\u5c55\u306b\u5f79\u7acb\u3066\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Web\u30b7\u30b9\u30c6\u30e0\u306e\u5b89\u5b9a\u7a3c\u50cd\u3068\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u306e\u5411\u4e0a\u306b\u306f\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6539\u5584\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c6\u30b9\u30c8\u30c4\u30fc\u30eb\u300cLocust\u300d\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3001\u52b9\u7387\u7684\u306b\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3092\u767a\u898b\u3057\u3001\u5bfe\u7b56\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u672c\u8a18 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":634,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-633","post","type-post","status-publish","format-standard","has-post-thumbnail","category-python"],"_links":{"self":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts\/633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=633"}],"version-history":[{"count":1,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts\/633\/revisions"}],"predecessor-version":[{"id":635,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts\/633\/revisions\/635"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/media\/634"}],"wp:attachment":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}