------------------------------------------------------------ revno: 2796 committer: Anton Gladky <[email protected]> branch nick: yade timestamp: Wed 2011-03-23 13:39:51 +0100 message: Color output in --performance tests is deleted. modified: scripts/test/performance/checkPerf.py
-- lp:yade https://code.launchpad.net/~yade-dev/yade/trunk Your team Yade developers is subscribed to branch lp:yade. To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'scripts/test/performance/checkPerf.py' --- scripts/test/performance/checkPerf.py 2011-03-18 15:21:32 +0000 +++ scripts/test/performance/checkPerf.py 2011-03-23 12:39:51 +0000 @@ -3,25 +3,6 @@ from yade import utils,pack,export,geom,timing,bodiesHandling import time,numpy -class bcolors: - # color output - # http://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-python - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[92m' - WARNING = '\033[93m' - FAIL = '\033[91m' - ENDC = '\033[0m' - - def disable(self): - self.HEADER = '' - self.OKBLUE = '' - self.OKGREEN = '' - self.WARNING = '' - self.FAIL = '' - self.ENDC = '' - - radRAD=[23.658, #5000 elements 40.455, #25000 elements 50.97, #50000 elements @@ -95,7 +76,7 @@ NewtonIntegrator(damping=0), ] - print bcolors.HEADER + "number of bodies %d"%len(O.bodies) + bcolors.ENDC + print "number of bodies %d"%len(O.bodies) O.timingEnabled=True tStart=time.time() @@ -107,13 +88,12 @@ print 'Elapsed ', tEnd-tStart, ' sec' print 'Performance ', nbIter/(tEnd-tStart), ' iter/sec' print 'Extrapolation on 1e5 iters ', (tEnd-tStart)/nbIter*1e5/3600., ' hours' - print bcolors.OKGREEN + "=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*" + bcolors.ENDC + print "=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*" timing.stats() iterVel += [nbIter/(tEnd-tStart)] testTime += [tEnd-tStart] particlesNumber += [len(O.bodies)] - tEndAll=time.time() commonTime = tEndAll-tStartAll @@ -137,7 +117,7 @@ print print scoreIterVel = int(scoreIterVel) -print bcolors.FAIL + "SCORE: " + scoreIterVel + bcolors.ENDC +print "SCORE: " + str(scoreIterVel) print "Number of threads ", os.environ['OMP_NUM_THREADS'] print"___________________________________________________" print "CPU info", os.system('cat /proc/cpuinfo')
_______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

