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

Use python 3.7

parent f1b332b7
No related branches found
No related tags found
4 merge requests!39Add Support for Benchmarking Strategies,!36Implement Benchmarking Strategy: Heuristic 2 (Binary Search Strategy),!35Implement Benchmarking Strategy: Heuristic 1 (Step Strategy),!26Add Support for Benchmarking Strategies
#!/usr/bin/env python
#!/usr/bin/env python3.7
import sys
import os
......
from dataclasses import dataclass
@dataclass
class ExperimentConfig:
""" 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):
self.use_case=use_case
self.dim_values=dim_values
self.replicas=replicas
self.partitions=partitions
self.cpu_limit=cpu_limit
self.memory_limit=memory_limit
self.kafka_streams_commit_interval_ms=kafka_streams_commit_interval_ms
self.execution_minutes=execution_minutes
self.benchmarking_strategy=benchmarking_strategy
self.subexperiment_executor=subexperiment_executor
\ No newline at end of file
use_case: str
dim_values: list
replicas: list
partitions: int
cpu_limit: str
memory_limit: str
kafka_streams_commit_interval_ms: int
execution_minutes: int
benchmarking_strategy: object
subexperiment_executor: object
\ No newline at end of file
from dataclasses import dataclass
@dataclass
class SubexperimentConfig:
""" 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):
self.use_case=use_case
self.counter=counter
self.dim_value=dim_value
self.replicas=replicas
self.partitions=partitions
self.cpu_limit=cpu_limit
self.memory_limit=memory_limit
self.kafka_streams_commit_interval_ms=kafka_streams_commit_interval_ms
self.execution_minutes=execution_minutes
self.subexperiment_executor=subexperiment_executor
\ No newline at end of file
use_case: str
counter: int
dim_value: int
replicas: int
partitions: int
cpu_limit: str
memory_limit: str
kafka_streams_commit_interval_ms: int
execution_minutes: int
subexperiment_executor: object
\ No newline at end of file
# Contains the default strategy that executes a subexperiment for all combinations of instances and dimension values.
import os
from config import SubexperimentConfig
from .config import SubexperimentConfig
def execute(config):
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.
Finish editing this message first!
Please register or to comment