Giter Club home page Giter Club logo

Comments (7)

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024 1

The article is posted and well-received. I'll close this issue.

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024

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.

maartenbreddels avatar maartenbreddels commented on July 28, 2024

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.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024

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 from chrome://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.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024

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.

gaogaotiantian avatar gaogaotiantian commented on July 28, 2024

Do you think the new option ignore_frozen is working for you that this issue could be closed?

from viztracer.

maartenbreddels avatar maartenbreddels commented on July 28, 2024

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.