类 WeighingTaskSet

所有已实现的接口:
Runnable

public class WeighingTaskSet extends AbstractTaskSet
从以下版本开始:
1.0.3
作者:
myzhan
  • 构造器详细资料

    • WeighingTaskSet

      public WeighingTaskSet(String name, int weight)
  • 方法详细资料

    • addTask

      public void addTask(AbstractTask task)
      从类复制的说明: AbstractTaskSet
      Add a task to the task set.
      指定者:
      addTask 在类中 AbstractTaskSet
      参数:
      task - test task that runs in a task set
    • getTask

      public AbstractTask getTask(int roll)
    • getWeight

      public int getWeight()
      从类复制的说明: AbstractTask
      When locust runs multiple tasks, their weights are used to allocate threads. When locust runs one task set with all the tasks, their weights are used to invoke "execute" method, which means RPS most of the time.
      指定者:
      getWeight 在类中 AbstractTask
      返回:
      the weight
    • getName

      public String getName()
      从类复制的说明: AbstractTask
      Get the name of task.
      指定者:
      getName 在类中 AbstractTask
      返回:
      the name
    • execute

      public void execute() throws Exception
      从类复制的说明: AbstractTask
      Test scenarios should be implemented in this method, like sending http request.
      指定者:
      execute 在类中 AbstractTask
      抛出:
      Exception - test scenarios may throw exception.