Created
January 23, 2012 17:33
-
-
Save nogood3/1664405 to your computer and use it in GitHub Desktop.
PYthon CPU Benchmark (console)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import time | |
lan=input("LANG ru(type 0) or en(type 1)=") | |
if lan==0 : | |
import ru | |
lang=ru | |
else : | |
import en | |
lang=en | |
a=0 | |
b=0 | |
c=input(lang.cores) | |
F_1=c | |
T_1=time.time() | |
c=c*10000000 | |
while a<c : | |
a=a+1 | |
b=22226545*22+26216*222+88**88*88 | |
T_2=time.time() | |
t=T_2-T_1 | |
t=c/t | |
t=t/100000 | |
print lang.res ,lang.ocore ,t | |
F_2=F_1*4*(t/10) | |
F_1=F_1*t | |
print lang.res, lang.ncore, F_1 | |
print lang.flops ,F_2 | |
if t>0 : | |
if t<15 : print lang.bed | |
if t>15 : | |
if t<20 : print lang.nbed | |
if t>20 : | |
if t<25 : print lang.good | |
if t>25 : print lang.vgood |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
res='Result=' | |
hm='how mutch' | |
bed="Your's Resunt Is BED =( We sorryо" | |
nbed="Your's Resunt Is NOT BED =| Take care about your machine it's can more" | |
good="Your's Resunt Is GOOD =)" | |
vgood="Your's Resunt Is VERY GOOD!!!!!! =)" | |
ocore='(Pear one core)' | |
ncore='(All cores in :)' | |
flops='System perfomance in GFLOPS' | |
cores='how much cores you have ?' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
res='Результат' | |
hm='Сколько' | |
bed='Очень плохо' | |
nbed='Так сибе , неплохо . Но Можна было и лутьше' | |
good='Хмм Хорошо даже очень' | |
vgood= 'Ну машына зверь , Шофёр собака.' | |
ocore='(на каждое ядро)' | |
ncore='(в суме ядер)' | |
flops='Быстродействие системы в GFLOPS' | |
cores='сколько у вас ядер' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment