Skip to content

Adds CI Platform Metrics bookkeeping model

Amy Troschinetz requested to merge ci-platform-metrics into master

What does this MR do?

Issue: #217707 (closed)

Adds a new table for storing CI platform metrics which can be consumed by periscope.

Up:

± bin/rake db:migrate:up VERSION=20200820204041
== 20200820204041 CreateCiPlatformMetrics: migrating ==========================
-- table_exists?(:ci_platform_metrics)
   -> 0.0006s
-- create_table(:ci_platform_metrics)
   -> 0.0041s
-- transaction_open?()
   -> 0.0000s
-- execute("ALTER TABLE ci_platform_metrics\nADD CONSTRAINT check_f922abc32b\nCHECK ( char_length(platform_target) <= 255 )\nNOT VALID;\n")
   -> 0.0003s
-- execute("ALTER TABLE ci_platform_metrics VALIDATE CONSTRAINT check_f922abc32b;")
   -> 0.0004s
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:ci_variables, :key, {:algorithm=>:concurrently})
   -> 0.0022s
-- add_index(:ci_variables, :key, {:algorithm=>:concurrently})
   -> 0.0021s
== 20200820204041 CreateCiPlatformMetrics: migrated (0.0160s) =================

Down:

± bin/rake db:migrate:down VERSION=20200820204041
== 20200820204041 CreateCiPlatformMetrics: reverting ==========================
-- drop_table(:ci_platform_metrics)
   -> 0.0034s
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:ci_variables, :key, {:algorithm=>:concurrently})
   -> 0.0025s
-- remove_index(:ci_variables, {:algorithm=>:concurrently, :column=>:key})
   -> 0.0024s
== 20200820204041 CreateCiPlatformMetrics: reverted (0.0087s) =================

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Amy Troschinetz

Merge request reports