toil.utils.toilStats
¶
Reports statistical data about a given Toil workflow.
Module Contents¶
Classes¶
Convenience object that stores the width of columns for printing. Helps make things pretty. |
Functions¶
|
Pad the beginning of a string with spaces, if necessary. |
|
Given input k as kilobytes, return a nicely formatted string. |
|
Given input t as seconds, return a nicely formatted string. |
|
Given t seconds, report back the correct format as string. |
|
Given k kilobytes, report back the correct format as string. |
|
Given n an integer, report back the correct format as string. |
|
Generate a pretty-print ready string from a JTTag(). |
|
Add a marker to TITLE if the TITLE is sorted on. |
|
Add a marker to the correct field if the TITLE is sorted on. |
|
Return a float value attribute NAME from TREE. |
|
Return a jobTypes all sorted. |
|
Print the important bits out. |
|
Return a ColumnWidths() object with the correct max widths. |
|
Update the column width attributes for this tag's fields. |
|
Create an element for output. |
|
|
|
Collect and return the stats and config data. |
|
Collate the stats and report |
|
|
|
|
|
Reports stats on the workflow, use with --stats option to toil. |
Attributes¶
- toil.utils.toilStats.logger¶
- class toil.utils.toilStats.ColumnWidths[source]¶
Convenience object that stores the width of columns for printing. Helps make things pretty.
- toil.utils.toilStats.padStr(s, field=None)[source]¶
Pad the beginning of a string with spaces, if necessary.
- toil.utils.toilStats.prettyMemory(k, field=None, isBytes=False)[source]¶
Given input k as kilobytes, return a nicely formatted string.
- toil.utils.toilStats.prettyTime(t, field=None)[source]¶
Given input t as seconds, return a nicely formatted string.
- toil.utils.toilStats.reportTime(t, options, field=None)[source]¶
Given t seconds, report back the correct format as string.
- Parameters:
t (float) –
options (argparse.Namespace) –
field (Optional[int]) –
- Return type:
- toil.utils.toilStats.reportMemory(k, options, field=None, isBytes=False)[source]¶
Given k kilobytes, report back the correct format as string.
- Parameters:
k (float) –
options (argparse.Namespace) –
field (Optional[int]) –
isBytes (bool) –
- Return type:
- toil.utils.toilStats.reportNumber(n, field=None)[source]¶
Given n an integer, report back the correct format as string.
- toil.utils.toilStats.sprintTag(key, tag, options, columnWidths=None)[source]¶
Generate a pretty-print ready string from a JTTag().
- Parameters:
key (str) –
tag (toil.lib.expando.Expando) –
options (argparse.Namespace) –
columnWidths (Optional[ColumnWidths]) –
- Return type:
- toil.utils.toilStats.decorateTitle(title, options)[source]¶
Add a marker to TITLE if the TITLE is sorted on.
- Parameters:
title (str) –
options (argparse.Namespace) –
- Return type:
- toil.utils.toilStats.decorateSubHeader(title, columnWidths, options)[source]¶
Add a marker to the correct field if the TITLE is sorted on.
- Parameters:
title (str) –
columnWidths (ColumnWidths) –
options (argparse.Namespace) –
- Return type:
- toil.utils.toilStats.get(tree, name)[source]¶
Return a float value attribute NAME from TREE.
- Parameters:
tree (toil.lib.expando.Expando) –
name (str) –
- Return type:
- toil.utils.toilStats.sortJobs(jobTypes, options)[source]¶
Return a jobTypes all sorted.
- Parameters:
jobTypes (List[Any]) –
options (argparse.Namespace) –
- Return type:
List[Any]
- toil.utils.toilStats.reportPrettyData(root, worker, job, job_types, options)[source]¶
Print the important bits out.
- Parameters:
root (toil.lib.expando.Expando) –
worker (List[toil.job.Job]) –
job (List[toil.job.Job]) –
job_types (List[Any]) –
options (argparse.Namespace) –
- Return type:
- toil.utils.toilStats.computeColumnWidths(job_types, worker, job, options)[source]¶
Return a ColumnWidths() object with the correct max widths.
- Parameters:
job_types (List[Any]) –
worker (List[toil.job.Job]) –
job (List[toil.job.Job]) –
options (toil.lib.expando.Expando) –
- Return type:
- toil.utils.toilStats.updateColumnWidths(tag, cw, options)[source]¶
Update the column width attributes for this tag’s fields.
- Parameters:
tag (toil.lib.expando.Expando) –
cw (ColumnWidths) –
options (toil.lib.expando.Expando) –
- Return type:
None
- toil.utils.toilStats.buildElement(element, items, itemName)[source]¶
Create an element for output.
- Parameters:
element (toil.lib.expando.Expando) –
items (List[toil.job.Job]) –
itemName (str) –
- Return type:
- toil.utils.toilStats.createSummary(element, containingItems, containingItemName, getFn)[source]¶
- Parameters:
element (toil.lib.expando.Expando) –
containingItems (List[toil.job.Job]) –
containingItemName (str) –
getFn (Callable[[toil.job.Job], List[Optional[toil.job.Job]]]) –
- Return type:
None
- toil.utils.toilStats.getStats(jobStore)[source]¶
Collect and return the stats and config data.
- Parameters:
jobStore (toil.jobStores.abstractJobStore.AbstractJobStore) –
- Return type:
- toil.utils.toilStats.processData(config, stats)[source]¶
Collate the stats and report
- Parameters:
config (toil.common.Config) –
stats (toil.lib.expando.Expando) –
- Return type:
- toil.utils.toilStats.reportData(tree, options)[source]¶
- Parameters:
tree (toil.lib.expando.Expando) –
options (argparse.Namespace) –
- Return type:
None
- toil.utils.toilStats.category_choices = ['time', 'clock', 'wait', 'memory']¶
- toil.utils.toilStats.sort_category_choices = ['time', 'clock', 'wait', 'memory', 'alpha', 'count']¶
- toil.utils.toilStats.sort_field_choices = ['min', 'med', 'ave', 'max', 'total']¶
- toil.utils.toilStats.add_stats_options(parser)[source]¶
- Parameters:
parser (argparse.ArgumentParser) –
- Return type:
None