Giter VIP home page Giter VIP logo

Comments (3)

sqshq avatar sqshq commented on May 18, 2024

A trigger condition was intended to be examined right after the particular value update. The values for all labels are updated independently, so the trigger conditions are independent as well. I don't think there is a good way to implement what you are asking in a backward-compatible way and not sure if it is a popular use case. But since triggers execute an arbitrary script, you can always save the most recent value for each label as an env variable, for example.

from sampler.

 avatar commented on May 18, 2024

I see. Well, since min and max are both sampled, too, there is no direct way to calculate a percentage: cur.$lastknownsample * 100 / max.$lastknownsample; or the distance from the mean value: (max.$lastknownsample+min.$lastknownsample)/2 - cur.$lastknownsample.

Of course, rate-ms introduces a time offset between the sampled values, but I am thinking more about stuff that changes slowly, like file system space (quota changes; backup drives of different sizes swapped, and always mounted to the same mount point, etc.).

My suggestion would be a convenient naming for the dot notation that I have used in the above, like "cur.$last", or so.

from sampler.

sqshq avatar sqshq commented on May 18, 2024

Thank you, I like the suggestion for the dot notation. Will consider to implement that.

from sampler.

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.