From 0ecb0746a602d445f7b67793773cedbe738ab84f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 18 Jul 2023 22:11:41 +0200 Subject: flame_graph.sh -> flamegraph.sh Inspired by flamegraph.pl. --- test/CMakeLists.txt | 2 +- test/py/conftest.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 74ade1a..f9f53e6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -36,5 +36,5 @@ endif() add_python_tests(python_tests_perf Python3::Interpreter -m pytest ${python_test_args} -m "flame_graph" - --flame-graph-binary "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/flame_graph.sh" + --flamegraph-binary "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/flamegraph.sh" --flame-graphs-dir "${FLAME_GRAPHS_DIR}") diff --git a/test/py/conftest.py b/test/py/conftest.py index 274c419..748b5e5 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -53,13 +53,13 @@ PARAM_VERSION = Param('project_version', 'project version') PARAM_VALGRIND = ParamBinary('valgrind', required=False) -PARAM_FLAME_GRAPH = ParamBinary('flame_graph', required=False) +PARAM_FLAMEGRAPH = ParamBinary('flamegraph', required=False) PARAM_FLAME_GRAPHS_DIR = Param('flame_graphs_dir', 'directory to store flame graphs', required=False) PARAMS = list(BINARY_PARAMS) PARAMS += [ PARAM_VALGRIND, - PARAM_FLAME_GRAPH, + PARAM_FLAMEGRAPH, PARAM_FLAME_GRAPHS_DIR, PARAM_VERSION, ] @@ -199,7 +199,7 @@ def repo_path(tmp_path): @fixture -def flame_graph_path(pytestconfig, tmp_path): +def flame_graph_svg(pytestconfig, tmp_path): dir = pytestconfig.getoption(PARAM_FLAME_GRAPHS_DIR.codename) if dir is None: return os.path.join(tmp_path, 'flame_graph.svg') @@ -208,14 +208,14 @@ def flame_graph_path(pytestconfig, tmp_path): @fixture -def profiler(pytestconfig, server, workers, flame_graph_path): - script = pytestconfig.getoption(PARAM_FLAME_GRAPH.codename) +def profiler(pytestconfig, server, workers, flame_graph_svg): + script = pytestconfig.getoption(PARAM_FLAMEGRAPH.codename) if script is None: yield return pids = [server.pid] + [worker.pid for worker in workers] pids = map(str, pids) - cmd_line = CmdLine(script, flame_graph_path, *pids) + cmd_line = CmdLine(script, flame_graph_svg, *pids) with cmd_line.run_async() as proc: yield assert proc.returncode == 0 -- cgit v1.2.3