class VerifierTasks(TaskSet): hubTasks = None def on_start(self): self.hubTasks = HubTasks(VerifierUser(), self.client) self.hubTasks.start() @task(1000) def write_read(self): self.hubTasks.write_read() @task(50) def change_parallel(self): self.hubTasks.change_parallel("verifier_test_2") @task(100) def sequential(self): self.hubTasks.sequential() @task(1) def hour_query(self): self.hubTasks.hour_query() @task(1) def hour_query_get_items(self): self.hubTasks.hour_query_get_items() @task(1) def minute_query(self): self.hubTasks.minute_query() @task(1) def minute_query_get_items(self): self.hubTasks.minute_query_get_items() @task(10) def next_previous(self): self.hubTasks.next_previous() @task(10) def second_query(self): self.hubTasks.second_query() @task(10) def verify_callback_length(self): self.hubTasks.verify_callback_length() @web.app.route("/callback", methods=['GET']) def get_channels(): return HubTasks.get_channels() @web.app.route("/callback/<channel>", methods=['GET', 'POST']) def callback(channel): return HubTasks.callback(channel)
class HistoricalTasks(TaskSet): hubTasks = None def on_start(self): self.user = HistoricalUser() self.hubTasks = HubTasks(self.user, self.client) self.hubTasks.start() @task(1000) def write_read(self): self.hubTasks.write_read() @task(1) def hour_query(self): self.hubTasks.hour_query() @task(1) def hour_query_get_items(self): self.hubTasks.hour_query_get_items() @task(1) def minute_query(self): self.hubTasks.minute_query() @task(1) def minute_query_get_items(self): self.hubTasks.minute_query_get_items() @task(10) def second_query(self): self.hubTasks.second_query() @task(10) def next_previous(self): self.hubTasks.next_previous() @task(10) def verify_callback_length(self): self.hubTasks.verify_callback_length() @web.app.route("/callback", methods=['GET']) def get_channels(): logger.debug( utils.get_client_address(request) + ' | ' + request.method + ' | /callback') return HubTasks.get_channels() @web.app.route("/callback/<channel>", methods=['GET', 'POST']) def callback(channel): logger.debug( utils.get_client_address(request) + ' | ' + request.method + ' | /callback/' + channel + ' | ' + request.get_data().strip()) return HubTasks.callback(channel)
class HistoricalTasks(TaskSet): hubTasks = None def on_start(self): self.user = HistoricalUser() self.hubTasks = HubTasks(self.user, self.client) self.hubTasks.start() @task(1000) def write_read(self): self.hubTasks.write_read() @task(1) def hour_query(self): self.hubTasks.hour_query() @task(1) def hour_query_get_items(self): self.hubTasks.hour_query_get_items() @task(1) def minute_query(self): self.hubTasks.minute_query() @task(1) def minute_query_get_items(self): self.hubTasks.minute_query_get_items() @task(10) def second_query(self): self.hubTasks.second_query() @task(10) def next_previous(self): self.hubTasks.next_previous() @task(10) def verify_callback_length(self): self.hubTasks.verify_callback_length() @web.app.route("/callback", methods=['GET']) def get_channels(): return HubTasks.get_channels() @web.app.route("/callback/<channel>", methods=['GET', 'POST']) def callback(channel): return HubTasks.callback(channel)
class VerifierTasks(TaskSet): hubTasks = None def on_start(self): self.hubTasks = HubTasks(SingleUser(), self.client) self.hubTasks.start() @task(1000) def write_read(self): self.hubTasks.write_read() @task(10) def hour_query(self): self.hubTasks.hour_query() @task(10) def minute_query(self): self.hubTasks.minute_query() @task(10) def second_query(self): self.hubTasks.second_query() @task(10) def next_previous(self): self.hubTasks.next_previous() @task(10) def verify_callback_length(self): self.hubTasks.verify_callback_length(20000) @web.app.route("/callback", methods=['GET']) def get_channels(): logger.debug(utils.get_client_address(request) + ' | ' + request.method + ' | /callback') return HubTasks.get_channels() @web.app.route("/callback/<channel>", methods=['GET', 'POST']) def callback(channel): logger.debug(utils.get_client_address(request) + ' | ' + request.method + ' | /callback/' + channel + ' | ' + request.get_data().strip()) return HubTasks.callback(channel) @web.app.route('/store/<name>', methods=['GET']) def get_store(name): return Response(HubTasks.get_store(name), mimetype='application/json')
class VerifierTasks(TaskSet): hubTasks = None def on_start(self): self.hubTasks = HubTasks(VerifierUser(), self.client) self.hubTasks.start() @task(1000) def write_read(self): self.hubTasks.write_read() @task(5) def change_parallel(self): self.hubTasks.change_parallel("verifier_test_2") @task(100) def sequential(self): self.hubTasks.sequential() @task(1) def earliest(self): self.hubTasks.earliest() @task(100) def latest(self): self.hubTasks.latest() @task(10) def day_query(self): self.hubTasks.day_query() @task(1) def hour_query(self): self.hubTasks.hour_query() @task(1) def hour_query_get_items(self): self.hubTasks.hour_query_get_items() @task(1) def minute_query(self): self.hubTasks.minute_query() @task(1) def minute_query_get_items(self): self.hubTasks.minute_query_get_items() @task(10) def next_previous(self): self.hubTasks.next_previous() @task(10) def second_query(self): self.hubTasks.second_query() @task(10) def verify_callback_length(self): self.hubTasks.verify_callback_length() @web.app.route("/callback", methods=['GET']) def get_channels(): logger.debug(utils.get_client_address(request) + ' | ' + request.method + ' | /callback') return HubTasks.get_channels() @web.app.route("/callback/<channel>", methods=['GET', 'POST']) def callback(channel): logger.debug(utils.get_client_address(request) + ' | ' + request.method + ' | /callback/' + channel + ' | ' + request.get_data().strip()) return HubTasks.callback(channel) @web.app.route('/store/<name>', methods=['GET']) def get_store(name): return Response(HubTasks.get_store(name), mimetype='application/json')