def populate_job_invocation_time_details(wf_info, job_stats, invocation_stats, date_time_filter): """ Populates the job instances and invocation time and runtime statistics sorted by time. @param workflow_info the WorkflowInfo object reference @param job_stats the job statistics by time tuple @param invocation_stats the invocation statisctics by time tuple @param date_time_filter date time filter """ formatted_stats_list = plot_utils.convert_stats_to_base_time( job_stats, date_time_filter) jobs_time_list = [] for stats in formatted_stats_list: content = [stats['date_format'], stats['count'], stats['runtime']] jobs_time_list.append(content) wf_info.wf_job_instances_over_time_statistics[ date_time_filter] = jobs_time_list formatted_stats_list = plot_utils.convert_stats_to_base_time( invocation_stats, date_time_filter) invoc_time_list = [] for stats in formatted_stats_list: content = [stats['date_format'], stats['count'], stats['runtime']] invoc_time_list.append(content) wf_info.wf_invocations_over_time_statistics[ date_time_filter] = invoc_time_list
def populate_job_invocation_time_details(wf_info, job_stats, invocation_stats ,date_time_filter): """ Populates the job instances and invocation time and runtime statistics sorted by time. @param workflow_info the WorkflowInfo object reference @param job_stats the job statistics by time tuple @param invocation_stats the invocation statisctics by time tuple @param date_time_filter date time filter """ formatted_stats_list = plot_utils.convert_stats_to_base_time(job_stats , date_time_filter) jobs_time_list =[] for stats in formatted_stats_list: content = [stats['date_format'] , stats['count'],stats['runtime']] jobs_time_list.append(content) wf_info.wf_job_instances_over_time_statistics[date_time_filter] = jobs_time_list formatted_stats_list = plot_utils.convert_stats_to_base_time(invocation_stats , date_time_filter) invoc_time_list = [] for stats in formatted_stats_list: content = [stats['date_format'] , stats['count'],stats['runtime']] invoc_time_list.append(content) wf_info.wf_invocations_over_time_statistics[date_time_filter] = invoc_time_list
def print_statistics_by_time_and_host(workflow_stats , time_filter): """ Prints the job instance and invocation statistics sorted by time @param workflow_stats : workflow statistics object reference """ statistics_by_time_str = NEW_LINE_STR workflow_stats.set_job_filter('nonsub') workflow_stats.set_time_filter('hour') workflow_stats.set_transformation_filter(exclude=['condor::dagman']) statistics_by_time_str +="<div>#Job instances statistics per " + time_filter +"</div>" statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="<table class ='gallery_table'>" statistics_by_time_str +=print_row(time_stats_col_name, True) statistics_by_time_str += NEW_LINE_STR stats_by_time = workflow_stats.get_jobs_run_by_time() formatted_stats_list = stats_utils.convert_stats_to_base_time(stats_by_time , time_filter) for stats in formatted_stats_list: content = [stats['date_format'] , str(stats['count']),round_to_str(stats['runtime'])] statistics_by_time_str += print_row(content ) statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="</table>" statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="<div>#Invocation statistics run per " + time_filter +"</div>" statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="<table class ='gallery_table'>" statistics_by_time_str +=print_row(time_stats_col_name , True ) statistics_by_time_str += NEW_LINE_STR stats_by_time = workflow_stats.get_invocation_by_time() formatted_stats_list = stats_utils.convert_stats_to_base_time(stats_by_time , time_filter) for stats in formatted_stats_list: content = [stats['date_format'] , str(stats['count']),round_to_str(stats['runtime'])] statistics_by_time_str += print_row(content ) statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="</table>" statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="<div>#Job instances statistics on host per " + time_filter +"</div>" statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="<table class ='gallery_table'>" statistics_by_time_str +=print_row(time_host_stats_col_name , True ) statistics_by_time_str += NEW_LINE_STR stats_by_time = workflow_stats.get_jobs_run_by_time_per_host() formatted_stats_list = stats_utils.convert_stats_to_base_time(stats_by_time , time_filter, True) for stats in formatted_stats_list: content = [stats['date_format'] ,str(stats['host']) , str(stats['count']),round_to_str(stats['runtime'])] statistics_by_time_str += print_row(content) statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="</table>" statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="<div>#Invocation statistics on host per " + time_filter +"</div>" statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="<table class ='gallery_table'>" statistics_by_time_str +=print_row(time_host_stats_col_name , True ) statistics_by_time_str += NEW_LINE_STR stats_by_time = workflow_stats.get_invocation_by_time_per_host() formatted_stats_list = stats_utils.convert_stats_to_base_time(stats_by_time , time_filter, True) for stats in formatted_stats_list: content = [stats['date_format'] ,str(stats['host']) , str(stats['count']),round_to_str(stats['runtime'])] statistics_by_time_str += print_row(content ) statistics_by_time_str += NEW_LINE_STR statistics_by_time_str +="</table>" return statistics_by_time_str