From 3019b1807fb2cd5866f87f7ead655ba2f2b26038 Mon Sep 17 00:00:00 2001 From: VAN BOSSUYT Nicolas Date: Mon, 22 Jan 2024 13:17:30 +0100 Subject: [PATCH] Allow overiding profiler rate. --- cutekit/shell.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cutekit/shell.py b/cutekit/shell.py index aff2261..dcdc947 100644 --- a/cutekit/shell.py +++ b/cutekit/shell.py @@ -207,13 +207,15 @@ def debug(cmd: list[str], debugger: str = "lldb", wait: bool = False): raise RuntimeError(f"Unknown debugger {debugger}") -def profile(cmd: list[str]): +def profile(cmd: list[str], rate=1000): mkdir(const.TMP_DIR) perfFile = f"{const.TMP_DIR}/perf.data" try: exec( "perf", "record", + "-F", + str(rate), "-g", "-o", perfFile,