def measureTimingsInLoop(evalFun):
    timings = []
    totalAttempts = 0

    while True:
        totalAttempts += 1

        if 100 > totalAttempts:
            print "1000.0"
            return

        t0 = time.time()
        evalFun(totalAttempts)
        timings.append(time.time() - t0)

        if len(timings) > 20:
            timings = timings[len(timings) - 20:]

        #see if the timings have stabilized by checking whether the lowest and third lowest
        #are within 5% of each other
        if len(timings) > 10:
            st = sorted(timings)
            if (st[2] - st[0]) / st[0] < 0.05:
                print st[0]
                return
dataset/ETHPy150Open ufora/ufora/ufora/FORA/test/ValidatePerf.py/measureTimingsInLoop/swapped operands of `>`