commonpower.benchmark.storage.BenchmarkStorage
- class BenchmarkStorage[source]
Bases:
objectThe base class for benchmark storage.
This class provides an interface for saving and loading benchmark scenarios. Subclasses should implement the save, load, and handle_data_sources methods.
- None
Methods
Handles the data sources for the benchmark scenario.
Loads data from the specified URI.
Saves the serialized scenario to the specified URI.
- handle_data_sources(system_node: System, uri) None[source]
Handles the data sources for the benchmark scenario. This method should be overridden in a subclass to handle the data sources appropriately.
- Parameters:
system_node (System) – The system node of the benchmark scenario.
uri (str) – The URI of the data sources.
- Returns:
None
- load(uri: str)[source]
Loads data from the specified URI.
- Parameters:
uri (str) – The URI of the data to be loaded.
- Raises:
NotImplementedError – This method is not implemented and should be overridden in a subclass.
- save(benchmark_identifier: str, serialized_scenario: str, uri: str)[source]
Saves the serialized scenario to the specified URI.
- Parameters:
benchmark_identifier (str) – The identifier of the benchmark.
serialized_scenario (str) – The serialized scenario to be saved.
uri (str) – The URI where the serialized scenario should be saved.
- Raises:
NotImplementedError – This method is not implemented in the base class.