Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from cassandra.cluster import Cluster
- from locust import Locust, events, task, TaskSet
- class CassandraClient(object):
- def __init__(self, host):
- cluster = Cluster([host])
- self.session = cluster.connect("demo")
- class CassandraLocust(Locust):
- def __init__(self, *args, **kwargs):
- super(CassandraLocust, self).__init__(*args, **kwargs)
- self.client = CassandraClient(self.host)
- def random_select(self):
- pass
- class ApiUser(CassandraLocust):
- host = "127.0.0.1"
- class task_set(TaskSet):
- @task(1)
- def read_random(self):
- pass
Advertisement
Add Comment
Please, Sign In to add comment