Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _display_common_metadata(metadatas, lines):
if len(metadatas) < 2:
return
for metadata in metadatas:
# don't display name as metadata, it's already displayed
metadata.pop('name', None)
common_metadata = _common_metadata(metadatas)
if common_metadata:
format_title('Common metadata', lines=lines)
empty_line(lines)
format_metadata(common_metadata, lines=lines)
for key in common_metadata:
for metadata in metadatas:
metadata.pop(key, None)
def get_metadata(self):
benchs_metadata = [bench._get_common_metadata()
for bench in self._benchmarks]
return _common_metadata(benchs_metadata)
def _get_common_metadata(self):
if self._common_metadata is None:
runs_metadata = [run._metadata for run in self._runs]
self._common_metadata = _common_metadata(runs_metadata)
return self._common_metadata