1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-21 05:35:35 +08:00

Opt: save debug info

This commit is contained in:
sui-feng-cb
2025-07-19 19:02:53 +08:00
parent fe8a4f6cab
commit f3f01b4047

View File

@@ -570,7 +570,9 @@ class DockScanner(ShipScanner):
self.scanner = ShipScanner(emotion=False, fleet=False, status=False) self.scanner = ShipScanner(emotion=False, fleet=False, status=False)
# The following is for the debug # The following is for the debug
self.save_debug_info = False
self.debug_folder = f'./log/dock_scan_test/{test_name}_{int(time.time()*1000):x}' self.debug_folder = f'./log/dock_scan_test/{test_name}_{int(time.time()*1000):x}'
if self.save_debug_info:
if not os.path.exists('./log/dock_scan_test'): if not os.path.exists('./log/dock_scan_test'):
os.mkdir('./log/dock_scan_test') os.mkdir('./log/dock_scan_test')
if not os.path.exists(self.debug_folder): if not os.path.exists(self.debug_folder):
@@ -786,6 +788,7 @@ class DockScanner(ShipScanner):
self.debug_info['time'] = end_time - start_time self.debug_info['time'] = end_time - start_time
self.debug_info['ship_count'] = len(self._results) self.debug_info['ship_count'] = len(self._results)
if self.save_debug_info:
# save hash sims # save hash sims
hashs = [ship.hash_ for ship in self.results] hashs = [ship.hash_ for ship in self.results]
sims = [] sims = []