title: Customizing Locust input params
body: <p>So I have locust running in a distributed set up on k8s. Currently I am kicking off load tests via the UI. In my current set up, the master and worker processes are running already and are waiting for me to kick off the load test via the UI. I am looking to add some input customization for my locust set up. I just want to accept some more params like endpoint weights and such. This then should attach to the already existing locust process and kick off a load test with the proper configuration. I know locust supports extending UI to see more of the load test output, but I couldn't find anything that would extend/customize the input form.</p>
  <p><a href="https://i.stack.imgur.com/v5iyf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v5iyf.png" alt="enter image description here" /></a></p>
  <p>[EDIT]</p>
  <p>I am trying to use <a href="https://docs.locust.io/en/latest/extending-locust.html#custom-arguments" rel="nofollow noreferrer">custom arguments</a> and it doesn't seem to be working. Here is my code</p>
  <pre><code>class CusLoadTest(HttpUser):
  
        @events.init_command_line_parser.add_listener
        def _(parser):
           parser.add_argument(&quot;--user-count&quot;, type=str, env_var=&quot;USER_COUNT&quot;, default=&quot;1000&quot;, help=&quot;1000&quot;)
  
        def __init__(self, parent):
            super(CusLoadTest, self).__init__(parent)
  
        def __check_environment(self):
           self.user_count = int(self.environment.parsed_options.user_count)
           logger.info(&quot;Using {}&quot;.format(self.user_count))
  
        def on_start(self):
            self.__check_environment()
  </code></pre>
  <p>The logger always prints 1000 users and ignores anything I pass into the web UI. Not sure what is happening.</p>