You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Couple of changes:
- color not working in windows terminal
- suffix in filename in case of voltage/frequency argument
- limited (1 successive) retries in case of overheat (previously any chip overheat reached ended the benchmark)
Copy file name to clipboardExpand all lines: bitaxe_hashrate_benchmark.py
+35-5Lines changed: 35 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,9 @@
5
5
importsys
6
6
importargparse
7
7
8
+
importos
9
+
os.system("") # enables ansi escape characters in terminal - colors were not working in Windows terminal
10
+
8
11
# ANSI Color Codes
9
12
GREEN="\033[92m"
10
13
YELLOW="\033[93m"
@@ -72,6 +75,13 @@ def parse_arguments():
72
75
ifbenchmark_time/sample_interval<7:
73
76
raiseValueError(RED+f"Error: Benchmark time is too short. Please increase the benchmark time or decrease the sample interval. At least 7 samples are required."+RESET)
74
77
78
+
# Add suffix to filename in case of manual initial voltage/frequency
current_frequency-=frequency_increment# Go back to one frequency step and retry
380
-
print(YELLOW+f"Hashrate to low compared to expected. Decreasing frequency to {current_frequency}MHz and increasing voltage to {current_voltage}mV"+RESET)
394
+
print(YELLOW+f"Hashrate too low compared to expected. Decreasing frequency to {current_frequency}MHz and increasing voltage to {current_voltage}mV"+RESET)
381
395
else:
396
+
print(YELLOW+"Reached max voltage without good results. Stopping further testing."+RESET)
382
397
break# We've reached max voltage without good results
383
398
else:
384
399
# If we hit thermal limits or other issues, we've found the highest safe settings
385
-
print(GREEN+"Reached thermal or stability limits. Stopping further testing."+RESET)
386
-
break# Stop testing higher values
400
+
# In case of max Chip Temperature reached, continue loop to next voltage with decreased frequency
401
+
# Condition added to avoid successive overheat tries and reset to high initial frequency
0 commit comments