fix: make benchmark available

This commit is contained in:
2026-07-06 22:40:44 +08:00
parent 3193c7c327
commit 0f8df69f6b
+6 -6
View File
@@ -169,10 +169,10 @@ class Benchmark(DaemonBase):
return fastest_screenshot, fastest_click return fastest_screenshot, fastest_click
def get_test_methods(self) -> t.Tuple[t.Tuple[str], t.Tuple[str]]: def get_test_methods(self) -> t.Tuple[t.Tuple[str], t.Tuple[str]]:
device = self.config.Benchmark_DeviceType # device = self.config.Benchmark_DeviceType
# device == 'emulator' device = 'emulator'
screenshot = ['ADB', 'ADB_nc', 'uiautomator2', 'aScreenCap', 'aScreenCap_nc', 'DroidCast', 'DroidCast_raw'] screenshot = ['ADB', 'ADB_nc', 'uiautomator2', 'aScreenCap', 'aScreenCap_nc', 'DroidCast', 'DroidCast_raw']
click = ['ADB', 'uiautomator2', 'minitouch'] click = ['ADB', 'uiautomator2', 'minitouch', 'maatouch']
def remove(*args): def remove(*args):
return [l for l in screenshot if l not in args] return [l for l in screenshot if l not in args]
@@ -194,7 +194,7 @@ class Benchmark(DaemonBase):
if self.device.ldopengl_available(): if self.device.ldopengl_available():
screenshot.append('ldopengl') screenshot.append('ldopengl')
scene = self.config.Benchmark_TestScene scene = 'screenshot_click'
if 'screenshot' not in scene: if 'screenshot' not in scene:
screenshot = [] screenshot = []
if 'click' not in scene: if 'click' not in scene:
@@ -210,8 +210,8 @@ class Benchmark(DaemonBase):
logger.critical('Request human takeover') logger.critical('Request human takeover')
return return
logger.attr('DeviceType', self.config.Benchmark_DeviceType) # logger.attr('DeviceType', self.config.Benchmark_DeviceType)
logger.attr('TestScene', self.config.Benchmark_TestScene) # logger.attr('TestScene', self.config.Benchmark_TestScene)
screenshot, click = self.get_test_methods() screenshot, click = self.get_test_methods()
self.benchmark(screenshot, click) self.benchmark(screenshot, click)