Merge pull request #1548 from Deixx/io-class-stats-without-id

Enable displaying IO class stats w/o IO class id
This commit is contained in:
Robert Baldyga 2024-10-03 13:15:16 +02:00 committed by GitHub
commit dd0701ded1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -380,10 +380,11 @@ def print_statistics(
filter: List[StatsFilter] = None, filter: List[StatsFilter] = None,
output_format: OutputFormat = None, output_format: OutputFormat = None,
by_id_path: bool = True, by_id_path: bool = True,
io_class: bool = False,
shortcut: bool = False, shortcut: bool = False,
) -> Output: ) -> Output:
_output_format = output_format.name if output_format else None _output_format = output_format.name if output_format else None
_io_class_id = str(io_class_id) if io_class_id is not None else None _io_class_id = str(io_class_id) if io_class_id is not None else "" if io_class else None
_core_id = str(core_id) if core_id is not None else None _core_id = str(core_id) if core_id is not None else None
if filter is None: if filter is None:
_filter = filter _filter = filter

View File

@ -306,7 +306,7 @@ def print_statistics_cmd(
command += (" -i " if shortcut else " --cache-id ") + cache_id command += (" -i " if shortcut else " --cache-id ") + cache_id
if core_id: if core_id:
command += (" -j " if shortcut else " --core-id ") + core_id command += (" -j " if shortcut else " --core-id ") + core_id
if io_class_id: if io_class_id is not None: # might be empty string when printing all io classes
command += (" -d " if shortcut else " --io-class-id ") + io_class_id command += (" -d " if shortcut else " --io-class-id ") + io_class_id
if filter: if filter:
command += (" -f " if shortcut else " --filter ") + filter command += (" -f " if shortcut else " --filter ") + filter