Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Report in multi-worker setup #1610

Closed
mezhaka opened this issue Oct 28, 2020 · 9 comments
Closed

Download Report in multi-worker setup #1610

mezhaka opened this issue Oct 28, 2020 · 9 comments

Comments

@mezhaka
Copy link

mezhaka commented Oct 28, 2020

Is your feature request related to a problem? Please describe.

I am frustrated that there's no "Download Report" in the multi-worker test, so I could see the summary of the test in the mult-worker environment.

Describe the solution you'd like

I'd like to have the "Download Report" link available in the multi-worker test. The report should aggregate the data from the workers.

@cyberw
Copy link
Collaborator

cyberw commented Oct 28, 2020

That it weird. Sounds like a bug. Just looking at the code I see no reason for it not to work in distributed mode.

I guess you are running locust ”normally”, not as a library?

This feature was implemented in #1516

@taojy123 , I guess you tested it running distributed, right?

@taojy123
Copy link
Contributor

@mezhaka Sorry, that should be my problem.

I turned off the statistics in worker mode because of a previous issue (#1531 (comment)), which may have caused this.

I'll try to optimize it by including the worker's statistics when exporting the report.

It may take some time.Then I'll make a new PR.

@cyberw
Copy link
Collaborator

cyberw commented Nov 2, 2020

I'm getting ready to release 1.3.2. Any chance you'll have time to fix it this soon? :)

@taojy123
Copy link
Contributor

taojy123 commented Nov 3, 2020

@cyberw
Sorry, I was very busy yesterday and the day before.
I tried to reproduce the problem on my computer today, but I found that the "Download Report" is available in multi-work mode. It works! 😂
The steps I followed are as follows.

locustfile.py:

from locust import HttpUser, between, task


class WebsiteUser(HttpUser):
    wait_time = between(1, 2)
    
    @task
    def index(self):
        self.client.get("/")
        
    @task
    def xls(self):
        self.client.get("/xls/")

Start a master and two workers:
locust -f locustfile.py --master
locust -f locustfile.py --worker
locust -f locustfile.py --worker

Then I go to http://localhost:8089 and see the web ui is fine.

Click to see statistics fine

@mezhaka
May I ask what your procedure is?

@mezhaka
Copy link
Author

mezhaka commented Nov 3, 2020 via email

@taojy123
Copy link
Contributor

taojy123 commented Nov 3, 2020

I see! The docker image with latest tag is too old (v1.1), and the master is the newest.

See this page on DockerHub: https://hub.docker.com/r/locustio/locust/tags

You should modify your docker-compose.yml like this:

version: '3'

services:
  master:
    image: locustio/locust:master
    ports:
     - "8089:8089"
    volumes:
      - ./:/mnt/locust
    command: -f /mnt/locust/locustfile.py --master -H http://master:8089
  
  worker:
    image: locustio/locust:master
    volumes:
      - ./:/mnt/locust
    command: -f /mnt/locust/locustfile.py --worker --master-host master

(add a tag name on image)

@cyberw
Copy link
Collaborator

cyberw commented Nov 3, 2020

I've reached out to @heyman to see if he can give me the correct permissions to fix the latest image.

@cyberw
Copy link
Collaborator

cyberw commented Nov 4, 2020

I have fixed the build process so that any tagged commit will build locustio/locust:latest (and tagged 1.3.2).

Is this fixed now or is there still a problem?

@taojy123
Copy link
Contributor

taojy123 commented Nov 5, 2020

@mezhaka Please try again
There is not any problem if it works

@cyberw cyberw added the invalid label Nov 7, 2020
@cyberw cyberw closed this as completed Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants