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

Truncate number of errors displayed in the web UI #532

Merged
merged 1 commit into from
Feb 12, 2017

Conversation

justiniso
Copy link
Member

This change limits the number of rows on the web UI to display at most 500 rows in the stats and failures tabs. A common scenario is the app failing under load, resulting in a large number of unique failures, bringing the rendering to a halt.

A simple locustfile demonstrates the issue:

import random 

from locust import HttpLocust, TaskSet, task

class UserTasks(TaskSet):

    @task
    def error(self):
        self.client.get("/404/{}".format(random.randint(0,99999999999))

class WebsiteUser(HttpLocust):
    min_wait = 0
    max_wait = 0
    task_set = UserTasks

This will generate a large number of results and errors, eventually killing the page. I feel that 500 results is a reasonable number to display as it's more than anyone could consume manually through the web UI. But for automated processes, the actual results will remain intact.

@justiniso justiniso added the bug label Feb 12, 2017
Copy link
Member

@cgoldberg cgoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@justiniso justiniso merged commit fee2868 into master Feb 12, 2017
@justiniso justiniso deleted the fix-slow-ui-on-high-failures branch February 12, 2017 19:45
@justiniso justiniso added this to the 0.8.0 milestone Feb 12, 2017
This was referenced Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants