Skip to content

Commit 14bc33f

Browse files
authored
1.6.2 commit 1
1 parent 6cf490c commit 14bc33f

1 file changed

Lines changed: 57 additions & 37 deletions

File tree

corebench/corebench.py

Lines changed: 57 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def distroColour():
321321
quit()
322322

323323
#UPDATE THIS WITH EVERY VERSION
324-
version = "1.6.1"
324+
version = "1.6.2"
325325
#UPDATE THIS WITH EVERY VERSION
326326

327327
endLoad = True
@@ -337,13 +337,15 @@ def loadingScreen():
337337
#SELECT LOADING MESSAGE
338338
messages = ["So, you're back...", "Hello there!", "It's hot in here...", "400FPS", "Disabling frame generation...",
339339
"RTX ON", "Removing nanites...", "Stealing your personal information...", "Pro tip: bench",
340-
"Sussy Bucket", "No standard users allowed!", "Connecting to the (totally functional) CoreBench database...",
340+
"Sussy Bucket", "No standard users allowed!", "We've got a website, did you hear? https://www.corebench.me",
341341
"Getting more ping...", "Optimizing...", "Initiating...", "WELCOME.", f"Here with your {brandName} I see...", f"{osName}? A fellow man of culture...",
342342
f"Eating all {memRaw}MB of RAM...", "Overclocking...", "Deleting main.py...", "Always remember to remove the French language pack!",
343343
f"Not much of a {osName} fan myself, but you do you...", f"Welcome back {hostname}.", f"Haha! Got your IP! Seriously! {localIp}", "I use Arch btw",
344344
"I use Core btw", "Over 6GHz!", "Bringing out the Intel Pentium...", "Gathering texel fillrate...", "Collecting frames...", "No fake frames here!",
345345
"Changing boot order...", "Imagine if you were using this on Windows lol", "No longer held prisoner by Replit!", "It's dangerous to go alone.",
346-
"All your bench are belong to us.", "GPU bench coming soon. Maybe.", "Unused RAM is useless RAM. Give some to me."]
346+
"All your bench are belong to us.", "GPU bench coming soon. Maybe.", "Unused RAM is useless RAM. Give some to me.",
347+
"ThinkPad is the only Pad", "Hoarding FPS...", "Super Accurate™!", "HEY THERE BUDDY PAL", "Jimmy smiles upon you.",
348+
"Remember to enable XMP...", "Ryzen 4070", "GPU test coming never!", "Glorp"]
347349
message = messages[random.randint(0,len(messages)-1)]
348350

349351
try:
@@ -741,7 +743,7 @@ def singleCore(showResults):
741743
totalTime = end-start
742744
avgTime = (end-start)/3
743745

744-
score = round((1/(avgTime/(3*math.e)))*(math.e)*(1000*(1/math.log(testCoreCount+4,10))))
746+
score = round(78_330/totalTime)
745747

746748
allPassTimeAvg = sum(timeList)/3
747749
allPassTimeAvg = float(str(allPassTimeAvg).rstrip("0").rstrip("."))
@@ -815,7 +817,7 @@ def singleCore(showResults):
815817
buffer.append(f"{colours.magenta()}Time simulated{colours.reset()}: {round(timeSimulated,2)}s")
816818
buffer.append(f"{colours.magenta()}Resultant velocity{colours.reset()}: {round(resultantVelocity,2)}m/s")
817819
buffer.append("---")
818-
buffer.append(f"{colours.magenta()}Time elapsed{colours.reset()}: {int(round(timeElapsed))}")
820+
buffer.append(f"{colours.magenta()}Time elapsed{colours.reset()}: {int(round(timeElapsed))}s")
819821
print("\n".join(buffer))
820822
except:
821823
pass
@@ -835,11 +837,14 @@ def singleCore(showResults):
835837

836838
totalTime = end-start
837839
avgTime = (end-start)/3
838-
score = round((1/(avgTime/(3*math.e)))*(math.e)*(1000*(1/math.log(testCoreCount+4,10))))
840+
841+
score = round(90_300/totalTime)
839842

840843
print("---")
841844
print(f"{colours.green()}Stage 2 complete{colours.reset()}.")
842845

846+
print(totalTime)
847+
843848
scoreList.append(score)
844849
timeList.append(totalTime)
845850

@@ -848,6 +853,7 @@ def singleCore(showResults):
848853
clear()
849854

850855
score = int(round(sum(scoreList)/2))
856+
851857
totalTime = sum(timeList)
852858

853859
if not dynamicMode and not fullTest:
@@ -982,9 +988,6 @@ def full_load_intermission(gflops=0):
982988
#Full Load Test SUBROUTINES END
983989

984990
def multiCore(showResults):
985-
print(f"Currently running the {colours.cyan()}multicore test{colours.reset()}.")
986-
print("------")
987-
988991
def intense1(threadNo, coreID):
989992
p = psutil.Process(os.getpid())
990993
p.cpu_affinity(coreID)
@@ -1037,7 +1040,7 @@ def run_processes():
10371040

10381041
work_queue = multiprocessing.JoinableQueue()
10391042

1040-
total_jobs = 36 # number of work items
1043+
total_jobs = 96
10411044

10421045
for i in range(total_jobs):
10431046
work_queue.put(i + 1) # threadNo or job id
@@ -1055,26 +1058,36 @@ def run_processes():
10551058
for p in processes:
10561059
p.join()
10571060

1061+
WORK_ITERATIONS = 3
10581062
timeList = []
1059-
WORK_ITERATIONS = 1
10601063

10611064
for x in range(WORK_ITERATIONS):
1062-
start = time.perf_counter()
10631065
if __name__ == "__main__":
1066+
clear()
1067+
1068+
print(f"{colours.cyan()}Multi Core Test{colours.reset()} - Iteration {x+1}")
1069+
print("------")
1070+
1071+
start = time.perf_counter()
10641072
run_processes()
1065-
end = time.perf_counter()
1066-
Time = end - start
1067-
timeList.append(Time)
1073+
end = time.perf_counter()
1074+
1075+
timeList.append(end-start)
1076+
1077+
print(f"-- {colours.green()}Iteration {x+1} complete!{colours.reset()} --")
1078+
time.sleep(3)
10681079

10691080
totalTime = sum(timeList)
1070-
avgTime = totalTime / 3
1081+
avgTime = totalTime / (WORK_ITERATIONS*4)
1082+
1083+
score = round(23430/avgTime) #constant determined after many tests with modern 6 core processors
1084+
#11.715 seconds
1085+
1086+
print("------")
1087+
print(f"Score: {colours.cyan()}{score}{colours.reset()}")
1088+
1089+
time.sleep(5)
10711090

1072-
if not dynamicMode:
1073-
score = round((1/(avgTime/(math.e/1.8))*(math.e)*(1000*math.e**2)/2))
1074-
else:
1075-
score = round((1/(avgTime/(math.e/1.8))*(math.e)*(1000*(1/math.log(coreCount+0.1,10))))/2)
1076-
1077-
time.sleep(3)
10781091
clear()
10791092
gflops = calculateGFLOPS("2", coreCount)
10801093
time.sleep(3)
@@ -1154,7 +1167,7 @@ def run_threads():
11541167
timeList = []
11551168
timeList_lock = threading.Lock()
11561169
total_logical_threads = os.cpu_count()
1157-
total_jobs = 36
1170+
total_jobs = 96
11581171

11591172
for i in range(total_jobs):
11601173
proc_no = i + 1
@@ -1185,26 +1198,33 @@ def worker():
11851198

11861199
return timeList
11871200

1188-
print(f"The {colours.red()}pain{colours.reset()} should be {colours.magenta()}over quickly{colours.reset()}...")
1189-
print("------")
1190-
11911201
timeResults = []
11921202

11931203
if __name__ == "__main__":
1194-
WORK_ITERATIONS = 1
1195-
for _ in range(WORK_ITERATIONS):
1196-
start = time.perf_counter()
1197-
timeList = run_threads()
1198-
end = time.perf_counter()
1199-
timeResults.append(end - start)
1204+
WORK_ITERATIONS = 3
1205+
for x in range(0, 3):
1206+
clear()
1207+
1208+
print(f"{colours.magenta()}Multi Thread Test{colours.reset()} - Iteration {x+1}")
1209+
print("------")
1210+
1211+
for _ in range(WORK_ITERATIONS):
1212+
1213+
start = time.perf_counter()
1214+
1215+
run_threads()
1216+
1217+
end = time.perf_counter()
1218+
timeResults.append(end - start)
1219+
1220+
time.sleep(3)
1221+
1222+
print(f"-- {colours.green()}Iteration {x+1} complete!{colours.reset()} --")
12001223

12011224
totalTime = sum(timeResults)
1202-
avgTime = totalTime / 3
1225+
avgTime = (totalTime / (3 * WORK_ITERATIONS))/3
12031226

1204-
if dynamicMode:
1205-
score = round((1 / (avgTime / (math.e / 1.5)) * (math.e) * (1000 * (1 / math.log(threadCount, 10)))))
1206-
else:
1207-
score = round(((1 / (avgTime / (math.e / 1.5)) * (math.e) * (1000 * math.e*1.5))))
1227+
score = round(33400/avgTime) #constant
12081228

12091229
clear()
12101230

0 commit comments

Comments
 (0)