Skip to content
\n

If I put the @log_sparse decorator above the main function, I do not see the processes from the pool of processes that have been created.

\n

\"image\"

\n

On the contrary, if I put the log_sparse decorator on top of my_function, I do not see what the main process is doing and what happens in between the call of that function and this is what would be really interesting to me!

\n

\"image\"

\n

I launch the profiling from the CLI with:

\n
viztracer --pid_suffix --output_dir ./outputDir --log_sparse test.py\n
\n

What am I missing?

\n

Thanks in advance for your help :)

","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

First of all, if you want to understand your program, you probably should not use log_sparse. That's for cases where you are only interested in the time spent on a specific function. log_sparse by default does not log children functions. So if you put that to main(), it'll only log main(), not any other function calls. That's what sparse means.

\n

As for the UI, it's perfetto so you can check their docs out. I believe all the colors correspond to some CPU usage. The black bar is probably the number function calls starting at that time period. The green one on the process is normally the frequency of function calls as well. Because you only have too few calls, they might not quite make sense. They will be if your trace file is more comprehensive.

","upvoteCount":1,"url":"https://github.com/gaogaotiantian/viztracer/discussions/407#discussioncomment-8547752"}}}

Cannot get the main process in vizviewer #407

Answered by gaogaotiantian
MarcoMagl asked this question in Q&A
Discussion options

You must be logged in to vote

First of all, if you want to understand your program, you probably should not use log_sparse. That's for cases where you are only interested in the time spent on a specific function. log_sparse by default does not log children functions. So if you put that to main(), it'll only log main(), not any other function calls. That's what sparse means.

As for the UI, it's perfetto so you can check their docs out. I believe all the colors correspond to some CPU usage. The black bar is probably the number function calls starting at that time period. The green one on the process is normally the frequency of function calls as well. Because you only have too few calls, they might not quite make sense.…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MarcoMagl
Comment options

Answer selected by MarcoMagl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants