Commit 189107a5 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

erp5/test/benchmarks: record number of deadlocks.

parent b5ccaa57
......@@ -184,6 +184,17 @@ class TestOrderBuildPackingListSimulation(
zeo_root_stats = zeo_stats.pop('root')
assert not zeo_stats
# Deadlocks
deadlock_total_count = 0
grep = pathlib.Path(
self.getComputerPartitionPath('zope-activities')) / 'bin' / 'grep'
log_directory = pathlib.Path(
self.getComputerPartitionPath('zope-activities')) / 'var' / 'log'
for path in log_directory.glob('zope-*-event.log'):
deadlock_total_count += int(subprocess.run(
(grep, '-ac', 'Deadlock found when trying to get lock; try restarting transaction', path),
capture_output=True, text=True).stdout)
self.logger.info(
"Measurements for %s (after %s): "
"elapsed=%s zope_total_rss=%s / %s root_fs_size=%s",
......@@ -203,6 +214,7 @@ class TestOrderBuildPackingListSimulation(
'zope_count': zope_count,
'root_fs_size': root_fs_size,
'zeo_stats': zeo_root_stats,
'deadlock_total_count': deadlock_total_count,
'now': str(now),
})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment