Skip to content

Commit

Permalink
[Benchmark test] Support enabling telemetry device 'segment-replicati…
Browse files Browse the repository at this point in the history
…on-stats' to collect Segment Replication statistic (opensearch-project#3868)

Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
  • Loading branch information
Tianli Feng authored Aug 16, 2023
1 parent 4c75ee7 commit d857101
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 123 deletions.
76 changes: 38 additions & 38 deletions jenkins/opensearch/benchmark-test.jenkinsfile

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions src/test_workflow/benchmark_test/benchmark_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class BenchmarkArgs:
benchmark_config: IO
user_tag: str
target_hosts: str
capture_node_stat: bool
telemetry: list
logging_level: int

def __init__(self) -> None:
Expand Down Expand Up @@ -92,8 +92,11 @@ def __init__(self) -> None:
parser.add_argument("--workload-params", dest="workload_params",
help="With this parameter you can inject variables into workloads. Parameters differs "
"for each workload type. e.g., --workload-params \"number_of_replicas:1,number_of_shards:5\"")
parser.add_argument("--capture-node-stat", dest="capture_node_stat", action="store_true",
parser.add_argument("--capture-node-stat", dest="telemetry", action="append_const", const="node-stats",
help="Enable opensearch-benchmark to capture node stat metrics such as cpu, mem, jvm etc as well.")
parser.add_argument("--capture-segment-replication-stat", dest="telemetry", action="append_const",
const="segment-replication-stats",
help="Enable opensearch-benchmark to segment_replication stat metrics such as replication lag.")
parser.add_argument("-v", "--verbose", help="Show more verbose output.", action="store_const", default=logging.INFO,
const=logging.DEBUG, dest="logging_level")

Expand Down Expand Up @@ -122,5 +125,5 @@ def __init__(self) -> None:
self.user_tag = args.user_tag if args.user_tag else None
self.additional_config = json.dumps(args.additional_config) if args.additional_config is not None else None
self.use_50_percent_heap = args.use_50_percent_heap
self.capture_node_stat = args.capture_node_stat
self.telemetry = args.telemetry
self.logging_level = args.logging_level
6 changes: 4 additions & 2 deletions src/test_workflow/benchmark_test/benchmark_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ def __init__(
user_tag = f"--user-tag=\"{args.user_tag}\""
self.command += f" {user_tag}"

if args.capture_node_stat:
self.command += " --telemetry node-stats"
if args.telemetry:
self.command += " --telemetry "
for value in args.telemetry:
self.command += f"{value},"

def execute(self) -> None:
if self.security:
Expand Down
Loading

0 comments on commit d857101

Please sign in to comment.