Example #1
0
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)
Example #2
0
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)
Example #3
0
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())
Example #4
0
 def setUp(self):
     self.functor = IOProfiler('').get_status
Example #5
0
 def setUp(self):
     self.functor = IOProfiler('').get_io_top
Example #6
0
 def test_stability(self):
     profiler = IOProfiler('www.rmlink.cn')
     self.repeated_test(profiler.get_capacity)
Example #7
0
 def setUp(self):
     self.functor = IOProfiler('').get_capacity
Example #8
0
def get_io_status(request):
    server = request['server']
    process_socket_request(request, 'io.status.req',
                           IOProfiler(server).get_status)
Example #9
0
def get_io_top(request):
    server = request['server']
    process_socket_request(request, 'io.top.req',
                           IOProfiler(server).get_io_top)