guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Skip some metrics that apply for each branch


From: Christopher Baines
Subject: branch master updated: Skip some metrics that apply for each branch
Date: Thu, 02 Feb 2023 09:06:52 -0500

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new 9e9fc1b  Skip some metrics that apply for each branch
9e9fc1b is described below

commit 9e9fc1ba04add1ceea28e1889058049cf564f2f1
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Thu Feb 2 15:04:20 2023 +0100

    Skip some metrics that apply for each branch
    
    As data.qa.guix.gnu.org has lots of branches and 100,000+ metrics, and this 
is
    causing Prometheus to time out fetching the metrics.
    
    I'm not sure there's much value in these metrics, so cut them out for now.
---
 guix-data-service/metrics.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/guix-data-service/metrics.scm b/guix-data-service/metrics.scm
index 7ec6b8e..ca1d97a 100644
--- a/guix-data-service/metrics.scm
+++ b/guix-data-service/metrics.scm
@@ -96,7 +96,8 @@ SELECT relname, seq_scan, seq_tup_read,
        COALESCE(extract(epoch from last_analyze), 0),
        COALESCE(extract(epoch from last_autoanalyze), 0),
        vacuum_count, autovacuum_count, analyze_count, autoanalyze_count
- FROM pg_stat_user_tables")
+FROM pg_stat_user_tables
+WHERE relname NOT LIKE 
'package_derivations_by_guix_revision_range_git_branch_%'")
 
   (map (match-lambda
          ((relname seq-scan seq-tup-read
@@ -141,7 +142,8 @@ FROM pg_stat_user_indexes
 LEFT JOIN pg_indexes
   ON pg_stat_user_indexes.indexrelname = pg_indexes.indexname
  AND pg_stat_user_indexes.schemaname = pg_indexes.schemaname
-WHERE pg_stat_user_indexes.schemaname = 'guix_data_service'")
+WHERE pg_stat_user_indexes.schemaname = 'guix_data_service'
+  AND pg_indexes.tablename NOT LIKE 
'package_derivations_by_guix_revision_range_git_branch_%'")
 
   (map
    (match-lambda
@@ -162,7 +164,8 @@ WHERE pg_stat_user_indexes.schemaname = 
'guix_data_service'")
     "
 SELECT tablename, attname, null_frac, n_distinct, correlation
 FROM pg_stats
-WHERE schemaname = 'guix_data_service'")
+WHERE schemaname = 'guix_data_service'
+  AND tablename NOT LIKE 
'package_derivations_by_guix_revision_range_git_branch_%'")
 
   (map
    (match-lambda



reply via email to

[Prev in Thread] Current Thread [Next in Thread]