aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-18 22:11:41 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-18 22:11:41 +0200
commit0ecb0746a602d445f7b67793773cedbe738ab84f (patch)
tree9561d5d48c0f3dc7c58169e4265a5700a5385da6 /test
parenttest: minor refactoring (diff)
downloadcimple-0ecb0746a602d445f7b67793773cedbe738ab84f.tar.gz
cimple-0ecb0746a602d445f7b67793773cedbe738ab84f.zip
flame_graph.sh -> flamegraph.sh
Inspired by flamegraph.pl.
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--test/py/conftest.py12
2 files changed, 7 insertions, 7 deletions
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