aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-03-24 09:45:10 +0000
committerChristopher Baines <mail@cbaines.net>2023-03-24 09:51:28 +0000
commitd6ae42f19691267d915cd66174436f33debabec0 (patch)
treebdcac7bd56cb06a2a62631e72564c7a51716cbf3 /sqitch
parent024761d432ff84e197b49846c71ac34f5703df38 (diff)
downloadbuild-coordinator-d6ae42f19691267d915cd66174436f33debabec0.tar
build-coordinator-d6ae42f19691267d915cd66174436f33debabec0.tar.gz
Add processor count to the agent status
This is useful when interpreting the load information.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/pg/deploy/agent_status_add_processor_count.sql7
-rw-r--r--sqitch/pg/revert/agent_status_add_processor_count.sql7
-rw-r--r--sqitch/pg/verify/agent_status_add_processor_count.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/sqlite/deploy/agent_status_add_processor_count.sql15
-rw-r--r--sqitch/sqlite/revert/agent_status_add_processor_count.sql7
-rw-r--r--sqitch/sqlite/verify/agent_status_add_processor_count.sql7
7 files changed, 51 insertions, 0 deletions
diff --git a/sqitch/pg/deploy/agent_status_add_processor_count.sql b/sqitch/pg/deploy/agent_status_add_processor_count.sql
new file mode 100644
index 0000000..558dd89
--- /dev/null
+++ b/sqitch/pg/deploy/agent_status_add_processor_count.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:agent_status_add_processor_count to pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/revert/agent_status_add_processor_count.sql b/sqitch/pg/revert/agent_status_add_processor_count.sql
new file mode 100644
index 0000000..da6e669
--- /dev/null
+++ b/sqitch/pg/revert/agent_status_add_processor_count.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:agent_status_add_processor_count from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/verify/agent_status_add_processor_count.sql b/sqitch/pg/verify/agent_status_add_processor_count.sql
new file mode 100644
index 0000000..bdd3f8e
--- /dev/null
+++ b/sqitch/pg/verify/agent_status_add_processor_count.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:agent_status_add_processor_count on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 6ed7af9..1591710 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -42,3 +42,4 @@ derivation_output_details 2022-07-07T18:12:27Z Chris <chris@felis> # Add derivat
build_counts 2022-10-28T09:36:25Z Chris <chris@felis> # Add builds_counts
build_results_counts 2022-10-28T09:36:35Z Chris <chris@felis> # Add build_results_counts
replace_agent_status 2023-03-22T14:17:35Z Chris <chris@felis> # Replace agent_status
+agent_status_add_processor_count 2023-03-24T09:28:47Z Chris <chris@felis> # Add agent_status.processor_count
diff --git a/sqitch/sqlite/deploy/agent_status_add_processor_count.sql b/sqitch/sqlite/deploy/agent_status_add_processor_count.sql
new file mode 100644
index 0000000..5618809
--- /dev/null
+++ b/sqitch/sqlite/deploy/agent_status_add_processor_count.sql
@@ -0,0 +1,15 @@
+-- Deploy guix-build-coordinator:agent_status_add_processor_count to sqlite
+
+BEGIN;
+
+DROP TABLE agent_status;
+
+CREATE TABLE agent_status (
+ agent_id TEXT PRIMARY KEY ASC REFERENCES agents (id),
+ timestamp DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ status TEXT NOT NULL,
+ load_average_1min INTEGER,
+ processor_count INTEGER
+);
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/agent_status_add_processor_count.sql b/sqitch/sqlite/revert/agent_status_add_processor_count.sql
new file mode 100644
index 0000000..5f94a64
--- /dev/null
+++ b/sqitch/sqlite/revert/agent_status_add_processor_count.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:agent_status_add_processor_count from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/agent_status_add_processor_count.sql b/sqitch/sqlite/verify/agent_status_add_processor_count.sql
new file mode 100644
index 0000000..f478a17
--- /dev/null
+++ b/sqitch/sqlite/verify/agent_status_add_processor_count.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:agent_status_add_processor_count on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;