ocurrent / ocaml-ci

A CI for OCaml projects
https://ocaml.ci.dev
112 stars 74 forks source link

Add metrics for per-variant states #898

Closed benmandrew closed 2 months ago

benmandrew commented 10 months ago

This metric makes a DB query on every scrape, I don't know whether this will be too expensive.

Screenshot 2023-10-23 at 18 01 54
benmandrew commented 9 months ago

Even after optimisation of the initial DB query it is still too expensive due to the size of the database — it did not finish in 30 minutes in production. This might be able to be ameliorated by removing stale data from the cache OCurrent table and the ci_build_index table.

tmcgilchrist commented 9 months ago

I think it is reasonable to prune the size of the database to bring it down to a more reasonable size. Something along the lines of last 6 months and the last n builds for branches.

Even with that I expect this query to continue to be too expensive. Having it as a debug tool for adhoc use would be helpful.

On Tue, 12 Dec 2023 at 10:01 pm, Ben Andrew @.***> wrote:

Even after optimisation of the initial DB query it is still too expensive due to the size of the database — it did not finish in 30 minutes in production. This might be able to be ameliorated by removing stale data from the cache OCurrent table and the ci_build_index table.

— Reply to this email directly, view it on GitHub https://github.com/ocurrent/ocaml-ci/pull/898#issuecomment-1851814487, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJXOIHBO3H2KVU7YSAVUDYJA2SFAVCNFSM6AAAAAA6MKD7S6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJRHAYTINBYG4 . You are receiving this because your review was requested.Message ID: @.***>