Code Monkey home page Code Monkey logo

Comments (3)

gaogaotiantian avatar gaogaotiantian commented on June 2, 2024 1

You set trigger_on_change=False and that means do not log attribute changes.

from viztracer.

WangJIanNNN avatar WangJIanNNN commented on June 2, 2024

Ah get it, and it is working now, and other questions:

  1. what does the showing number "25" stand for?
    image

  2. if log_var() could trace the value change? tried like this but from the report b_test stay 100 without change
    b_test = 100
    tracer = get_tracer()
    tracer.log_var("name for the var", b_test)
    while retry !=0 :
    retry -= 1
    b_test += 1
    a.change()
    time.sleep(0.1)

  3. description here is a little bit confusing,
    If your class has a lot of attributes and they are frequently being written to, it is wise to turn off trigger_on_change
    seems that we should use "include_attributes", because "trigger_on_change=False" means nothing for users from report view

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on June 2, 2024
  1. I think it's a legend -> meaning the full scale is 25. However, it's determined by Perfetto and viztracer has little control over it.
  2. log_var() is a single point log, it won't keep track of anything. Consider that as a print.
  3. Yes, if you have a lot of attributes you should turn off trigger_on_change, and manually log() when you want to. include_attributes is what you need if you want to keep the triggering but limit the attributes being logged. It takes an extra check, compared to using trigger_on_change=False.

To be honest, this is a feature that I implemented early and I had to go back to the code to understand the mechanism now :) You might be one of the few people that are using this.

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.