-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
response_length=response.ByteSize()) | ||
|
||
|
||
class MyLocust(Locust): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you change names started with My...
? i.e. to LocustTaskSet, LocustTests, LocusClass etc
|
||
class MyTaskSet(TaskSet): | ||
data_for_requests = [] | ||
GRPC_ADDRESS = os.environ.get('GRPC_ADDRESS', "URL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you consider getting all these values from args, not from envs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it, but locust doesn't provide any custom arguments interface so i would have to write some workarounds.
locustio/locust#65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few suggestions 😄
```` | ||
GRPC_ADDRESS # address to grpc endpoint | ||
MODEL_NAME = # model name; default value=resnet | ||
TENSOR_NAME # input tensor name' default value=in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TENSOR_NAME # input tensor name' default value=in | |
TENSOR_NAME # input tensor name; default value=in |
tf_contrib_util.make_tensor_proto(self.imgs, shape=(self.imgs.shape))) | ||
|
||
def on_stop(self): | ||
print("Tasks was stopped") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print("Tasks was stopped") | |
print("Tasks have been stopped") |
A script was prepared to launch specific amount of locust instances, by passing integer to bash script. | ||
Without passing any parameter script will launch Locust in distributed mode with 2 slaves. | ||
If you want to perform as many RPS as possible we recommend to spawn 1 slave for 1 CPU core. | ||
Also this script creates temporary file `pid_locust` which keep PID of processes launched by this script. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this script creates temporary file `pid_locust` which keep PID of processes launched by this script. | |
Also this script creates temporary file `pid_locust` which keeps PID of processes launched by this script. |
## Stop Locust | ||
|
||
We run all instances as background process, so to stop load tests you can use our script ```./stop_locust``` | ||
, which also remove temporary file created earlier or read PIDs in `pid_locust` file and simply kill processes listed in that file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
, which also remove temporary file created earlier or read PIDs in `pid_locust` file and simply kill processes listed in that file. | |
, which also removes temporary file created earlier or read PIDs in `pid_locust` file and simply kill processes listed in that file. |
|
||
|
||
## Description | ||
Script available under this directory allow users to execute on their own load tests. Prepared [Locust class](image_locust.py) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script available under this directory allow users to execute on their own load tests. Prepared [Locust class](image_locust.py) | |
Script available under this directory allows users to execute their own load tests. Prepared [Locust class](image_locust.py) |
|
||
## Description | ||
Script available under this directory allow users to execute on their own load tests. Prepared [Locust class](image_locust.py) | ||
on start loads environment variables and images also create grpc stub. In hatching phase this client only perform request to GRPC service using earlier loaded images. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on start loads environment variables and images also create grpc stub. In hatching phase this client only perform request to GRPC service using earlier loaded images. | |
loads configuration from environment variables and creates grpc stub in `on start` method. In hatching phase this client only performs requests to GRPC service using earlier loaded images. |
Summary of changes: