<commit_before>=============
Quick start
=============

Below is a quick little example of a simple **locustfile.py**::

    from locust import Locust, task
    
    def login(l):
        l.client.post("/login", {"username":"ellen_key", "password":"<PASSWORD>"})
    
    def index(l):
        l.client.get("/")
    
    def profile(l):
        l.client.get("/profile")
    
    class WebsiteUser(Locust):
        tasks = {index:2, profile:1}<commit_msg>import task not needed in first example<commit_after>=============
Quick start
=============

Below is a quick little example of a simple **locustfile.py**::

    from locust import Locust
    
    def login(l):
        l.client.post("/login", {"username":"ellen_key", "password":"<PASSWORD>"})
    
    def index(l):
        l.client.get("/")
    
    def profile(l):
        l.client.get("/profile")
    
    class WebsiteUser(Locust):
        tasks = {index:2, profile:1}
{'fraction_non_alphanumeric': 0.19719827586206898, 'fraction_numerical': 0.004310344827586207, 'mean_word_length': 2.807377049180328, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2714313', 'n_tokens_mistral': 289, 'n_tokens_neox': 279, 'n_words': 72}