This repository has been archived by the owner on Sep 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding reproduction command to tracker scalars.
- Loading branch information
Showing
8 changed files
with
324 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
-- Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0. | ||
|
||
-- MySQL database for the tracker module, version 1.2.2 | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_producer` ( | ||
`producer_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`community_id` bigint(20) NOT NULL, | ||
`repository` varchar(255) NOT NULL, | ||
`executable_name` varchar(255) NOT NULL, | ||
`display_name` varchar(255) NOT NULL, | ||
`description` text NOT NULL, | ||
`revision_url` text NOT NULL, | ||
PRIMARY KEY (`producer_id`), | ||
KEY (`community_id`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_scalar` ( | ||
`scalar_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`trend_id` bigint(20) NOT NULL, | ||
`value` double, | ||
`producer_revision` varchar(255), | ||
`submit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
`user_id` bigint(20) NOT NULL DEFAULT '-1', | ||
`submission_id` bigint(20) NOT NULL DEFAULT '-1', | ||
`official` tinyint(4) NOT NULL DEFAULT '1', | ||
`build_results_url` text NOT NULL, | ||
`branch` varchar(255) NOT NULL DEFAULT '', | ||
`extra_urls` text, | ||
`reproduction_command` text, | ||
PRIMARY KEY (`scalar_id`), | ||
KEY (`trend_id`), | ||
KEY (`submit_time`), | ||
KEY (`user_id`), | ||
KEY (`submission_id`), | ||
KEY (`branch`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_submission` ( | ||
`submission_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`producer_id` bigint(20) NOT NULL, | ||
`name` varchar(255) NOT NULL DEFAULT '', | ||
`uuid` varchar(255) NOT NULL DEFAULT '', | ||
`submit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
PRIMARY KEY (`submission_id`), | ||
UNIQUE KEY (`uuid`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_scalar2item` ( | ||
`scalar_id` bigint(20) NOT NULL, | ||
`item_id` bigint(20) NOT NULL, | ||
`label` varchar(255) NOT NULL, | ||
KEY (`scalar_id`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_threshold_notification` ( | ||
`threshold_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`trend_id` bigint(20) NOT NULL, | ||
`value` double, | ||
`comparison` varchar(2), | ||
`action` varchar(80) NOT NULL, | ||
`recipient_id` bigint(20) NOT NULL, | ||
PRIMARY KEY (`threshold_id`), | ||
KEY (`trend_id`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_trend` ( | ||
`trend_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`producer_id` bigint(20) NOT NULL, | ||
`metric_name` varchar(255) NOT NULL, | ||
`display_name` varchar(255) NOT NULL, | ||
`unit` varchar(255) NOT NULL, | ||
`config_item_id` bigint(20), | ||
`test_dataset_id` bigint(20), | ||
`truth_dataset_id` bigint(20), | ||
`key_metric` tinyint(4) NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`trend_id`), | ||
KEY (`producer_id`) | ||
) DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `tracker_param` ( | ||
`param_id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`scalar_id` bigint(20) NOT NULL, | ||
`param_name` varchar(255) NOT NULL, | ||
`param_type` enum('text', 'numeric') NOT NULL, | ||
`text_value` text, | ||
`numeric_value` double, | ||
PRIMARY KEY (`param_id`), | ||
KEY (`param_name`) | ||
) DEFAULT CHARSET=utf8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
-- Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0. | ||
|
||
-- PostgreSQL database for the tracker module, version 1.2.2 | ||
|
||
SET client_encoding = 'UTF8'; | ||
SET default_with_oids = FALSE; | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_producer" ( | ||
"producer_id" serial PRIMARY KEY, | ||
"community_id" bigint NOT NULL, | ||
"repository" character varying(255) NOT NULL, | ||
"executable_name" character varying(255) NOT NULL, | ||
"display_name" character varying(255) NOT NULL, | ||
"description" text NOT NULL, | ||
"revision_url" text NOT NULL | ||
); | ||
|
||
CREATE INDEX "tracker_producer_community_id" ON "tracker_producer" ("community_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_scalar" ( | ||
"scalar_id" serial PRIMARY KEY, | ||
"trend_id" bigint NOT NULL, | ||
"value" double precision, | ||
"producer_revision" character varying(255), | ||
"submit_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"user_id" bigint NOT NULL DEFAULT -1::bigint, | ||
"submission_id" bigint NOT NULL DEFAULT -1::bigint, | ||
"official" smallint NOT NULL DEFAULT 1::smallint, | ||
"build_results_url" text NOT NULL, | ||
"branch" character varying(255) NOT NULL DEFAULT ''::character varying, | ||
"extra_urls" text, | ||
"reproduction_command" text | ||
); | ||
|
||
CREATE INDEX "tracker_scalar_trend_id" ON "tracker_scalar" ("trend_id"); | ||
CREATE INDEX "tracker_scalar_submit_time" ON "tracker_scalar" ("submit_time"); | ||
CREATE INDEX "tracker_scalar_idx_branch" ON "tracker_scalar" ("branch"); | ||
CREATE INDEX "tracker_scalar_idx_user_id" ON "tracker_scalar" ("user_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_submission" ( | ||
"submission_id" serial PRIMARY KEY, | ||
"producer_id" bigint, | ||
"name" character varying(255) NOT NULL DEFAULT ''::character varying, | ||
"uuid" character varying(255) NOT NULL DEFAULT ''::character varying, | ||
"submit_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
); | ||
CREATE UNIQUE INDEX "tracker_submission_uuid" ON "tracker_submission" ("uuid"); | ||
CREATE INDEX "tracker_submission_submit_time" ON "tracker_submission" ("submit_time"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_scalar2item" ( | ||
"id" serial PRIMARY KEY, | ||
"scalar_id" bigint NOT NULL, | ||
"item_id" bigint NOT NULL, | ||
"label" character varying(255) NOT NULL | ||
); | ||
|
||
CREATE INDEX "tracker_scalar2item_scalar_id" ON "tracker_scalar2item" ("scalar_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_threshold_notification" ( | ||
"threshold_id" serial PRIMARY KEY, | ||
"trend_id" bigint NOT NULL, | ||
"value" double precision, | ||
"comparison" character varying(2), | ||
"action" character varying(80) NOT NULL, | ||
"recipient_id" bigint NOT NULL | ||
); | ||
|
||
CREATE INDEX "tracker_threshold_notification_trend_id" ON "tracker_threshold_notification" ("trend_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_trend" ( | ||
"trend_id" serial PRIMARY KEY, | ||
"producer_id" bigint NOT NULL, | ||
"metric_name" character varying(255) NOT NULL, | ||
"display_name" character varying(255) NOT NULL, | ||
"unit" character varying(255) NOT NULL, | ||
"config_item_id" bigint, | ||
"test_dataset_id" bigint, | ||
"truth_dataset_id" bigint, | ||
"key_metric" smallint NOT NULL DEFAULT 0::smallint | ||
); | ||
|
||
CREATE INDEX "tracker_trend_producer_id" ON "tracker_trend" ("producer_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_param" ( | ||
"param_id" serial PRIMARY KEY, | ||
"scalar_id" bigint NOT NULL, | ||
"param_name" character varying(255) NOT NULL, | ||
"param_type" text CHECK (param_type IN ('text', 'numeric')), | ||
"text_value" text, | ||
"numeric_value" double precision); | ||
); | ||
|
||
CREATE INDEX "tracker_param_param_name_idx" ON "tracker_param" ("param_name"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
-- Midas Server. Copyright Kitware SAS. Licensed under the Apache License 2.0. | ||
|
||
-- SQLite database for the tracker module, version 1.2.2 | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_producer" ( | ||
"producer_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"community_id" INTEGER NOT NULL, | ||
"repository" TEXT NOT NULL, | ||
"executable_name" TEXT NOT NULL, | ||
"display_name" TEXT NOT NULL, | ||
"description" TEXT NOT NULL, | ||
"revision_url" TEXT NOT NULL | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "tracker_producer_community_id_idx" ON "tracker_producer" ("community_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_scalar" ( | ||
"scalar_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"trend_id" INTEGER NOT NULL, | ||
"value" REAL, | ||
"producer_revision" TEXT, | ||
"submit_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"user_id" INTEGER NOT NULL DEFAULT -1, | ||
"submission_id" INTEGER NOT NULL DEFAULT -1, | ||
"official" INTEGER NOT NULL DEFAULT 1, | ||
"build_results_url" TEXT NOT NULL, | ||
"branch" TEXT NOT NULL DEFAULT '', | ||
"extra_urls" TEXT, | ||
"reproduction_command" TEXT | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "tracker_scalar_trend_id_idx" ON "tracker_scalar" ("trend_id"); | ||
CREATE INDEX IF NOT EXISTS "tracker_scalar_submit_time_idx" ON "tracker_scalar" ("submit_time"); | ||
CREATE INDEX IF NOT EXISTS "tracker_scalar_branch_idx" ON "tracker_scalar" ("branch"); | ||
CREATE INDEX IF NOT EXISTS "tracker_scalar_user_id_idx" ON "tracker_scalar" ("user_id"); | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS "tracker_submission" ( | ||
"submission_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"producer_id" INTEGER NOT NULL, | ||
"name" TEXT NOT NULL DEFAULT '', | ||
"uuid" TEXT NOT NULL DEFAULT '', | ||
"submit_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
); | ||
CREATE UNIQUE INDEX IF NOT EXISTS "tracker_submission_uuid_idx" ON "tracker_submission" ("uuid"); | ||
CREATE INDEX IF NOT EXISTS "tracker_submission_submit_time_idx" ON "tracker_submission" ("submit_time"); | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS "tracker_scalar2item" ( | ||
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"scalar_id" INTEGER NOT NULL, | ||
"item_id" INTEGER NOT NULL, | ||
"label" TEXT NOT NULL | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "tracker_scalar2item_scalar_id_idx" ON "tracker_scalar2item" ("scalar_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_threshold_notification" ( | ||
"threshold_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"trend_id" INTEGER NOT NULL, | ||
"value" REAL, | ||
"comparison" TEXT, | ||
"action" TEXT NOT NULL, | ||
"recipient_id" INTEGER NOT NULL | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "tracker_threshold_notification_trend_id_idx" ON "tracker_threshold_notification" ("trend_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_trend" ( | ||
"trend_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"producer_id" INTEGER NOT NULL, | ||
"metric_name" TEXT NOT NULL, | ||
"display_name" TEXT NOT NULL, | ||
"unit" TEXT NOT NULL, | ||
"config_item_id" INTEGER, | ||
"test_dataset_id" INTEGER, | ||
"truth_dataset_id" INTEGER, | ||
"key_metric" INTEGER NOT NULL DEFAULT 0 | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "tracker_trend_producer_id_idx" ON "tracker_trend" ("producer_id"); | ||
|
||
CREATE TABLE IF NOT EXISTS "tracker_param" ( | ||
"param_id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"scalar_id" INTEGER NOT NULL, | ||
"param_name" TEXT NOT NULL, | ||
"param_type" TEXT CHECK( param_type in ('text', 'numeric') ) NOT NULL, | ||
"text_value" text, | ||
"numeric_value" REAL | ||
); | ||
CREATE INDEX IF NOT EXISTS "tracker_param_param_name" ON "tracker_param" ("param_name"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/*========================================================================= | ||
Midas Server | ||
Copyright Kitware SAS, 26 rue Louis Guérin, 69100 Villeurbanne, France. | ||
All rights reserved. | ||
For more information visit http://www.kitware.com/. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0.txt | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
=========================================================================*/ | ||
|
||
/** Upgrade the tracker module to version 1.2.3. */ | ||
class Tracker_Upgrade_1_2_3 extends MIDASUpgrade | ||
{ | ||
/** Upgrade a MySQL database. */ | ||
public function mysql() | ||
{ | ||
$this->db->query('ALTER TABLE `tracker_scalar` ADD COLUMN `reproduction_command` text;'); | ||
} | ||
|
||
/** Upgrade a PostgreSQL database. */ | ||
public function pgsql() | ||
{ | ||
$this->db->query('ALTER TABLE tracker_scalar ADD COLUMN reproduction_command text;'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters