Giter Club home page Giter Club logo

Comments (13)

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024 1

I'll close it when perfetto is fixed. Thanks for submitting the issue, this would be helpful for other people having the same problem!

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024 1

I believe Perfetto fixed this in mainline code. I think it worked in Canary version now, but not Stable. I don't believe they will merge this fix back to Stable because VizTracer is not their priority :( . However, if you really need Perfetto instead of Catapult, you can use Canary version now. I'll leave this issue open until stable version works.

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024 1

This is already fixed in stable prefetto ui.

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024

This is a perfetto bug and I've filed it in google/perfetto#119

from viztracer.

gjoseph92 avatar gjoseph92 commented on July 28, 2024

Thanks! Sorry I didn't see that one. Feel free to close if you'd like (or leave open until the upstream issue is fixed, so others searching can find this?)

from viztracer.

gjoseph92 avatar gjoseph92 commented on July 28, 2024

As a hack, this has been working for me to drop the fractional timestamps and make the traces work around the current Perfetto bug:

$ jq "{traceEvents: [.traceEvents | .[] | (select(.ts) | .ts) |= round ]}" trace.json > trace-rounded.json
$ vizviewer trace-rounded.json

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024

BTW is there a reason that you prefer perfetto to catapult? VizTracer is in a transition phase so I would love to know how people think about those visualization tools

from viztracer.

gjoseph92 avatar gjoseph92 commented on July 28, 2024

Perfetto seems faster on large traces. Plus, it's a lot easier to navigate the UI (scrolling does what you expect, pinch-to-zoom works) compared to the switch-mouse-modes of catapult. Also the SQL integration could theoretically be useful?

Personally I actually like https://www.speedscope.app/ far more: the left-heavy view + aggregate statistics when you click on each trace are great for quickly making sense of a profile. (The main downside is not being able to show multiple threads/processes at once.) In theory speedscope should support Chrome-style traces out of the box, but it hangs/crashes whenever I try to use a VizTracer profile, and I haven't looked into it much.

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024

Okay Perfetto is definitely faster on large traces, and that is actually the reason I started considering to move to it. I don't think speedscope is designed for large trace. I can load light VizTracer trace with it. Maybe it just runs out of memory on large traces. I don't think it was optimized as much as Perfetto to handle GB level traces. I think, from Perfetto developers, Perfetto is working on FlameGraphs from trace, which I guess is pretty much the same thing as "left-heavy view".

As for VizTracer, multi-process and multi-thread visualization is a very very important, if not the most important feature. There are plenty of profilers in the market, but few solves concurrency problems as VizTracer does. So I guess for now, I probably won't use speedscope as an official front-end :)

Well let's hope Perfetto could fix the floating point issue soon to save you a step to visualize traces :)

from viztracer.

gjoseph92 avatar gjoseph92 commented on July 28, 2024

Totally agreed that concurrency visualization is the key feature, so using a frontend that supports that well makes more sense.

FWIW Speedscope has handled ~600MB traces for me with great performance, so I do think it could handle it. But I'm seeing something like this (10000 more times) loading a 60MB VizTracer profile, so I think it's a format issue:
Screen Shot 2021-04-07 at 9 52 33 PM
But yes, shouldn't be a priority to get it working (and might be a speedscope issue).

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024

Hmm, I think that's probably a timestamp overlap issue which I tried to solve a couple of versions before. Not sure if it's completely fixed. It could also be the way speedscope handles the data is different than catapult or perfetto.

Anyways, making it work on speedscope is not a high priority now and I'll try to support Perfetto better.

from viztracer.

 avatar commented on July 28, 2024

@gjoseph92 your workaround works fine in most cases. Be aware that events are written on top of each other if they have the same rounded time.
I hope the perfetto developers can fix this issue soon.

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024

@gjoseph92 I wanted to tell you that the negative duration bug is fixed. Also the latest VizTracer comes with a customized local Perfetto that you can simply run by vizviewer result.json. Let me you if you have the chance to try it.

from viztracer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.