Skip to content

Instantly share code, notes, and snippets.

View lukaszczerpak's full-sized avatar

Łukasz Czerpak lukaszczerpak

View GitHub Profile
@lukaszczerpak
lukaszczerpak / locust-script.py
Created January 9, 2019 20:58
Sample virtual user behavior for locust.io
from locust import HttpLocust, TaskSet
from locust import Locust, task, events, web
class UserBehavior(TaskSet):
@task(10)
def homepage(self):
self.client.get("/")
@task(5)
def product1(self):
Info: Agent running with pid '13713'.
Session: Starting session at 'Fri Nov 27 23:21:15 2015'.
Info: Proxy running in server mode with pid '13713'.
Info: Waiting for connection from '127.0.0.1' on port '6012'.
Info: Accepted connection from '127.0.0.1'.
Warning: Connected to remote version 5.0.53 with local version 3.5.0.
Warning: Consider checking http://www.nomachine.com/ for updates.
Info: Connection with remote proxy completed.
Info: Using ADSL link parameters 512/24/1/0.
Info: Using agent parameters 5000/10/50/0/0.
GIT_PS1_SHOWDIRTYSTATE=true
PS1='\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ '