Skip to content

Commit e2ea30f

Browse files
committed
ft-orchestration dont print reports twice and update Manual probe class
1 parent b46bb71 commit e2ea30f

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

tools/ft-orchestration/src/probe/manual.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
11
from pathlib import Path
22
import logging
3-
from src.probe.interface import ProbeInterface
3+
from src.probe.interface import ProbeInterface, HostStats
44
import time
55

66

7+
class EmptyHostStats(HostStats):
8+
def __init__(self, executor, watch_cmd):
9+
pass
10+
11+
local_file = None
12+
cpus = 0
13+
total_ram = 0
14+
15+
def start(self):
16+
pass
17+
18+
def stop(self):
19+
pass
20+
21+
def cleanup(self):
22+
pass
23+
24+
def get_csv(self, output_dir):
25+
pass
26+
27+
728
class Manual(ProbeInterface):
829
"""Empty implementation of ProbeInterface to allow manual setup or hardware flow exporter"""
930

@@ -22,6 +43,8 @@ def __init__(
2243
):
2344
self._timeouts = (active_timeout, inactive_timeout)
2445

46+
host_statistics = EmptyHostStats()
47+
2548
def start(self):
2649
logging.warning("start probe now")
2750
for i in range(10, -1, -1):
@@ -36,7 +59,8 @@ def get_special_fields(self):
3659

3760
def stop(self):
3861
logging.warning("you can stop the probe now")
39-
for i in range(10, -1, -1):
62+
wait_time = max(self._timeouts)
63+
for i in range(wait_time, -1, -1):
4064
logging.info(i)
4165
time.sleep(1)
4266

tools/ft-orchestration/tests/simulation/test_simulation_threshold.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,6 @@ def run_single_test(loops: int, speed: MbpsSpeed) -> tuple[bool, StatisticalRepo
371371
gc.collect()
372372

373373
passed = scenario.test.mbps_required <= speed_current
374-
if report:
375-
report.print_results()
376374
HTMLReportData.simulation_summary_report.update_stats("sim_threshold", passed)
377375

378376
logging.getLogger().info(

0 commit comments

Comments
 (0)