mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 22:37:00 +08:00
Fix: Minor issues when running Alas on AidLux+VMOS
- Rename function names in research_optimizer to avoid tests - Remove watch_memory decorator and psutil dependency - Fix typo of Hermit
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import re
|
||||
|
||||
import gc
|
||||
import psutil
|
||||
|
||||
from module.base.decorator import cached_property
|
||||
from module.logger import logger
|
||||
@@ -19,22 +18,6 @@ def del_cached_property(obj, name):
|
||||
del obj.__dict__[name]
|
||||
|
||||
|
||||
def watch_memory(func):
|
||||
"""
|
||||
Show memory changes in log
|
||||
release_resources: 181.555MB -> 163.066MB
|
||||
"""
|
||||
|
||||
def wrapper(*args, **kwargs):
|
||||
before = psutil.Process().memory_info().rss / (1024 * 1024)
|
||||
result = func(*args, **kwargs)
|
||||
after = psutil.Process().memory_info().rss / (1024 * 1024)
|
||||
logger.info(f'{func.__name__}: {round(before, 3)}MB -> {round(after, 3)}MB')
|
||||
return result
|
||||
|
||||
return wrapper
|
||||
|
||||
|
||||
def get_assets_from_file(file, regex):
|
||||
assets = set()
|
||||
with open(file, 'r', encoding='utf-8') as f:
|
||||
|
||||
@@ -31,7 +31,7 @@ class Control(Hermit, Uiautomator2, Minitouch):
|
||||
self.click_minitouch(x, y)
|
||||
elif method == 'uiautomator2':
|
||||
self.click_uiautomator2(x, y)
|
||||
elif method == 'hermit':
|
||||
elif method == 'Hermit':
|
||||
self.click_hermit(x, y)
|
||||
else:
|
||||
self.click_adb(x, y)
|
||||
|
||||
Reference in New Issue
Block a user