/ src / cproc.py
cproc.py
 1  # Python Imports
 2  
 3  # Project Imports
 4  from src import analysis_logger
 5  from src import plotting
 6  from src import analysis_cproc
 7  
 8  def run(simulation_config, simulation_path, msgs_dict, node_logs, msg_propagation_times, msg_injection_times, min_tss, max_tss):
 9      analysis_logger.G_LOGGER.info('Generating stats for CPROC infrastructure ...')
10  
11      metrics_info, max_cpu_usage, max_memory_usage, total_network_usage, max_disk_usage, avg_samples_per_node = analysis_cproc.compute_process_level_metrics(simulation_path, simulation_config)
12      
13      """ Build simulation summary """
14      summary = analysis_cproc.build_summary(simulation_config, metrics_info, msgs_dict, node_logs, [], min_tss, max_tss, avg_samples_per_node)
15      
16      """ Generate Figure """
17      plotting.plot_figure_cproc(msg_propagation_times, max_cpu_usage, max_memory_usage, total_network_usage, max_disk_usage, 
18                      msg_injection_times, summary['general'], summary['parameters'])
19      
20      """ Export summary """
21      analysis_cproc.export_summary(simulation_path, summary)
22  
23