Closed amir-viva closed 5 months ago
Did you install viztracer through pip
? Can you do viztracer your_script.py
command in command line? What about python3 -m viztracer your_script.py
? Seems like an incorrect installation. Did you use virtual environment?
I didn't use virtual environment. I install directly in my machine through pip
You should be able to use the command viztracer
in your terminal, otherwise it's an installation issue. If you are using inline tracer and you can somehow use it with python3
, then python3 -m viztracer
should work. In that case, you may be able to use python3 -m viztracer.viewer result.json
.
If you only need the call stack, not the source file with it, you can always use https://ui.perfetto.dev to load your json file.
Thanks for your response. I want another help from you. I just want to trace only , my hand written code. I don't want to trace the whole , lib-package / site-packages.
How to configure it ? I am using inline tracing with context manager
Check out --include_files
and --exclude_files
options. It will introduce extra overhead for profiling though.
I ran the following script:
python3 my_file.py What's in the terminal ?
JSON is generated successfully . When I ran the following command.
vizviewer --once optional.json
But, I got the following error:
zsh: command not found: vizviewer
I am using Ubuntu. And the viztracer installation folder contains:
Sorry , I search for the issue here and there for my problem. And didn't find a solution. So that I created a issue here. Would you please help me anyone?
P.S.: I need this to trace the nested function execution in my FastAPI app.