Upload artifacts to the Postgres.ai database
Issue: https://gitlab.com/postgres-ai/ace/-/issues/19
Example: https://gitlab.com/postgres-ai/postgresql-consulting/tests-and-benchmarks/-/jobs/5994834931
Result:
postgres_ai=# select * from experiments order by created_at desc limit 1\gx
-[ RECORD 1 ]--------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
id | 018d37e3-7505-72a7-a49f-6af6fc1cbfd3
created_at | 2024-01-23 19:54:30.021344+00
config | {"id": "25094117", "ref": "experiment-artifacts", "variables": {"MODE": "dedicated", "HAPROXY": "false", "PGBOUNCER": "false", "TEST_RUNS": "{\"test 1\":{\"pre_configs\":[\"work_mem=100MB\"],\"pre_sql\":\"create index if not exists idx_pgbench_accounts_aid on pgbench_accounts(aid)\",\"workload_pgbench\":\"pgbench -h localhost -U postgres -c4 -j4 -nr -P10 -T60 postgres\"},\"test 2\":{\"pre_configs\":[\"work_mem=100MB\"],\"pre_sql\":\"create index if not exists idx_pgbench_accounts_aid on pgbench_accounts(aid)\",\"workload_pgbench\":\"pgbench -h localhost -U postgres -c4 -j4 -nr -P10 -T60 postgres\"}}\n", "SERVER_TYPE": "n2-standard-4", "VOLUME_SIZE": "100", "SERVER_IMAGE": "projects/ubuntu-os-cloud/global/images/family/ubuntu-2204-lts", "SERVERS_COUNT": "1", "SERVER_FSTYPE": "ext4", "PG_STAT_KCACHE": "true", "PGBOUNCER_COUNT": "1", "POSTGRES_VERSION": "16", "SERVER_CLEANUP_TIMEOUT": "600", "CHATS_REQUESTED_MESSAGE_ID": "123456"}}
chats_requested_message_id | 123456
succeeded | t
gitlab_pipeline_url | https://gitlab.com/postgres-ai/postgresql-consulting/tests-and-benchmarks/-/pipelines/1148734477
description_short |
description_long |
result_summary |
vector |
is_public | t
postgres_ai=# select data_text from experiment_artifacts where experiment_id = '018d37e3-7505-72a7-a49f-6af6fc1cbfd3' and run_label = 'test 1' and artifact_type = 'result';
data_text
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[test 1|pre_configs] 2024-01-23 19:51:15 INFO: RUN TEST: "test 1" +
[test 1|pre_configs] 2024-01-23 19:51:15 INFO: Setting "work_mem" configuration with command: ALTER SYSTEM SET work_mem='100MB'; +
[test 1|pre_configs] 2024-01-23 19:51:15 ALTER SYSTEM +
[test 1|pre_configs] 2024-01-23 19:51:15 INFO: Show "work_mem" configuration +
[test 1|pre_configs] 2024-01-23 19:51:15 work_mem +
[test 1|pre_configs] 2024-01-23 19:51:15 ---------- +
[test 1|pre_configs] 2024-01-23 19:51:15 100MB +
[test 1|pre_configs] 2024-01-23 19:51:15 (1 row) +
[test 1|pre_configs] 2024-01-23 19:51:15 +
[test 1|pre_sql] 2024-01-23 19:51:15 INFO: Executing pre_sql with command: create index if not exists idx_pgbench_accounts_aid on pgbench_accounts(aid) +
[test 1|pre_sql] 2024-01-23 19:51:23 CREATE INDEX +
[test 1|workload_pgbench] 2024-01-23 19:51:32 INFO: Executing workload_pgbench with command: pgbench -h localhost -U postgres -c4 -j4 -nr -P10 -T60 postgres +
[test 1|workload_pgbench] 2024-01-23 19:51:32 pgbench (16.1 (Ubuntu 16.1-1.pgdg22.04+1)) +
[test 1|workload_pgbench] 2024-01-23 19:51:42 progress: 10.0 s, 88.6 tps, lat 44.831 ms stddev 17.606, 0 failed +
[test 1|workload_pgbench] 2024-01-23 19:51:52 progress: 20.0 s, 89.8 tps, lat 44.111 ms stddev 17.960, 0 failed +
[test 1|workload_pgbench] 2024-01-23 19:52:02 progress: 30.0 s, 93.2 tps, lat 43.402 ms stddev 22.291, 0 failed +
[test 1|workload_pgbench] 2024-01-23 19:52:12 progress: 40.0 s, 96.9 tps, lat 41.274 ms stddev 19.125, 0 failed +
[test 1|workload_pgbench] 2024-01-23 19:52:22 progress: 50.0 s, 99.3 tps, lat 40.245 ms stddev 22.852, 0 failed +
[test 1|workload_pgbench] 2024-01-23 19:52:32 progress: 60.0 s, 100.6 tps, lat 39.767 ms stddev 20.694, 0 failed +
[test 1|workload_pgbench] 2024-01-23 19:52:32 transaction type: <builtin: TPC-B (sort of)> +
[test 1|workload_pgbench] 2024-01-23 19:52:32 scaling factor: 100 +
[test 1|workload_pgbench] 2024-01-23 19:52:32 query mode: simple +
[test 1|workload_pgbench] 2024-01-23 19:52:32 number of clients: 4 +
[test 1|workload_pgbench] 2024-01-23 19:52:32 number of threads: 4 +
[test 1|workload_pgbench] 2024-01-23 19:52:32 maximum number of tries: 1 +
[test 1|workload_pgbench] 2024-01-23 19:52:32 duration: 60 s +
[test 1|workload_pgbench] 2024-01-23 19:52:32 number of transactions actually processed: 5688 +
[test 1|workload_pgbench] 2024-01-23 19:52:32 number of failed transactions: 0 (0.000%) +
[test 1|workload_pgbench] 2024-01-23 19:52:32 latency average = 42.181 ms +
[test 1|workload_pgbench] 2024-01-23 19:52:32 latency stddev = 20.345 ms +
[test 1|workload_pgbench] 2024-01-23 19:52:32 initial connection time = 34.899 ms +
[test 1|workload_pgbench] 2024-01-23 19:52:32 tps = 94.807300 (without initial connection time) +
[test 1|workload_pgbench] 2024-01-23 19:52:32 statement latencies in milliseconds and failures: +
[test 1|workload_pgbench] 2024-01-23 19:52:32 0.002 0 \set aid random(1, 100000 * :scale) +
[test 1|workload_pgbench] 2024-01-23 19:52:32 0.001 0 \set bid random(1, 1 * :scale) +
[test 1|workload_pgbench] 2024-01-23 19:52:32 0.001 0 \set tid random(1, 10 * :scale) +
[test 1|workload_pgbench] 2024-01-23 19:52:32 0.000 0 \set delta random(-5000, 5000) +
[test 1|workload_pgbench] 2024-01-23 19:52:32 0.076 0 BEGIN; +
[test 1|workload_pgbench] 2024-01-23 19:52:32 33.554 0 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid; +
[test 1|workload_pgbench] 2024-01-23 19:52:32 0.164 0 SELECT abalance FROM pgbench_accounts WHERE aid = :aid; +
[test 1|workload_pgbench] 2024-01-23 19:52:32 0.163 0 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid; +
[test 1|workload_pgbench] 2024-01-23 19:52:32 0.142 0 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid; +
[test 1|workload_pgbench] 2024-01-23 19:52:32 0.100 0 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);+
[test 1|workload_pgbench] 2024-01-23 19:52:32 7.997 0 END; +
(1 row)
postgres_ai=# select count(*) from experiment_artifacts where experiment_id = '018d37e3-7505-72a7-a49f-6af6fc1cbfd3';
count
-------
142
(1 row)
Edited by Vitaliy Kukharik