From 4a003c62f310e691751039f98b893dceadd60710 Mon Sep 17 00:00:00 2001 From: Behnam Robatmili Date: Wed, 25 Oct 2023 11:05:52 -0700 Subject: [PATCH] Minor fixes to profiler --- profiler/profiler.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/profiler/profiler.py b/profiler/profiler.py index 15d14654bd..8e3ff3c749 100644 --- a/profiler/profiler.py +++ b/profiler/profiler.py @@ -13,8 +13,8 @@ import tiledbsoma -from .context_generator import host_context -from .data import FileBasedProfileDB, ProfileData, ProfileDB +from context_generator import host_context +from data import FileBasedProfileDB, ProfileData, ProfileDB GNU_TIME_FORMAT = ( 'Command being timed: "%C"\n' @@ -149,6 +149,7 @@ def main(): required=False, help="The flamegraph output produced by prof2", ) + args = parser.parse_args(sys.argv[1:]) print(f"Command to be run: {args.command}", file=stderr) @@ -159,7 +160,6 @@ def main(): stderr=PIPE, ) - print(f"Running command to be profiled, PID = {p.pid}", file=stderr) # Running additional profilers to extract flame graphs for the run p1 = None p2 = None @@ -206,3 +206,6 @@ def main(): f"{data.command_key=}, {data.command=}, {data.exit_status=}, {db_record_file=}", file=stderr, ) + +if __name__ == "__main__": + main() \ No newline at end of file