many updates in report code and in storage structure, this commit is broken
diff --git a/wally/suits/itest.py b/wally/suits/itest.py
index ac9e1c1..9aa4ce6 100644
--- a/wally/suits/itest.py
+++ b/wally/suits/itest.py
@@ -2,13 +2,13 @@
import time
import logging
import os.path
-from typing import Any, List, Optional, Callable, Tuple, Iterable, cast
+from typing import Any, List, Optional, Callable, Iterable, cast
-from concurrent.futures import ThreadPoolExecutor, wait, Future
+from concurrent.futures import ThreadPoolExecutor, wait
from ..utils import StopTestError, get_time_interval_printable_info
from ..node_interfaces import IRPCNode
-from ..result_classes import TestSuiteConfig, TestJobConfig, JobMetrics, TimeSeries, IResultStorage
+from ..result_classes import SuiteConfig, JobConfig, TimeSeries, IResultStorage
logger = logging.getLogger("wally")
@@ -24,7 +24,7 @@
retry_time = 30
job_config_cls = None # type: type
- def __init__(self, storage: IResultStorage, suite: TestSuiteConfig, on_idle: Callable[[], None] = None) -> None:
+ def __init__(self, storage: IResultStorage, suite: SuiteConfig, on_idle: Callable[[], None] = None) -> None:
self.suite = suite
self.stop_requested = False
self.sorted_nodes_ids = sorted(node.node_id for node in self.suite.nodes)
@@ -57,16 +57,16 @@
def __init__(self, *args, **kwargs) -> None:
PerfTest.__init__(self, *args, **kwargs)
- self.job_configs = None # type: List[TestJobConfig]
+ self.job_configs = None # type: List[JobConfig]
@abc.abstractmethod
- def get_expected_runtime(self, iter_cfg: TestJobConfig) -> Optional[int]:
+ def get_expected_runtime(self, iter_cfg: JobConfig) -> Optional[int]:
pass
- def get_not_done_jobs(self) -> Iterable[TestJobConfig]:
+ def get_not_done_jobs(self) -> Iterable[JobConfig]:
jobs_map = {job.storage_id: job for job in self.job_configs}
already_in_storage = set()
- for db_config in cast(List[TestJobConfig], self.storage.iter_job(self.suite)):
+ for db_config in cast(List[JobConfig], self.storage.iter_job(self.suite)):
if db_config.storage_id in jobs_map:
job = jobs_map[db_config.storage_id]
if job != db_config:
@@ -113,7 +113,7 @@
for job in not_in_storage:
results = [] # type: List[TimeSeries]
for retry_idx in range(self.max_retry):
- logger.debug("Prepare job %s", job.summary)
+ logger.debug("Prepare job %s", job.params.summary)
# prepare nodes for new iterations
wait([pool.submit(self.prepare_iteration, node, job) for node in self.suite.nodes])
@@ -172,8 +172,7 @@
self.name, job.summary,
max_start_time - min_start_time, self.max_time_diff)
- job.reliable_info_starts_at = max_start_time
- job.reliable_info_stops_at = min_stop_time
+ job.reliable_info_range = (int(max_start_time), int(min_stop_time))
self.storage.put_job(self.suite, job)
self.storage.sync()
@@ -186,11 +185,11 @@
pass
@abc.abstractmethod
- def prepare_iteration(self, node: IRPCNode, job: TestJobConfig) -> None:
+ def prepare_iteration(self, node: IRPCNode, job: JobConfig) -> None:
pass
@abc.abstractmethod
- def run_iteration(self, node: IRPCNode, job: TestJobConfig) -> List[TimeSeries]:
+ def run_iteration(self, node: IRPCNode, job: JobConfig) -> List[TimeSeries]:
pass
@@ -204,7 +203,7 @@
# TODO: fix job_configs field
raise NotImplementedError("Fix job configs")
- def get_expected_runtime(self, job: TestJobConfig) -> Optional[int]:
+ def get_expected_runtime(self, job: JobConfig) -> Optional[int]:
return None
def config_node(self, node: IRPCNode) -> None:
@@ -215,10 +214,10 @@
cmd += ' ' + self.suite.params.get('prerun_opts', '')
node.run(cmd, timeout=self.prerun_tout)
- def prepare_iteration(self, node: IRPCNode, job: TestJobConfig) -> None:
+ def prepare_iteration(self, node: IRPCNode, job: JobConfig) -> None:
pass
- def run_iteration(self, node: IRPCNode, job: TestJobConfig) -> List[TimeSeries]:
+ def run_iteration(self, node: IRPCNode, job: JobConfig) -> List[TimeSeries]:
# TODO: have to store logs
cmd = self.join_remote(self.run_script)
cmd += ' ' + self.suite.params.get('run_opts', '')