trafpy.benchmarker.versions package
Subpackages
- trafpy.benchmarker.versions.benchmark_v001 package
- Submodules
- trafpy.benchmarker.versions.benchmark_v001.benchmark_plot_script module
- trafpy.benchmarker.versions.benchmark_v001.config module
- trafpy.benchmarker.versions.benchmark_v001.distribution_generator module
- trafpy.benchmarker.versions.benchmark_v001.old_distribution_generator module
- Module contents
Submodules
trafpy.benchmarker.versions.benchmark module
- class trafpy.benchmarker.versions.benchmark.Benchmark(benchmark_name, benchmark_version='v001', load_prev_dists=True, jobcentric=False)[source]
Bases:
ABC
- get_dist_and_path(dist_name)[source]
Gets distribution data and corresponding path.
If distribution data does not exist, will return dist=None and the path will be where the dist data should be saved if it is generated.
- abstract get_flow_size_dist(dist_name='flow_size_dist')[source]
Loads previously saved flow size dist (if it exists).
This is an abstract method and therefore must be defined by any child class.
- Parameters
dist_name (str) – Name of distribution (determines path to search for previously saved distribution).
- abstract get_interarrival_time_dist(dist_name='interarrival_time_dist')[source]
Loads previously saved interarrival time dist (if it exists).
This is an abstract method and therefore must be defined by any child class.
- Parameters
dist_name (str) – Name of distribution (determines path to search for previously saved distribution).
- abstract get_node_dist(eps, racks_dict, dist_name='node_dist')[source]
Loads previously saved node dist (if it exists).
This is an abstract method and therefore must be defined by any child class.
- Parameters
eps (list) – List of network end points.
racks_dict (dict) – Dict mapping racks to the corresponding end points contained within each rack.
dist_name (str) – Name of distribution (determines path to search for previously saved distribution).
- get_num_ops_dist(dist_name='num_ops_dist')[source]
Loads previously saved number of operations dist (if it exists).
This method only needs to be defined by a child class if jobcentric=True, since flow-centric data have no notion of ‘number of operations’ (in relation to job DAGs).
- Parameters
dist_name (str) – Name of distribution (determines path to search for previously saved distribution).
trafpy.benchmarker.versions.benchmark_importer module
- class trafpy.benchmarker.versions.benchmark_importer.BenchmarkImporter(benchmark_version='v001', load_prev_dists=True)[source]
Bases:
object
- get_benchmark_dists(benchmark_name, eps, racks_dict=None)[source]
Retrieves pre-defined TrafPy benchmark distributions for a network.
- Parameters
benchmark_name (str) – Name of benchmark (e.g. ‘university’).
eps (list) – List of end points/machines/leaf nodes in network.
racks_dict (dict) – Mapping of which end points are in which racks. Keys are rack ids, values are list of end points. If None, assume there is not clustering/rack system in the network where have different end points in different clusters/racks.
trafpy.benchmarker.versions.old_benchmark_importer module
- class trafpy.benchmarker.versions.old_benchmark_importer.BenchmarkImporter(benchmark_version, load_prev_dists=True)[source]
Bases:
object
- get_benchmark_dists(benchmark, eps, racks_dict=None)[source]
Retrieves pre-defined TrafPy benchmark distributions for a network.
- Parameters
benchmark (str) – Name of benchmark (e.g. ‘university’).
eps (list) – List of end points/machines/leaf nodes in network.
racks_dict (dict) – Mapping of which end points are in which racks. Keys are rack ids, values are list of end points. If None, assume there is not clustering/rack system in the network where have different end points in different clusters/racks.