def get_io_top(server): profiler = IOProfiler(server) data = profiler.get_io_top() if 'request_id' in request.args: data['response_id'] = request.args['request_id'] return jsonify(data)
def get_io_status(request): print('received io.status.req: ' + request['server']) server = request['server'] profiler = IOProfiler(server) data = profiler.get_status() if "request_id" in request: data['response_id'] = request['request_id'] emit('io.status.res', data)
def get_io_top(request): server = request['server'] interval = request['interval'] socketio = io_blueprint.get_io() global io_top_timer if io_top_timer is None: io_top_timer = Timer( interval, background_timer_stuff, [socketio, interval, "io.top.res", IOProfiler(server).get_io_top]) io_top_timer.start() emit("io.top.res", IOProfiler(server).get_io_top())
def setUp(self): self.functor = IOProfiler('').get_status
def setUp(self): self.functor = IOProfiler('').get_io_top
def test_stability(self): profiler = IOProfiler('www.rmlink.cn') self.repeated_test(profiler.get_capacity)
def setUp(self): self.functor = IOProfiler('').get_capacity
def get_io_status(request): server = request['server'] process_socket_request(request, 'io.status.req', IOProfiler(server).get_status)
def get_io_top(request): server = request['server'] process_socket_request(request, 'io.top.req', IOProfiler(server).get_io_top)