Skip to content
Snippets Groups Projects
Commit fa50200e authored by Simon Ehrenstein's avatar Simon Ehrenstein
Browse files

Use python 3.7

parent 7743a0c6
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python #!/usr/bin/env python3.7
import sys import sys
import os import os
......
from dataclasses import dataclass
@dataclass
class ExperimentConfig: class ExperimentConfig:
""" Wrapper for the configuration of an experiment. """ """ Wrapper for the configuration of an experiment. """
def __init__(self, use_case, dim_values, replicas, partitions, cpu_limit, memory_limit, kafka_streams_commit_interval_ms, execution_minutes, benchmarking_strategy, subexperiment_executor): use_case: str
self.use_case=use_case dim_values: list
self.dim_values=dim_values replicas: list
self.replicas=replicas partitions: int
self.partitions=partitions cpu_limit: str
self.cpu_limit=cpu_limit memory_limit: str
self.memory_limit=memory_limit kafka_streams_commit_interval_ms: int
self.kafka_streams_commit_interval_ms=kafka_streams_commit_interval_ms execution_minutes: int
self.execution_minutes=execution_minutes benchmarking_strategy: object
self.benchmarking_strategy=benchmarking_strategy subexperiment_executor: object
self.subexperiment_executor=subexperiment_executor \ No newline at end of file
\ No newline at end of file
from dataclasses import dataclass
@dataclass
class SubexperimentConfig: class SubexperimentConfig:
""" Wrapper for the configuration of a subexperiment """ """ Wrapper for the configuration of a subexperiment """
def __init__(self, use_case, counter, dim_value, replicas, partitions, cpu_limit, memory_limit, kafka_streams_commit_interval_ms, execution_minutes, subexperiment_executor): use_case: str
self.use_case=use_case counter: int
self.counter=counter dim_value: int
self.dim_value=dim_value replicas: int
self.replicas=replicas partitions: int
self.partitions=partitions cpu_limit: str
self.cpu_limit=cpu_limit memory_limit: str
self.memory_limit=memory_limit kafka_streams_commit_interval_ms: int
self.kafka_streams_commit_interval_ms=kafka_streams_commit_interval_ms execution_minutes: int
self.execution_minutes=execution_minutes subexperiment_executor: object
self.subexperiment_executor=subexperiment_executor \ No newline at end of file
\ No newline at end of file
# Contains the default strategy that executes a subexperiment for all combinations of instances and dimension values. # Contains the default strategy that executes a subexperiment for all combinations of instances and dimension values.
import os import os
from config import SubexperimentConfig from .config import SubexperimentConfig
def execute(config): def execute(config):
subexperiment_counter=0 subexperiment_counter=0
......
import strategies
def test_strategy():
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment