uber / nanoscope

An extremely accurate Android method tracing tool.
Apache License 2.0
1.25k stars 68 forks source link

Nanoscope crashes when generating graph #64

Closed ngmattng closed 5 years ago

ngmattng commented 6 years ago

image

I was recently testing my application with nanoscope (I clicked from home screen, to Activity B then back to home screen). I ended my nanoscope session to generate the graph but it seems to just crash (the browser opens, trying to load then it closes). This happens for Firefox and Chrome both. Are the number of events just too large?

Leland-Takamine commented 6 years ago

Are the number of events just too large?

That was my guess. Unfortunately, we can't really put a hard limit on how much data we should attempt to visualize since the limitation would vary from browser to browser and machine to machine. When this happens I'd just suggest tracing a smaller period of time.

In seconds, how long was this trace?

ngmattng commented 6 years ago

Thank you for the reply, i'll try to keep my periods shorter!

In seconds, how long was this trace? It was about 4-5 seconds max.

As a side question, I was hoping to use Nanoscope to test what was causing a long startup/load time for my splash screen, would it work for my particular use-case? I saw in the documentation that I should make a point to leave the application open as Nanoscope flushes the events, I don't suppose that it wouldn't be able to track the events if I were to start Nanoscope-> start my application->end Nanoscope.

Leland-Takamine commented 6 years ago

That's possible using the --package option. You can tell Nanoscope to start tracing a specific package by running:

nanoscope start --package=<packagename>

If the app hasn't started yet, the trace will begin as soon as the process starts up.