@Teardown.Teardown
    def DISABLEDtest_repeatedCalculationOfSomethingComplex(self):
        self.desirePublisher.desireNumberOfWorkers(1, blocking=True)
        
        expr = FORA.extractImplValContainer(FORA.eval(expensiveCalculationText))

        def calculateTime(count):
            t0 = time.time()
            response = self.evaluateWithGateway(
                makeComputationDefinitionFromIVCs(
                    expr,
                    ForaNative.makeSymbol("Call"),
                    ForaNative.ImplValContainer(count)
                    )
                )

            self.assertTrue(response[1].isResult())

            stats = response[2]

            return (stats.timeSpentInInterpreter, stats.timeSpentInCompiler, time.time() - t0)


        perSecondValues = []

        for base in [500000]:
            for ix in range(10):
                ratio = 1.0 + ix
                interp, compiled, wallClock = calculateTime(base * ratio)
                perSecondValues.append( ((base * ratio) / wallClock / 1000000.0) )

                print base * ratio, "->", wallClock, " seconds = ", \
                    "%.2f" % ((base * ratio) / wallClock / 1000000.0), "M per second."

        #remove the first few runs
        fastest = max(perSecondValues)

        #find the point where we saturate
        saturationPoint  =0
        while saturationPoint < len(perSecondValues) and perSecondValues[saturationPoint] < fastest / 2:
            saturationPoint += 1

        if saturationPoint < len(perSecondValues):
            slowest = min(perSecondValues[saturationPoint:])
        else:
            slowest = 0.0

        self.assertTrue(slowest > fastest / 2.0, "Excessive variance in run rates: %s" % perSecondValues)
dataset/ETHPy150Open ufora/ufora/ufora/cumulus/test/TestBase.py/CumulusTestCases.DISABLEDtest_repeatedCalculationOfSomethingComplex/original