parent
a42d5e06f4
commit
4b956cb488
2 changed files with 20 additions and 9 deletions
|
|
@ -19,6 +19,7 @@ BADBLOCKS_LARGE_DISK = 3 * 1024**4
|
||||||
CPU_CRITICAL_TEMP = 99
|
CPU_CRITICAL_TEMP = 99
|
||||||
CPU_FAILURE_TEMP = 90
|
CPU_FAILURE_TEMP = 90
|
||||||
CPU_TEST_MINUTES = 7
|
CPU_TEST_MINUTES = 7
|
||||||
|
IO_SMALL_DISK = 450 * 1000**3
|
||||||
KEY_NVME = 'nvme_smart_health_information_log'
|
KEY_NVME = 'nvme_smart_health_information_log'
|
||||||
KEY_SMART = 'ata_smart_attributes'
|
KEY_SMART = 'ata_smart_attributes'
|
||||||
KNOWN_DISK_ATTRIBUTES = {
|
KNOWN_DISK_ATTRIBUTES = {
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,10 @@ IO_MINIMUM_TEST_SIZE = 10 * 1024**3
|
||||||
IO_RATE_REGEX = re.compile(
|
IO_RATE_REGEX = re.compile(
|
||||||
r'(?P<bytes>\d+) bytes.* (?P<seconds>\S+) s(?:,|ecs )',
|
r'(?P<bytes>\d+) bytes.* (?P<seconds>\S+) s(?:,|ecs )',
|
||||||
)
|
)
|
||||||
|
IO_SIZE_SKIP_NAME = (
|
||||||
|
'Skip USB Benchmarks '
|
||||||
|
f'(< {std.bytes_to_string(cfg.hw.IO_SMALL_DISK, use_binary=False)})'
|
||||||
|
)
|
||||||
MENU_ACTIONS = (
|
MENU_ACTIONS = (
|
||||||
'Audio Test',
|
'Audio Test',
|
||||||
'Keyboard Test',
|
'Keyboard Test',
|
||||||
|
|
@ -76,7 +80,7 @@ MENU_SETS = {
|
||||||
MENU_TOGGLES = (
|
MENU_TOGGLES = (
|
||||||
'osTicket Integration',
|
'osTicket Integration',
|
||||||
'osTicket Tech Note',
|
'osTicket Tech Note',
|
||||||
'Skip USB Benchmarks',
|
IO_SIZE_SKIP_NAME,
|
||||||
)
|
)
|
||||||
NUM_DISK_TESTS = len([s for s in MENU_OPTIONS if s.startswith('Disk')])
|
NUM_DISK_TESTS = len([s for s in MENU_OPTIONS if s.startswith('Disk')])
|
||||||
PLATFORM = std.PLATFORM
|
PLATFORM = std.PLATFORM
|
||||||
|
|
@ -963,17 +967,23 @@ def disk_io_benchmark(state, test_objects, skip_usb=True):
|
||||||
vertical=True,
|
vertical=True,
|
||||||
text=' ',
|
text=' ',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Skip USB devices if requested
|
||||||
|
for test in test_objects:
|
||||||
|
if (
|
||||||
|
skip_usb
|
||||||
|
and test.dev.details['bus'] == 'USB'
|
||||||
|
and test.dev.details['size'] < cfg.hw.IO_SMALL_DISK
|
||||||
|
):
|
||||||
|
test.set_status('Skipped')
|
||||||
|
test.disabled = True
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Start benchmark
|
||||||
for test in test_objects:
|
for test in test_objects:
|
||||||
if test.disabled:
|
if test.disabled:
|
||||||
# Skip
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Skip USB devices if requested
|
|
||||||
if skip_usb and test.dev.details['bus'] == 'USB':
|
|
||||||
test.set_status('Skipped')
|
|
||||||
continue
|
|
||||||
|
|
||||||
# Start benchmark
|
|
||||||
if not aborted:
|
if not aborted:
|
||||||
std.clear_screen()
|
std.clear_screen()
|
||||||
std.print_report(test.dev.generate_report())
|
std.print_report(test.dev.generate_report())
|
||||||
|
|
@ -1642,7 +1652,7 @@ def run_diags(state, menu, quick_mode=False):
|
||||||
function = details['Function']
|
function = details['Function']
|
||||||
args = [details['Objects']]
|
args = [details['Objects']]
|
||||||
if name == 'Disk I/O Benchmark':
|
if name == 'Disk I/O Benchmark':
|
||||||
args.append(menu.toggles['Skip USB Benchmarks']['Selected'])
|
args.append(menu.toggles[IO_SIZE_SKIP_NAME]['Selected'])
|
||||||
std.clear_screen()
|
std.clear_screen()
|
||||||
try:
|
try:
|
||||||
function(state, *args)
|
function(state, *args)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue