Comments (13)
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.
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.
This is already fixed in stable prefetto ui.
from viztracer.
This is a perfetto bug and I've filed it in google/perfetto#119
from viztracer.
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.
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.
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.
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.
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.
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:
But yes, shouldn't be a priority to get it working (and might be a speedscope issue).
from viztracer.
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.
@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.
@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)
- 可以将在生成文件时自动获取.py的文件名或是加上时间戳么? HOT 5
- Something wrong with inline joblib.Parallel HOT 1
- Report Builder Bug HOT 1
- NameError: name 'false' is not defined. Did you mean: 'False'? HOT 1
- 0.16.2: pytest fails in 8 units HOT 10
- 0.16.2: sphinx warnings `reference target not found` HOT 3
- VizTracer 能否可视化python 模块和类之间的调用关系,在分析不熟悉的项目时很有用? 类似于开源库pyan(已经停止维护了) HOT 2
- 可以为VS Code插件 在"设置"中提供 "默认运行参数" 的修改么? HOT 1
- AttributeError: Can't get attribute 'Bar' on <module '__main__' from 'miniconda3/envs/3.12.0/bin/viztracer'>
- Uncaught compile error when attempting to view traces using vizviewer HOT 3
- 请问,使用vizviewer时,如何指定监听的IP和port? HOT 1
- use `https://ui.perfetto.dev` instead of vendored html. HOT 4
- jupyter integration not working properly on remote jupyter lab HOT 2
- Test failed on Arch Linux against Python 3.12 HOT 6
- asyncio.create_subprocess_shell().communicate() hangs HOT 6
- 无法绑定ip及jupyter中无法更改端口号 HOT 1
- Gives warning: "Found and ignore invalid json file, you may lost some process data." HOT 3
- doesn't pick up existing threads at launch HOT 4
- VizTracer not tracing some functions HOT 1
- Build wheels for free-threading version HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viztracer.