Beispiel #1
0
def stats():
    stats = {
        'bin_count': db.count_bins(),
        'request_count': db.count_requests(),
        'avg_req_size_kb': db.avg_req_size(), }
    resp = make_response(json.dumps(stats), 200)
    resp.headers['Content-Type'] = 'application/json'
    return resp
Beispiel #2
0
def stats():
    stats = {
        'bin_count': db.count_bins(),
        'request_count': db.count_requests(),
        'avg_req_size_kb': db.avg_req_size(),}
    resp = make_response(json.dumps(stats), 200)
    resp.headers['Content-Type'] = 'application/json'
    return resp
Beispiel #3
0
def stats():
    stats = {"bin_count": db.count_bins(), "request_count": db.count_requests(), "avg_req_size_kb": db.avg_req_size()}
    resp = make_response(json.dumps(stats), 200)
    resp.headers["Content-Type"] = "application/json"
    return resp