Git Product home page Git Product logo

Comments (1)

jessarcher avatar jessarcher commented on September 5, 2024

Hi @ercsctt,

This is intentional. Buckets hold 1/60th of the window they belong to.

60 is somewhat arbitrary, but there are two reasons we chose it:

  • 60 points looks pretty good on the graphs.
  • For the "leaderboard" cards, we aggregate multiple buckets together to fill as much of the window as possible, and then combine that with raw data from the pulse_entries table to fill in the oldest part of the window where the oldest bucket would fall partially inside and outside the window. This allows us to do rolling window aggregation down to the second. I.e. we can show windows like "the past hour" rather than tumbling windows like "10am - 11am". 60 buckets seems like a good balance that keeps the number of raw entries queried to a minimum without creating too many buckets.
window seconds 1/60th bucket size
1 hour 3,600 60 1 minute
6 hours 21,600 360 6 minutes
24 hours 86,400 1,440 24 minutes
7 days 604,800 10,800 2 hours, 48 minutes

I explained the approach in more detail here: https://www.youtube.com/watch?v=9cliEswA8CA&pp=ygUYbGFyYXZlbCB3b3JsZHdpZGUgbWVldHVw

from pulse.

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.