Comments (7)
The article is posted and well-received. I'll close this issue.
from viztracer.
So, I don't believe python -m package.module
and python package/module.py
are equivalent under the rug. The former requires more searching(the noise you are mentioning).
VizTracer shows what really happened, rather than what seemed to happen, so personally I won't call it "noise".
There are easy ways to filter it out though, just add --ignore_non_file
and all the import stuff will be ignored.
Actually, if you time the two methods, you may find that they spend different time to execute.
from viztracer.
There are easy ways to filter it out though, just add
--ignore_non_file
and all the import stuff will be ignored.
That seems to filter out too much.
What I'm now doing with 'giltracer', is to assume the module has a main(argv)
function, and call that, generating a >50MB HTML for me isn't really a workable solution because I generate them remotely.
Another thing I've done is to include an --import='numpy,pandas,whatever'
argument, so get rid of some noise, maybe you can support that as well?
from viztracer.
Oh, the --ignore_non_file
filtering out everything is a bug. I'll fix it soon. It won't work with -m
now.
pre-import libraries to reduce the number of entries seems sketchy to me. This problem should be fixed with --ignore_non_file
as long as I fixed the bug(and maybe renaming it to ignore_import
).
For now, there are a couple of options that you can try.
- Since you always need the latter part of the program, you could try to limit the buffer size to a number that's workable for remote.
viztracer --tracer_entries 1000
maybe? - If file size is critical to you, try the
gz
file?viztracer -o report.gz
. You can load it directly fromchrome://tracing
. (Of course, without the source code because that's the hack I had for the html) - To make it even more delicate, you can actually implement your own filter plugin. However if you only need to get rid of the import part, this seems like an overreach.
Anyway, I'll try to fix the bug in 24 hours and hopefully it will work for you.
from viztracer.
I fixed the issue and renamed the --ignore_non_file
to --ignore_frozen
. This is released with 0.11.1. So you could try updating your viztracer to the latest and run with --ignore_frozen
to filter out the import stuff.
from viztracer.
Do you think the new option ignore_frozen
is working for you that this issue could be closed?
from viztracer.
from viztracer.
Related Issues (20)
- 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
- [optimize] always add quotes when printing file path HOT 2
- Is it possible to record the function in which tracer is stopped? 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.