Optimization: Shortcut in table-generator if properties were not used
There is no need to read task-definition files and look for an empty
property, because properties have non-empty names.
So we should immediately mark the task as having no property
if no property is indicated in the raw results.
@@ -935,9 +935,12 @@ class Row(object):
def get_property_of_task(task_name, property_string):
+ if property_string is None:
+ return (None, None)
+
if task_name.endswith(".yml"):
# try to find property file of task and create Property object
- property_names = set((property_string or "").split())
+ property_names = set(property_string.split())
try:
task_template = model.load_task_definition_file(task_name)
for prop_dict in task_template.get("properties", []):
@@ -959,11 +962,8 @@ def get_property_of_task(task_name, property_string):
except BenchExecException as e:
logging.debug("Could not load task-template file %s: %s", task_name, e)
- if property_string:
return (result.Property(None, False, False, property_string, None), None)
- return (None, None)
-
def rows_to_columns(rows):
"""
