def traverse_pre(target, dic_file): """ dic_file means sections in the yaml file which store the information of machine """ if name_str not in dic_file: dic_file[name_str] = {} hostName = server_utils.get_host_name(target) dic_file[name_str] = hostName if conf_str not in dic_file: dic_file[conf_str] = {} dic_file[conf_str] = server_utils.get_host_hardware_info(target) return dic_file
def traverse_pre(target, dic_file): """ dic_file means sections in the yaml file which store the information of machine """ if 'name' not in dic_file: dic_file['name'] = {} hostName = server_utils.get_host_name(target) dic_file['name'] = hostName if 'Configuration' not in dic_file: dic_file['Configuration'] = {} dic_file['Configuration'] = server_utils.get_host_hardware_info(target) return dic_file
def output_summary_info(target, interval): summary_file = caliper_path.folder_ope.summary_file if os.path.exists(summary_file): os.remove(summary_file) hardware_info = server_utils.get_host_hardware_info(target) write_yaml_file(hardware_info, summary_file) used_time = "Total used time: %.4s minutes" % (interval/60.0) write_file(summary_file, used_time) write_summary_tools(summary_file, target) write_info_for_tools(summary_file, target)