Skip to content

Commit 1d8f457

Browse files
Enabled to specify profile frequency and mode on profiler logic (#347)
1 parent 750317f commit 1d8f457

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.8.3"
3+
version = "0.8.4"
44
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
55
authors = ["filipecosta90 <filipecosta.90@gmail.com>","Redis Performance Group <performance@redis.com>"]
66
readme = "README.md"

redisbench_admin/profilers/profilers_local.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
def profilers_stop_if_required(
23-
args,
23+
upload_results_s3,
2424
benchmark_duration_seconds,
2525
collection_summary_str,
2626
dso,
@@ -121,7 +121,7 @@ def profilers_stop_if_required(
121121
profile_artifact,
122122
) in overall_artifacts_map.items():
123123
s3_link = None
124-
if args.upload_results_s3:
124+
if upload_results_s3:
125125
logging.info(
126126
"Uploading results to s3. s3 bucket name: {}. s3 bucket path: {}".format(
127127
s3_bucket_name, s3_bucket_path
@@ -152,6 +152,8 @@ def profilers_start_if_required(
152152
setup_name,
153153
start_time_str,
154154
test_name,
155+
profiler_frequency=99,
156+
profiler_call_graph_mode="fp",
155157
):
156158
profilers_map = {}
157159
profiler_name = None
@@ -197,7 +199,8 @@ def profilers_start_if_required(
197199
profiler_obj.start_profile(
198200
redis_process_pid,
199201
profile_filename,
200-
PROFILE_FREQ,
202+
profiler_frequency,
203+
profiler_call_graph_mode,
201204
)
202205
return profiler_name, profilers_map
203206

redisbench_admin/run_local/run_local.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
import redis
1414

1515
import redisbench_admin.run.metrics
16+
from redisbench_admin.profilers.perf import PERF_CALLGRAPH_MODE
1617
from redisbench_admin.profilers.profilers_schema import (
1718
local_profilers_print_artifacts_table,
1819
)
20+
from redisbench_admin.run.args import PROFILE_FREQ
1921
from redisbench_admin.run.common import (
2022
prepare_benchmark_parameters,
2123
get_start_time_vars,
@@ -279,6 +281,8 @@ def run_local_command_logic(args, project_name, project_version):
279281
setup_name,
280282
start_time_str,
281283
test_name,
284+
PROFILE_FREQ,
285+
PERF_CALLGRAPH_MODE,
282286
)
283287

284288
# run the benchmark
@@ -329,7 +333,7 @@ def run_local_command_logic(args, project_name, project_version):
329333
_,
330334
overall_tabular_data_map,
331335
) = profilers_stop_if_required(
332-
args,
336+
args.upload_results_s3,
333337
benchmark_duration_seconds,
334338
collection_summary_str,
335339
dso,

0 commit comments

Comments
 (0)