Plot Module

Plot module to generate figure from the log of the application and worker’s logs.

This module can generate two type of figure: Overview, Worker. The Overview figure is the overview
of the all application with the aggregated cpu metrics from the workers. The Worker figure is the detail of the execution of one worker in which each stage as its real progress and estimated progress including the allocation of cpu.
plot.find_first_ts_worker(app_id, workers_dict)[source]

Find the first start ts of the stage PLOT_SID_STAGE of all the workers

Parameters:
  • app_id – the id of the application
  • workers_dict – the dictionary data of the workers
Returns:

the timestamp of the first worker to start the PLOT_SID_STAGE

plot.load_config(folder)[source]

Load the config from the folder if present otherwise load the config from config.py

Parameters: folder – the folder path where find the config file
Returns: the config dictionary
plot.plot(folder)[source]
Parameters: folder
Returns:
plot.plot_app_overview(app_id, app_dict, folder, config)[source]

Plot only the application overview without the cpu data from the workers

Parameters:
  • app_id – the id of the application
  • app_dict – the data dictionary of the application
  • folder – the folder where to save the output image
  • config – the config dict of the application
Returns:

nothing; save the figure in the output folder

plot.plot_mean_comparision(folders)[source]
Parameters: folders
Returns:
plot.plot_overview_cpu(app_id, app_info, workers_dict, config, folder)[source]

Function that plot the overview of the application aggregating the cpu data from all the workers showing the application progress and the division by stage

Parameters:
  • app_id – the id of the application
  • app_info – the data dictionary of the application
  • workers_dict – the data dictionary of the workers
  • config – the dictionary of the config file
  • folder – the folder to output the image
Returns:

nothing only save the figure at the end in the folder

plot.plot_worker(app_id, app_info, worker_log, worker_dict, config, first_ts_worker)[source]

Plot the progress of each stage in the worker with the controller’s data

Parameters:
  • app_id – the id of the application
  • app_info – the dictionary with the application’s data
  • worker_log – the path of the worker’s log file
  • worker_dict – the dictionary with the worker’s data
  • config – the dictionary of the config file
  • first_ts_worker – the first start ts of PLOT_SID_STAGE
Returns:

nothing; save the figure in the output folder

plot.text_plotter_x(x_data, axis, labels)[source]

Plot all the label on the axis and adjust y to avoid label overlapping

Parameters:
  • x_data – the list of x point
  • axis – the axis on which plot the label text
  • labels – the list of label to plot
Returns:

Nothing