perfsim.drivers

Contents

perfsim.drivers#

Module contents#

Submodules#

perfsim.drivers.file_storage_driver module#

class perfsim.drivers.file_storage_driver.FileStorageDriver(name, base_dir='results/')[source]#

Bases: ResultsStorageDriver

File storage driver is the class responsible for storing the results of the simulation in a file system.

Parameters:
  • name (str)

  • base_dir (str)

base_dir: str#

The base directory where the results will be stored.

save_all(simulation)[source]#

Save all the results of the simulation in the file system.

Parameters:

simulation (Simulation)

Returns:

save_simulation_scenario_results(simulation)[source]#

Save the results of the simulation scenario in the file system.

Parameters:

simulation (Simulation)

Returns:

save_cluster_topology_graph(cluster, save_dir='results/topologies')[source]#

Save the topology graph of the cluster in the file system.

Parameters:
Returns:

save_service_chains_original_graph(service_chain_managers_dict, save_dir='results/service_chains/{middle}/original')[source]#

Save the original service chains graph of the service chain managers in the file system.

Parameters:
Return type:

dict[str, str]

Returns:

save_service_chains_alternative_graph(service_chain_managers_dict, save_dir='results/service_chains/{middle}/alternative')[source]#

Save the alternative service chains graph of the service chain managers in the file system.

Parameters:
Return type:

dict[str, str]

Returns:

save_service_chain_result_graph(result, save_dir='results/{result_key}')[source]#

Save the results of the service chains in the file system.

Parameters:
  • result

  • save_dir

Returns:

save_timeline_graph(result, save_dir='results/{result_key}')[source]#

Save the timeline graph of the results in the file system.

Parameters:
  • result

  • save_dir (str)

Returns:

save_hosts_cores_heatmap(hosts_dict, save_dir='results/cpu/heatmap/{result_key}')[source]#

Save the hosts cores heatmap graph in the file system.

Parameters:
  • hosts_dict (Dict[str, Host])

  • save_dir (str)

Returns:

perfsim.drivers.neptune_storage_driver module#

class perfsim.drivers.neptune_storage_driver.NeptuneStorageDriver(name, project_id, api_token)[source]#

Bases: FileStorageDriver

Neptune storage driver is the class responsible for storing the results of the simulation in Neptune.

Parameters:
  • name (str)

  • project_id (str)

  • api_token (str)

handler: Run#

The Neptune handler.

init_neptune()[source]#

Initialize the Neptune handler.

Returns:

save_simulation_scenario_results(simulation)[source]#

Save the results of the simulation scenario in Neptune.

Parameters:

simulation (Simulation)

Returns:

save_cluster_topology_graph(cluster, save_dir='results/topologies')[source]#

Save the topology graph of the cluster in Neptune.

Parameters:
Returns:

save_service_chains_original_graph(service_chain_managers_dict, save_dir='results/service_chains/{middle}/original/{middle}')[source]#

Save the original service chains graph in Neptune.

Parameters:
Returns:

save_service_chains_alternative_graph(service_chain_managers_dict, save_dir='results/service_chains/{middle}/alternative')[source]#

Save the alternative service chains graph in Neptune.

Parameters:
Returns:

save_service_chain_result_graph(result, save_dir='results/{result_key}')[source]#

Save the service chain result graph in Neptune.

Parameters:
  • result

  • save_dir

Returns:

save_timeline_graph(result, save_dir='results/timeline')[source]#

Save the timeline graph in Neptune.

Parameters:
  • result

  • save_dir

Returns:

save_hosts_cores_heatmap(hosts_dict, save_dir='results/cpu/heatmap/{result_key}')[source]#

Save the hosts cores heatmap in Neptune.

Parameters:
  • hosts_dict (Dict[str, Host])

  • save_dir (str)

Returns:

perfsim.drivers.results_storage_driver module#

class perfsim.drivers.results_storage_driver.ResultsStorageDriver(name)[source]#

Bases: ABC

The ResultsStorageDriver class is the abstract class for the different storage drivers that can be used to store the results of the simulation.

Parameters:

name (str)

results_with_graphs: dict#

The results with graphs.

name: str#

The name of the storage driver.

save_service_chains_original_graph(service_chain_managers_dict, **atr)[source]#

Save the original service chains graph.

Parameters:
  • service_chain_managers_dict

  • atr

Returns:

save_service_chains_alternative_graph(service_chain_managers_dict, **atr)[source]#

Save the alternative service chains graph.

Parameters:
  • service_chain_managers_dict

  • atr

Returns:

save_cluster_topology_graph(cluster, **atr)[source]#

Save the topology graph of the cluster.

Parameters:
  • cluster

  • atr

Returns:

save_service_chain_result_graph(result, **atr)[source]#

Save the service chain result graph.

Parameters:
  • result

  • atr

Returns:

save_timeline_graph(result, **atr)[source]#

Save the timeline graph.

Parameters:
  • result

  • atr

Returns:

save_simulation_scenario_results(simulation)[source]#

Save the results of the simulation scenario.

Parameters:

simulation

Returns:

save_hosts_cores_heatmap(hosts_dict, **atr)[source]#

Save the hosts cores heatmap.

Parameters:
  • hosts_dict

  • atr

Returns:

save_all(simulation)[source]#

Save all the results of the simulation scenario.

Parameters:

simulation

Returns:

static from_config(conf, default_class, name, **other_attrs)[source]#

Create a storage driver from the configuration.

Parameters:
  • conf (dict)

  • default_class

  • name

  • other_attrs

Return type:

ResultsStorageDriver

Returns: