@app.route('/is-prime/<int:n>')
@metrics.with_meter("primality-tp")
@metrics.with_histogram("primality-latency")
@metrics.with_meter("throughput")
def is_prime(n):
    result = True

    if n % 2 == 0:
        result = False
    else:
        for i in xrange(3, int(n**0.5)+1, 2):
            if i % n == 0:
                result = False

    return jsonify(is_prime=result)
dataset/ETHPy150Open avalente/appmetrics/examples/webapp_flask.py/is_prime/swapped operands of `%`