Skip to content

StatusHistory

Henne Vogelsang edited this page Nov 6, 2020 · 3 revisions

We have charts in both pages, which both come from StatusHistory

StatusHistories are created every 30 seconds, getting the information from backend via Backend::Api::BuildResults::Worker.status, as described here. We delete every day StatusHistory that are older than 1 year.

After that, We down-sample the StatusHistory using the following rules:

In comparison with the newest created record (The decision of the time frame is not a diff from Time.now, but a diff from the newest created StatusHistory time, using StatusHistory.maximum(:time) - time_offset):

  1. Records older than a month, re-scale the data in 12 hours slots
  2. Records older than 7 days, re-scale the data in 6 hours slots
  3. Records older than 1 day, re-scale the data in 1 hour slots
  4. Records older than 2 hours, re-scale the data in 4 minutes slots
  5. Records newer than 2 hours, stay untouched.
Clone this wiki locally