diff --git a/notifier/spec/fixtures/migration-testing/v4/expected-comment.txt b/notifier/spec/fixtures/migration-testing/v4/expected-comment.txt index fede097fd497c174901e3c23b152cd067de4fae5..51bd9aee88f00489c41e11dd2fcb483c2aec2d0a 100644 --- a/notifier/spec/fixtures/migration-testing/v4/expected-comment.txt +++ b/notifier/spec/fixtures/migration-testing/v4/expected-comment.txt @@ -41,11 +41,11 @@ Migrations included in this change have been executed on gitlab.com data for tes * Duration: 2.2 s * Database size change: +24.00 KiB -| Query | Calls | Total Time | Max Time | Mean Time | Rows | -| ----- | ----- | ---------- | -------- | --------- | ---- | -|
CREATE TABLE "test_tables" ("id" bigserial primary key, "stars" bigint DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "title" text, "notes" text) /*application:test,db_config_name:main,line:/lib/gitlab/database/migration_helpers.rb:100:in `block in create_table_with_constraints'*/
| 1 | 192.8 ms | 192.8 ms | 192.8 ms | 0 | -|
ALTER TABLE "test_tables" ADD CONSTRAINT "check_0770ba173a" CHECK (char_length("title") <= 128), ADD CONSTRAINT "check_9cfc473dbc" CHECK (char_length("notes") <= 1024) /*application:test,db_config_name:main,line:/lib/gitlab/database/migration_helpers.rb:128:in `block in create_table_with_constraints'*/
| 1 | 6.6 ms | 6.6 ms | 6.6 ms | 0 | -|
SELECT $1::regtype::oid
| 1 | 0.0 ms | 0.0 ms | 0.0 ms | 1 | +| Calls | Total Time | Max Time | Mean Time | Rows | Query | +| ----- | ---------- | -------- | --------- | ---- | ----- | +| 1 | 192.8 ms | 192.8 ms | 192.8 ms | 0 |
CREATE TABLE "test_tables" ("id" bigserial primary key, "stars" bigint DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "title" text, "notes" text) /*application:test,db_config_name:main,line:/lib/gitlab/database/migration_helpers.rb:100:in `block in create_table_with_constraints'*/
| +| 1 | 6.6 ms | 6.6 ms | 6.6 ms | 0 |
ALTER TABLE "test_tables" ADD CONSTRAINT "check_0770ba173a" CHECK (char_length("title") <= 128), ADD CONSTRAINT "check_9cfc473dbc" CHECK (char_length("notes") <= 1024) /*application:test,db_config_name:main,line:/lib/gitlab/database/migration_helpers.rb:128:in `block in create_table_with_constraints'*/
| +| 1 | 0.0 ms | 0.0 ms | 0.0 ms | 1 |
SELECT $1::regtype::oid
|
Histogram for CreateTestTable @@ -68,9 +68,9 @@ Migrations included in this change have been executed on gitlab.com data for tes * Duration: 6.5 s * Database size change: +0.00 B -| Query | Calls | Total Time | Max Time | Mean Time | Rows | -| ----- | ----- | ---------- | -------- | --------- | ---- | -|
SELECT pg_sleep($1)
| 1 | 5005.1 ms | 5005.1 ms | 5005.1 ms | 1 | +| Calls | Total Time | Max Time | Mean Time | Rows | Query | +| ----- | ---------- | -------- | --------- | ---- | ----- | +| 1 | 5005.1 ms | 5005.1 ms | 5005.1 ms | 1 |
SELECT pg_sleep($1)
|
Histogram for RegularMigrationWithFiveSecondQuery @@ -120,9 +120,9 @@ Migrations included in this change have been executed on gitlab.com data for tes * Duration: 1.3 s * Database size change: -24.00 KiB -| Query | Calls | Total Time | Max Time | Mean Time | Rows | -| ----- | ----- | ---------- | -------- | --------- | ---- | -|
DROP TABLE "test_tables" /*application:test,db_config_name:main,line:/db/post_migrate/20210604232017_drop_test_table.rb:5:in `change'*/
| 1 | 2.6 ms | 2.6 ms | 2.6 ms | 0 | +| Calls | Total Time | Max Time | Mean Time | Rows | Query | +| ----- | ---------- | -------- | --------- | ---- | ----- | +| 1 | 2.6 ms | 2.6 ms | 2.6 ms | 0 |
DROP TABLE "test_tables" /*application:test,db_config_name:main,line:/db/post_migrate/20210604232017_drop_test_table.rb:5:in `change'*/
|
Histogram for DropTestTable @@ -236,11 +236,11 @@ Migrations included in this change have been executed on gitlab.com data for tes * Duration: 1.9 s * Database size change: +24.00 KiB -| Query | Calls | Total Time | Max Time | Mean Time | Rows | -| ----- | ----- | ---------- | -------- | --------- | ---- | -|
CREATE TABLE "test_tables" ("id" bigserial primary key, "stars" bigint DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "title" text, "notes" text) /*application:test,db_config_name:ci,line:/lib/gitlab/database/migration_helpers.rb:100:in `block in create_table_with_constraints'*/
| 1 | 122.9 ms | 122.9 ms | 122.9 ms | 0 | -|
ALTER TABLE "test_tables" ADD CONSTRAINT "check_0770ba173a" CHECK (char_length("title") <= 128), ADD CONSTRAINT "check_9cfc473dbc" CHECK (char_length("notes") <= 1024) /*application:test,db_config_name:ci,line:/lib/gitlab/database/migration_helpers.rb:128:in `block in create_table_with_constraints'*/
| 1 | 8.3 ms | 8.3 ms | 8.3 ms | 0 | -|
SELECT $1::regtype::oid
| 1 | 0.0 ms | 0.0 ms | 0.0 ms | 1 | +| Calls | Total Time | Max Time | Mean Time | Rows | Query | +| ----- | ---------- | -------- | --------- | ---- | ----- | +| 1 | 122.9 ms | 122.9 ms | 122.9 ms | 0 |
CREATE TABLE "test_tables" ("id" bigserial primary key, "stars" bigint DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL, "title" text, "notes" text) /*application:test,db_config_name:ci,line:/lib/gitlab/database/migration_helpers.rb:100:in `block in create_table_with_constraints'*/
| +| 1 | 8.3 ms | 8.3 ms | 8.3 ms | 0 |
ALTER TABLE "test_tables" ADD CONSTRAINT "check_0770ba173a" CHECK (char_length("title") <= 128), ADD CONSTRAINT "check_9cfc473dbc" CHECK (char_length("notes") <= 1024) /*application:test,db_config_name:ci,line:/lib/gitlab/database/migration_helpers.rb:128:in `block in create_table_with_constraints'*/
| +| 1 | 0.0 ms | 0.0 ms | 0.0 ms | 1 |
SELECT $1::regtype::oid
|
Histogram for CreateTestTable @@ -263,9 +263,9 @@ Migrations included in this change have been executed on gitlab.com data for tes * Duration: 6.2 s * Database size change: +0.00 B -| Query | Calls | Total Time | Max Time | Mean Time | Rows | -| ----- | ----- | ---------- | -------- | --------- | ---- | -|
SELECT pg_sleep($1)
| 1 | 5005.1 ms | 5005.1 ms | 5005.1 ms | 1 | +| Calls | Total Time | Max Time | Mean Time | Rows | Query | +| ----- | ---------- | -------- | --------- | ---- | ----- | +| 1 | 5005.1 ms | 5005.1 ms | 5005.1 ms | 1 |
SELECT pg_sleep($1)
|
Histogram for RegularMigrationWithFiveSecondQuery @@ -315,9 +315,9 @@ Migrations included in this change have been executed on gitlab.com data for tes * Duration: 1.4 s * Database size change: -24.00 KiB -| Query | Calls | Total Time | Max Time | Mean Time | Rows | -| ----- | ----- | ---------- | -------- | --------- | ---- | -|
DROP TABLE "test_tables" /*application:test,db_config_name:ci,line:/db/post_migrate/20210604232017_drop_test_table.rb:5:in `change'*/
| 1 | 6.8 ms | 6.8 ms | 6.8 ms | 0 | +| Calls | Total Time | Max Time | Mean Time | Rows | Query | +| ----- | ---------- | -------- | --------- | ---- | ----- | +| 1 | 6.8 ms | 6.8 ms | 6.8 ms | 0 |
DROP TABLE "test_tables" /*application:test,db_config_name:ci,line:/db/post_migrate/20210604232017_drop_test_table.rb:5:in `change'*/
|
Histogram for DropTestTable diff --git a/notifier/templates/pgss_table.erb b/notifier/templates/pgss_table.erb index 2118af4624c53f1002111f142d2a65e8d88b6802..20d7e0a683743d31adfa546c7e96358659d1d94b 100644 --- a/notifier/templates/pgss_table.erb +++ b/notifier/templates/pgss_table.erb @@ -1,8 +1,8 @@ % pgss_rows = pgss.reject(&:excluded?) % unless pgss_rows.empty? -| Query | Calls | Total Time | Max Time | Mean Time | Rows | -| ----- | ----- | ---------- | -------- | --------- | ---- | +| Calls | Total Time | Max Time | Mean Time | Rows | Query | +| ----- | ---------- | -------- | --------- | ---- | ----- | % pgss_rows.each do |query| -|
<%= query.formatted_query %>
| <%= format_int(query.calls) %> | <%= format_time(query.total_time) %> | <%= format_time(query.max_time) %> | <%= format_time(query.mean_time) %> | <%= format_int(query.rows) %> | +| <%= format_int(query.calls) %> | <%= format_time(query.total_time) %> | <%= format_time(query.max_time) %> | <%= format_time(query.mean_time) %> | <%= format_int(query.rows) %> |
<%= query.formatted_query %>
| % end % end