Commit 4188722a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

erp5/test/benchmarks: record number of deadlocks.

parent 16901c7f
......@@ -179,6 +179,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",
......@@ -198,6 +209,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