cctools
|
Class to encapsule all the categories in a workflow. More...
Public Member Functions | |
def | __init__ |
Create an empty set of categories. More... | |
def | category_names |
Returns a lists of the category categories. More... | |
def | first_allocation |
Compute and return the first allocations for the given category. More... | |
def | maximum_seen |
Return the maximum resource values so far seen for the given category. More... | |
def | accumulate_summary |
Add the summary (a dictionary) to the respective category. More... | |
def | waste |
Return the waste (unit x time) that would be produced if the accumulated summaries were run under the given allocation. More... | |
def | wastepercentage |
Return the percentage of wasted resources that would be produced if the accumulated summaries were run under the given allocation. More... | |
def | throughput |
Return the throughput that would be obtained if the accumulated summaries were run under the given allocation. More... | |
def | retries |
Return the number of tasks that would be retried if the accumulated summaries were run under the given allocation. More... | |
def | count |
Return the number of summaries in a particular category. More... | |
Class to encapsule all the categories in a workflow.
def resource_monitor.Categories.__init__ | ( | self, | |
all_categories_name = '(all)' |
|||
) |
Create an empty set of categories.
self | Reference to the current object. |
all_categories_name | Name of the general category that holds all of the summaries. |
References resource_monitor.Categories.all_categories_name, and resource_monitor.Categories.categories.
def resource_monitor.Categories.category_names | ( | self | ) |
Returns a lists of the category categories.
List sorted lexicographicaly, with the exception of self.all_categories_name, which it is always the last entry.
self | Reference to the current object. |
References resource_monitor.Categories.all_categories_name.
def resource_monitor.Categories.first_allocation | ( | self, | |
mode, | |||
category | |||
) |
Compute and return the first allocations for the given category.
Note: wall_time needs to be defined in the resource summaries to be considered in this optimization.
self | Reference to the current object. |
mode | Optimization mode. One of 'throughput', 'waste', or 'fixed'. |
category | Name of the category |
References resource_monitor.Categories._category().
def resource_monitor.Categories.maximum_seen | ( | self, | |
category | |||
) |
Return the maximum resource values so far seen for the given category.
self | Reference to the current object. |
category | Name of the category |
References resource_monitor.Categories._category().
def resource_monitor.Categories.accumulate_summary | ( | self, | |
summary | |||
) |
Add the summary (a dictionary) to the respective category.
At least both the 'category' and 'wall_time' keys should be defined.
References resource_monitor.Categories._category(), and resource_monitor.Categories.all_categories_name.
def resource_monitor.Categories.waste | ( | self, | |
category, | |||
field, | |||
allocation | |||
) |
Return the waste (unit x time) that would be produced if the accumulated summaries were run under the given allocation.
self | Reference to the current object. |
category | Name of the category |
field | Name of the resource (e.g., cores, memory, or disk) |
allocation | Value of allocation to test. |
References resource_monitor.Categories._category().
def resource_monitor.Categories.wastepercentage | ( | self, | |
category, | |||
field, | |||
allocation | |||
) |
Return the percentage of wasted resources that would be produced if the accumulated summaries were run under the given allocation.
self | Reference to the current object. |
category | Name of the category |
field | Name of the resource (e.g., cores, memory, or disk) |
allocation | Value of allocation to test. |
References resource_monitor.Categories._category().
def resource_monitor.Categories.throughput | ( | self, | |
category, | |||
field, | |||
allocation | |||
) |
Return the throughput that would be obtained if the accumulated summaries were run under the given allocation.
self | Reference to the current object. |
category | Name of the category |
field | Name of the resource (e.g., cores, memory, or disk) |
allocation | Value of allocation to test. |
References resource_monitor.Categories._category().
def resource_monitor.Categories.retries | ( | self, | |
category, | |||
field, | |||
allocation | |||
) |
Return the number of tasks that would be retried if the accumulated summaries were run under the given allocation.
self | Reference to the current object. |
category | Name of the category |
field | Name of the resource (e.g., cores, memory, or disk) |
allocation | Value of allocation to test. |
References resource_monitor.Categories._category().
def resource_monitor.Categories.count | ( | self, | |
category | |||
) |
Return the number of summaries in a particular category.
self | Reference to the current object. |
category | Name of the category |
References resource_monitor.Categories._category(), and resource_monitor.Categories.categories.