-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbenchmark.py
More file actions
840 lines (680 loc) · 23.3 KB
/
benchmark.py
File metadata and controls
840 lines (680 loc) · 23.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
# pylint: disable=C0103
"""
Benchmark runner for logprep (logprep-ng and non-ng).
Usage:
python benchmark.py
python benchmark.py --runs 30 45 60
python benchmark.py --runs 30 45 60 --out benchmark_results.txt
python benchmark.py --runs 30 45 60 --services kafka opensearch
Use --help to see all available configuration options.
"""
import argparse
import os
import shutil
import signal
import socket
import subprocess
import sys
import time
from dataclasses import dataclass
from datetime import datetime, timezone
from pathlib import Path
from statistics import mean, median, stdev
import requests
# -------------------------
# GLOBAL SHUTDOWN STATE
# -------------------------
_shutdown_requested: bool = False
_current_logprep_proc: subprocess.Popen | None = None
_current_compose_dir: Path | None = None
_current_env: dict[str, str] | None = None
def _handle_sigint(signum, frame):
"""
Handle Ctrl+C (SIGINT) and perform graceful shutdown.
"""
global _shutdown_requested
_shutdown_requested = True
print("\n\n⚠ Ctrl+C detected. Shutting down benchmark...")
if _current_logprep_proc is not None:
try:
kill_hard(_current_logprep_proc)
except Exception:
pass
if _current_compose_dir is not None and _current_env is not None:
try:
run_cmd(
["docker", "compose", "down"],
cwd=_current_compose_dir,
env=_current_env,
ignore_error=True,
)
except Exception:
pass
sys.exit(130)
# -------------------------
# OUTPUT TEE
# -------------------------
class Tee:
"""Duplicate stdout into an optional second stream."""
def __init__(self, primary, secondary):
"""Initialize with primary and optional secondary stream."""
self._primary = primary
self._secondary = secondary
def write(self, s: str) -> int:
"""Write to both streams."""
n = self._primary.write(s)
self._primary.flush()
if self._secondary is not None:
self._secondary.write(s)
self._secondary.flush()
return n
def flush(self) -> None:
"""Flush both streams."""
self._primary.flush()
if self._secondary is not None:
self._secondary.flush()
# -------------------------
# DATA MODEL
# -------------------------
@dataclass(frozen=True)
class RunResult:
"""Single benchmark run result."""
run_seconds: int
startup_s: float
window_s: float
processed: int
@property
def rate(self) -> float:
"""Processed documents per second."""
return self.processed / self.window_s if self.window_s > 0 else 0.0
# -------------------------
# METADATA PRINT
# -------------------------
def print_benchmark_config(args: argparse.Namespace) -> None:
"""
Print the current benchmark configuration including environment metadata.
Args:
args: Parsed CLI arguments namespace.
"""
now_local = datetime.now()
now_utc = datetime.now(timezone.utc)
print("\n=== BENCHMARK CONFIGURATION ===")
print(f"{'timestamp (local)':30s}: {now_local.isoformat()}")
print(f"{'timestamp (UTC)':30s}: {now_utc.isoformat()}")
print(f"{'python version':30s}: {sys.version.split()[0]}")
print("-" * 40)
args_dict = vars(args).copy()
for key in sorted(args_dict):
value = args_dict[key]
# Format integers with underscore separator
if isinstance(value, int):
formatted = f"{value:_}"
# Format list of integers (e.g. runs)
elif isinstance(value, list) and all(isinstance(v, int) for v in value):
formatted = "[" + ", ".join(f"{v:_}" for v in value) + "]"
else:
formatted = value
print(f"{key:30s}: {formatted}")
if key == "ng":
pipeline_config = resolve_pipeline_config(args.ng)
mode = "logprep-ng" if args.ng == 1 else "logprep"
print(f"{' ↳ mode':30s}: {mode}")
print(f"{' ↳ pipeline_config':30s}: {pipeline_config}")
print("================================\n")
def print_single_run_result(run_result: RunResult, *, event_num: int) -> None:
"""
Print the result block for a single run.
Args:
run_result: RunResult.
event_num: Number of generated events.
"""
print("--- RESULT ---")
print(f"run_seconds: {run_result.run_seconds:_}")
print(f"events generated: {event_num:_}")
print(f"startup time: {run_result.startup_s:.3f} s")
print(f"measurement window: {run_result.window_s:.3f} s")
print(f"processed (OpenSearch): {run_result.processed:_}")
print(f"throughput: {run_result.rate:,.2f} docs/s")
print("--------------")
# -------------------------
# HELPERS
# -------------------------
def run_cmd(
cmd: list[str],
*,
cwd: Path | None = None,
env: dict[str, str] | None = None,
ignore_error: bool = False,
) -> None:
"""
Run a command and optionally ignore non-zero exit codes.
Args:
cmd: Command and arguments.
cwd: Optional working directory.
env: Optional environment variables.
ignore_error: Suppress CalledProcessError if True.
"""
try:
subprocess.run(cmd, check=True, cwd=str(cwd) if cwd else None, env=env)
except subprocess.CalledProcessError:
if not ignore_error:
raise
def popen_cmd(
cmd: list[str],
*,
cwd: Path | None = None,
env: dict[str, str] | None = None,
) -> subprocess.Popen:
"""
Start a subprocess without waiting.
Args:
cmd: Command and arguments.
cwd: Optional working directory.
env: Optional environment variables.
Returns:
subprocess.Popen handle.
"""
return subprocess.Popen(
cmd,
cwd=str(cwd) if cwd else None,
env=env,
start_new_session=True,
)
def kill_hard(proc: subprocess.Popen) -> None:
"""
Forcefully terminate a process.
Args:
proc: Process handle.
"""
if proc.poll() is not None:
return
try:
os.killpg(proc.pid, signal.SIGTERM)
except ProcessLookupError:
return
try:
proc.wait(timeout=5)
return
except subprocess.TimeoutExpired:
pass
try:
os.killpg(proc.pid, signal.SIGKILL)
except ProcessLookupError:
return
proc.wait()
def opensearch_refresh(opensearch_url: str, processed_index: str) -> None:
"""
Force a refresh of the processed index so counts reflect recent writes.
Args:
opensearch_url: OpenSearch base URL.
processed_index: Index name to refresh.
"""
resp = requests.post(f"{opensearch_url}/{processed_index}/_refresh", timeout=10)
if resp.status_code == 404:
return
resp.raise_for_status()
def opensearch_count_processed(opensearch_url: str, processed_index: str) -> int:
"""
Return document count of the processed index.
Args:
opensearch_url: OpenSearch base URL.
processed_index: Index name to query.
Returns:
Document count as integer.
"""
resp = requests.get(f"{opensearch_url}/{processed_index}/_count", timeout=10)
if resp.status_code == 404:
return 0
resp.raise_for_status()
return int(resp.json()["count"])
def reset_prometheus_dir(path: str) -> None:
"""
Recreate PROMETHEUS_MULTIPROC_DIR.
Args:
path: Directory path.
"""
shutil.rmtree(path, ignore_errors=True)
Path(path).mkdir(parents=True, exist_ok=True)
def resolve_pipeline_config(ng: int) -> Path:
"""
Return pipeline config for selected mode.
Args:
ng: 1 for logprep-ng, 0 for logprep.
Returns:
Pipeline config path.
"""
if ng == 1:
return Path("./examples/exampledata/config/ng_pipeline.yml")
return Path("./examples/exampledata/config/pipeline.yml")
def read_vm_max_map_count() -> int:
"""
Read current vm.max_map_count from /proc.
Returns:
Current vm.max_map_count as integer.
"""
try:
return int(Path("/proc/sys/vm/max_map_count").read_text(encoding="utf-8").strip())
except Exception:
return -1
def ensure_vm_max_map_count(min_value: int = 262144) -> None:
"""
Ensure vm.max_map_count is at least the given minimum value.
Args:
min_value: Minimum required vm.max_map_count.
Raises:
RuntimeError if vm.max_map_count is too low.
"""
current = read_vm_max_map_count()
if current == -1:
return
if current < min_value:
raise RuntimeError(
f"vm.max_map_count is {current}, but must be at least {min_value} for OpenSearch.\n"
f"Run: sudo sysctl -w vm.max_map_count={min_value}"
)
def wait_for_tcp(host: str, port: int, *, timeout_s: float, interval_s: float = 0.5) -> None:
"""
Wait until a TCP service accepts connections.
Args:
host: Hostname or IP.
port: TCP port.
timeout_s: Total timeout in seconds.
interval_s: Poll interval in seconds.
"""
deadline = time.time() + timeout_s
last_err: OSError | None = None
while time.time() < deadline:
try:
with socket.create_connection((host, port), timeout=2):
return
except OSError as e:
last_err = e
time.sleep(interval_s)
raise TimeoutError(f"TCP service not ready: {host}:{port} (last error: {last_err})")
def wait_for_opensearch(opensearch_url: str, *, timeout_s: float, interval_s: float = 0.5) -> None:
"""
Wait until OpenSearch responds with a successful HTTP status.
Args:
opensearch_url: OpenSearch base URL.
timeout_s: Total timeout in seconds.
interval_s: Poll interval in seconds.
"""
deadline = time.time() + timeout_s
last_err: Exception | None = None
while time.time() < deadline:
try:
resp = requests.get(f"{opensearch_url}/_cluster/health", timeout=2)
if resp.status_code == 200:
return
except Exception as e:
last_err = e
time.sleep(interval_s)
raise TimeoutError(f"OpenSearch not ready: {opensearch_url} (last error: {last_err})")
def wait_for_kafka_topic(
host: str, port: int, topic: str, *, timeout_s: float, interval_s: float = 0.5
) -> None:
"""
Wait until Kafka responds to topic describe for a given topic.
Args:
host: Kafka host.
port: Kafka port.
topic: Topic name to describe.
timeout_s: Total timeout in seconds.
interval_s: Poll interval in seconds.
"""
deadline = time.time() + timeout_s
last_err: Exception | None = None
while time.time() < deadline:
try:
proc = subprocess.run(
[
"docker",
"exec",
"kafka",
"kafka-topics.sh",
"--bootstrap-server",
f"{host}:{port}",
"--topic",
topic,
"--describe",
],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
)
if proc.returncode == 0:
return
last_err = RuntimeError(proc.stderr.strip() or proc.stdout.strip())
except Exception as e:
last_err = e
time.sleep(interval_s)
raise TimeoutError(f"Kafka not ready (topic '{topic}' not describable). Last error: {last_err}")
def compose_config_services(
*,
compose_dir: Path,
env: dict[str, str],
) -> list[str]:
"""
Return all services defined in the docker compose project.
Args:
compose_dir: Docker compose directory.
env: Environment variables.
Returns:
Service names as a list of strings.
"""
proc = subprocess.run(
["docker", "compose", "config", "--services"],
check=True,
cwd=str(compose_dir),
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
)
return [line.strip() for line in proc.stdout.splitlines() if line.strip()]
def stop_unwanted_services(
*,
compose_dir: Path,
env: dict[str, str],
wanted: list[str],
) -> None:
"""
Stop any services not included in the wanted list.
Args:
compose_dir: Docker compose directory.
env: Environment variables.
wanted: Services that should remain running.
"""
all_services = compose_config_services(compose_dir=compose_dir, env=env)
unwanted = [s for s in all_services if s not in set(wanted)]
if not unwanted:
return
run_cmd(["docker", "compose", "stop", *unwanted], cwd=compose_dir, env=env, ignore_error=True)
run_cmd(
["docker", "compose", "rm", "-f", *unwanted], cwd=compose_dir, env=env, ignore_error=True
)
# -------------------------
# BENCH
# -------------------------
def benchmark_run(
run_seconds: int,
*,
ng: int,
event_num: int,
prometheus_multiproc_dir: str,
compose_dir: Path,
pipeline_config: Path,
gen_input_dir: Path,
bootstrap_servers: str,
sleep_after_compose_up_s: int,
sleep_after_generate_s: int,
sleep_after_logprep_start_s: int,
opensearch_url: str,
processed_index: str,
services: list[str],
) -> RunResult:
"""
Execute one benchmark run.
Args:
run_seconds: Measurement window length.
ng: 1 for logprep-ng, 0 for logprep.
event_num: Number of events to generate.
prometheus_multiproc_dir: Metrics directory.
compose_dir: Docker compose directory.
pipeline_config: Pipeline configuration file.
gen_input_dir: Generator input directory (shared for ng and non-ng).
bootstrap_servers: Kafka bootstrap.servers value.
sleep_after_compose_up_s: Sleep after compose up.
sleep_after_generate_s: Sleep after generation.
sleep_after_logprep_start_s: Warmup sleep before measurement.
opensearch_url: OpenSearch base URL.
processed_index: Index to count.
services: Docker compose services to start (teardown uses compose down).
Returns:
RunResult for this run.
"""
env = os.environ.copy()
env["PROMETHEUS_MULTIPROC_DIR"] = prometheus_multiproc_dir
reset_prometheus_dir(prometheus_multiproc_dir)
logprep_proc: subprocess.Popen | None = None
global _current_logprep_proc, _current_compose_dir, _current_env
_current_compose_dir = compose_dir
_current_env = env
try:
ensure_vm_max_map_count()
run_cmd(["docker", "compose", "down"], cwd=compose_dir, env=env)
run_cmd(["docker", "volume", "rm", "compose_opensearch-data"], env=env, ignore_error=True)
run_cmd(
["docker", "compose", "up", "-d", "--no-deps", *services],
cwd=compose_dir,
env=env,
)
stop_unwanted_services(compose_dir=compose_dir, env=env, wanted=services)
if "kafka" in set(services):
wait_for_tcp("127.0.0.1", 9092, timeout_s=float(sleep_after_compose_up_s))
wait_for_kafka_topic(
"127.0.0.1", 9092, "consumer", timeout_s=float(sleep_after_compose_up_s)
)
if "opensearch" in set(services):
wait_for_tcp("127.0.0.1", 9200, timeout_s=float(sleep_after_compose_up_s))
wait_for_opensearch(opensearch_url, timeout_s=float(sleep_after_compose_up_s))
batch_size = max(event_num // 10, 10)
output_config = f'{{"bootstrap.servers": "{bootstrap_servers}"}}'
run_cmd(
[
"logprep",
"generate",
"kafka",
"--input-dir",
str(gen_input_dir),
"--batch-size",
str(batch_size),
"--events",
str(event_num),
"--output-config",
output_config,
],
env=env,
)
time.sleep(sleep_after_generate_s)
binary = "logprep-ng" if ng == 1 else "logprep"
t_startup = time.time()
logprep_proc = popen_cmd([binary, "run", str(pipeline_config)], env=env)
_current_logprep_proc = logprep_proc
time.sleep(sleep_after_logprep_start_s)
baseline = opensearch_count_processed(opensearch_url, processed_index)
startup_s = time.time() - t_startup
t_run = time.time()
time.sleep(run_seconds)
window_s = time.time() - t_run
kill_hard(logprep_proc)
logprep_proc = None
_current_logprep_proc = None
# ensure near-real-time writes are visible to _count before measuring
opensearch_refresh(opensearch_url, processed_index)
after = opensearch_count_processed(opensearch_url, processed_index)
processed = max(0, after - baseline)
return RunResult(
run_seconds=run_seconds, startup_s=startup_s, window_s=window_s, processed=processed
)
finally:
if logprep_proc is not None:
kill_hard(logprep_proc)
_current_logprep_proc = None
run_cmd(["docker", "compose", "down"], cwd=compose_dir, env=env, ignore_error=True)
# -------------------------
# REPORTING
# -------------------------
def print_runs_table_and_summary(run_results: list[RunResult]) -> None:
"""
Print run table and aggregated throughput statistics.
Args:
run_results: List of benchmark results.
"""
if not run_results:
print("(no runs)")
return
rates = [r.rate for r in run_results]
total_processed = sum(r.processed for r in run_results)
total_runtime = sum(r.window_s for r in run_results)
weighted = total_processed / total_runtime if total_runtime > 0 else 0.0
print("\n=== FINAL BENCHMARK SUMMARY ===")
print(f"runs: {len(run_results)}")
print(f"total runtime: {total_runtime:.3f} s")
print(f"total processed: {total_processed:_}")
print("")
print(f"throughput (weighted): {weighted:,.2f} docs/s")
print(f"throughput (median): {median(rates):,.2f} docs/s")
print(f"throughput (average): {mean(rates):,.2f} docs/s")
print(f"throughput (min/max): {min(rates):,.2f} / {max(rates):,.2f} docs/s")
print(f"throughput (std dev): {stdev(rates) if len(rates) >= 2 else 0.0:,.2f} docs/s")
print("================================")
# -------------------------
# CLI
# -------------------------
def build_arg_parser() -> argparse.ArgumentParser:
"""Create CLI argument parser."""
parser = argparse.ArgumentParser(
description="Run logprep benchmark suite (logprep-ng and non-ng)."
)
parser.add_argument(
"--runs",
type=int,
nargs="+",
default=[30, 30, 30],
help="Measurement window durations in seconds (one value per run).",
)
parser.add_argument(
"--out",
type=Path,
default=None,
help="Optional file path to tee benchmark output into.",
)
parser.add_argument(
"--ng",
type=int,
choices=(0, 1),
default=1,
help="Select implementation: 1 = logprep-ng, 0 = logprep.",
)
parser.add_argument(
"--event-num",
type=int,
default=50_000,
help="Number of events generated per run.",
)
parser.add_argument(
"--prometheus-multiproc-dir",
type=str,
default="/tmp/logprep",
help="PROMETHEUS_MULTIPROC_DIR used for metrics.",
)
parser.add_argument(
"--compose-dir",
type=Path,
default=Path("examples/compose"),
help="Directory containing the docker-compose project.",
)
parser.add_argument(
"--bootstrap-servers",
type=str,
default="127.0.0.1:9092",
help="Kafka bootstrap.servers value for event generation.",
)
parser.add_argument(
"--sleep-after-compose-up-s",
type=int,
default=30,
help="Seconds to wait after docker compose up before proceeding.",
)
parser.add_argument(
"--sleep-after-generate-s",
type=int,
default=2,
help="Seconds to wait after event generation completes.",
)
parser.add_argument(
"--sleep-after-logprep-start-s",
type=int,
default=5,
help="Warmup time in seconds before measurement window starts.",
)
parser.add_argument(
"--opensearch-url",
type=str,
default="http://localhost:9200",
help="Base URL of the OpenSearch instance.",
)
parser.add_argument(
"--processed-index",
type=str,
default="processed",
help="OpenSearch index name used to count processed documents.",
)
parser.add_argument(
"--services",
type=str,
nargs="+",
default=["kafka", "opensearch"],
help="Docker compose services to start (others will be stopped).",
)
parser.add_argument(
"--gen-input-dir",
type=Path,
default=Path("./examples/exampledata/kafka_generate_input_logdata/"),
help="Input directory for logprep generate kafka (shared for ng and non-ng).",
)
return parser
def parse_args() -> argparse.Namespace:
"""Parse and validate CLI arguments."""
parser = build_arg_parser()
args = parser.parse_args()
if any(r <= 0 for r in args.runs):
parser.error("--runs must contain positive integers.")
if not args.services:
parser.error("--services must contain at least one service name.")
return args
def setup_output_tee(out_path: Path | None) -> None:
"""
Redirect stdout into a tee that also writes into a file (if requested).
Args:
out_path: Optional output file path for a copy of stdout.
"""
if out_path is None:
return
out_path.parent.mkdir(parents=True, exist_ok=True)
f = out_path.open("w", encoding="utf-8")
sys.stdout = Tee(sys.stdout, f) # type: ignore[assignment]
# -------------------------
# MAIN
# -------------------------
if __name__ == "__main__":
signal.signal(signal.SIGINT, _handle_sigint)
args_ = parse_args()
setup_output_tee(args_.out)
print_benchmark_config(args_)
pipeline_config_ = resolve_pipeline_config(args_.ng)
results: list[RunResult] = []
benchmark_seconds = args_.runs
for run_idx, seconds in enumerate(benchmark_seconds, start=1):
print(f"----- Run Round {run_idx}: {seconds} seconds -----")
result = benchmark_run(
run_seconds=seconds,
ng=args_.ng,
event_num=args_.event_num,
prometheus_multiproc_dir=args_.prometheus_multiproc_dir,
compose_dir=args_.compose_dir,
pipeline_config=pipeline_config_,
gen_input_dir=args_.gen_input_dir,
bootstrap_servers=args_.bootstrap_servers,
sleep_after_compose_up_s=args_.sleep_after_compose_up_s,
sleep_after_generate_s=args_.sleep_after_generate_s,
sleep_after_logprep_start_s=args_.sleep_after_logprep_start_s,
opensearch_url=args_.opensearch_url,
processed_index=args_.processed_index,
services=args_.services,
)
results.append(result)
print_single_run_result(result, event_num=args_.event_num)
print()
print_runs_table_and_summary(results)