Skip to content

Instantly share code, notes, and snippets.

@jayboss222
jayboss222 / locustfile.py
Last active April 7, 2020 22:17
Load testing scripts
from locust import HttpLocust, TaskSet, task, between
from locust.contrib.fasthttp import FastHttpLocust
def index(l):
l.client.get("/")
def stats(l):
l.client.get("/latency-test")
var path = (function() {
var pathName = window.location.pathname;
var newPathArray = pathName.split('/').filter(function(val){
return !val == '';
});
function partExists(arrVal) {
return newPathArray.some(function(val){
return val === arrVal;