LocustIO: User swarm











up vote
0
down vote

favorite












I am trying out Locust. Here you are able to swarm your system with simulated number of users within a specified hatch rate.



class UserBehavior(TaskSet):  
def on_start(self):
self.login()

def login(self):
payload = {"grant_type": "password",
"username": self.my_user,
"password": self.my_pw,
...
}
}
headers = {'content-type': 'application/json'}
response = self.client.post("/rest/v10/oauth2/token", data=json.dumps(payload), headers=headers, catch_response=True)
self.token = response.json()['access_token']

@task(1)
def fetch_accounts(self):
headers = {'oauth-token': self.token}
response = self.client.get("/rest/v10/Accounts", headers=headers)


What is the implication of using:




  1. A single self.my_user and self.my_pw with Number of users to simulate: 5


  2. 5 different self.my_user and self.my_pw with Number of users to simulate: 1


  3. 5 different self.my_user and self.my_pw with Number of users to simulate: 5


Which of the three provides a more reliable output for a load testing report?










share|improve this question




























    up vote
    0
    down vote

    favorite












    I am trying out Locust. Here you are able to swarm your system with simulated number of users within a specified hatch rate.



    class UserBehavior(TaskSet):  
    def on_start(self):
    self.login()

    def login(self):
    payload = {"grant_type": "password",
    "username": self.my_user,
    "password": self.my_pw,
    ...
    }
    }
    headers = {'content-type': 'application/json'}
    response = self.client.post("/rest/v10/oauth2/token", data=json.dumps(payload), headers=headers, catch_response=True)
    self.token = response.json()['access_token']

    @task(1)
    def fetch_accounts(self):
    headers = {'oauth-token': self.token}
    response = self.client.get("/rest/v10/Accounts", headers=headers)


    What is the implication of using:




    1. A single self.my_user and self.my_pw with Number of users to simulate: 5


    2. 5 different self.my_user and self.my_pw with Number of users to simulate: 1


    3. 5 different self.my_user and self.my_pw with Number of users to simulate: 5


    Which of the three provides a more reliable output for a load testing report?










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying out Locust. Here you are able to swarm your system with simulated number of users within a specified hatch rate.



      class UserBehavior(TaskSet):  
      def on_start(self):
      self.login()

      def login(self):
      payload = {"grant_type": "password",
      "username": self.my_user,
      "password": self.my_pw,
      ...
      }
      }
      headers = {'content-type': 'application/json'}
      response = self.client.post("/rest/v10/oauth2/token", data=json.dumps(payload), headers=headers, catch_response=True)
      self.token = response.json()['access_token']

      @task(1)
      def fetch_accounts(self):
      headers = {'oauth-token': self.token}
      response = self.client.get("/rest/v10/Accounts", headers=headers)


      What is the implication of using:




      1. A single self.my_user and self.my_pw with Number of users to simulate: 5


      2. 5 different self.my_user and self.my_pw with Number of users to simulate: 1


      3. 5 different self.my_user and self.my_pw with Number of users to simulate: 5


      Which of the three provides a more reliable output for a load testing report?










      share|improve this question















      I am trying out Locust. Here you are able to swarm your system with simulated number of users within a specified hatch rate.



      class UserBehavior(TaskSet):  
      def on_start(self):
      self.login()

      def login(self):
      payload = {"grant_type": "password",
      "username": self.my_user,
      "password": self.my_pw,
      ...
      }
      }
      headers = {'content-type': 'application/json'}
      response = self.client.post("/rest/v10/oauth2/token", data=json.dumps(payload), headers=headers, catch_response=True)
      self.token = response.json()['access_token']

      @task(1)
      def fetch_accounts(self):
      headers = {'oauth-token': self.token}
      response = self.client.get("/rest/v10/Accounts", headers=headers)


      What is the implication of using:




      1. A single self.my_user and self.my_pw with Number of users to simulate: 5


      2. 5 different self.my_user and self.my_pw with Number of users to simulate: 1


      3. 5 different self.my_user and self.my_pw with Number of users to simulate: 5


      Which of the three provides a more reliable output for a load testing report?







      python load-testing locust






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 at 0:09

























      asked Nov 16 at 2:58









      Dee

      118315




      118315
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Short answer



          It depends on the behavior of your application under load.



          Long answer



          Generally, you want the simulated load to match the real load as closely as possible. In real load, it's not very likely that all the users would use the same username/password, nor that a single user would use many username/passwords. So I would say that your option 3 is probably the most realistic. But again, it depends on your application. If it turns out that your application behaves the same regardless of the number of distinct username/password combinations, then it might not matter at all.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53330791%2flocustio-user-swarm%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            Short answer



            It depends on the behavior of your application under load.



            Long answer



            Generally, you want the simulated load to match the real load as closely as possible. In real load, it's not very likely that all the users would use the same username/password, nor that a single user would use many username/passwords. So I would say that your option 3 is probably the most realistic. But again, it depends on your application. If it turns out that your application behaves the same regardless of the number of distinct username/password combinations, then it might not matter at all.






            share|improve this answer

























              up vote
              1
              down vote



              accepted










              Short answer



              It depends on the behavior of your application under load.



              Long answer



              Generally, you want the simulated load to match the real load as closely as possible. In real load, it's not very likely that all the users would use the same username/password, nor that a single user would use many username/passwords. So I would say that your option 3 is probably the most realistic. But again, it depends on your application. If it turns out that your application behaves the same regardless of the number of distinct username/password combinations, then it might not matter at all.






              share|improve this answer























                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                Short answer



                It depends on the behavior of your application under load.



                Long answer



                Generally, you want the simulated load to match the real load as closely as possible. In real load, it's not very likely that all the users would use the same username/password, nor that a single user would use many username/passwords. So I would say that your option 3 is probably the most realistic. But again, it depends on your application. If it turns out that your application behaves the same regardless of the number of distinct username/password combinations, then it might not matter at all.






                share|improve this answer












                Short answer



                It depends on the behavior of your application under load.



                Long answer



                Generally, you want the simulated load to match the real load as closely as possible. In real load, it's not very likely that all the users would use the same username/password, nor that a single user would use many username/passwords. So I would say that your option 3 is probably the most realistic. But again, it depends on your application. If it turns out that your application behaves the same regardless of the number of distinct username/password combinations, then it might not matter at all.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 19 at 0:35









                Flight Odyssey

                1,6731218




                1,6731218






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53330791%2flocustio-user-swarm%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    Origin of the phrase “under your belt”?