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:
cluster (
Cluster
)save_dir
- 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:
service_chain_managers_dict (
dict
[str
,ServiceChainManager
])save_dir
- 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:
service_chain_managers_dict (
dict
[str
,ServiceChainManager
])save_dir
- 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:
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.
- 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:
cluster (
Cluster
)save_dir
- 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:
service_chain_managers_dict (
dict
[str
,ServiceChainManager
])save_dir
- 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:
service_chain_managers_dict (
dict
[str
,ServiceChainManager
])save_dir
- 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:
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: