diff --git a/.gitignore b/.gitignore
index 247d293fb98383577a452e9474af9e3113a76580..e39d407f88c2a89b22f9a049a1adadafc48cd709 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,8 @@
**/*.so
**/*.o
.gitreview
+**/*.json
+**/*.log
+**/.netrc
+**/*.pyc
+**/__pycache__
diff --git a/coverage-tool/coverage-reporting/.netrc b/coverage-tool/coverage-reporting/.netrc
new file mode 100644
index 0000000000000000000000000000000000000000..e756b787cb113b2b30349510b7d6ac84d7e1819c
--- /dev/null
+++ b/coverage-tool/coverage-reporting/.netrc
@@ -0,0 +1,3 @@
+machine 10.58.26.91 login root password centralengineeringoss
+machine metrics.c3vugop69wkc.eu-west-1.rds.amazonaws.com login ossqa password SbR@A2JO@(xMmp5OoGb0Z$dh(C0koC!u@WjexvYgqj)bx
+machine metrics-dev.cgm2fmd9z4lw.eu-west-1.rds.amazonaws.com login babeldev password cdHg959[768er
\ No newline at end of file
diff --git a/coverage-tool/coverage-reporting/collector.py b/coverage-tool/coverage-reporting/collector.py
new file mode 100644
index 0000000000000000000000000000000000000000..cfb69a46302505760288d164a96d641479f7a292
--- /dev/null
+++ b/coverage-tool/coverage-reporting/collector.py
@@ -0,0 +1,255 @@
+import argparse
+import json
+import os
+import sys
+import time
+from os.path import dirname, abspath
+
+import jenkins
+from pypika import Tables, MySQLQuery
+import cc_logger
+from lcov_parser import ParseCodeCoverageHTMLReport
+from uploader import ProcessReport
+from utils import MySqlDBConnection, KPIs, DB_Queries
+
+ON = "On"
+NO_OP = -1
+SUCCESS = 0
+
+class CollectorConfRecord(object):
+
+ def __init__(self, record):
+ self.record = record
+
+ @property
+ def kpi_id(self):
+ return int(self.record.get('KpiId', -1))
+
+ @property
+ def team_id(self):
+ return int(self.record.get('TeamId', -1))
+
+ @property
+ def job_name(self):
+ return self.record.get('JobName', "")
+
+ @property
+ def ci_server(self):
+ return self.record.get('Server', "")
+
+ @property
+ def ci_type(self):
+ return self.record.get("CiType", "None")
+
+ @property
+ def job_req_parameters(self):
+ return json.loads(self.record.get("JobRequiredParameters", "{}") or
+ '{}')
+
+ @property
+ def job_arguments(self):
+ return json.loads(self.record.get("JobArguments", "{}") or
+ '{}')
+
+ @property
+ def team_name(self):
+ return self.record.get("TeamName", "None")
+
+ @property
+ def team_repo(self):
+ return self.record.get("TeamRepo", "None")
+
+class JenkinsApi(object):
+
+ def __init__(self, server_name:str, job_name:str):
+ self.server = jenkins.Jenkins(server_name)
+ self.job_name = job_name
+ self.job_info = self.server.get_job_info(self.job_name)
+ self.number_of_builds = len(self.job_info['builds'])
+
+ @property
+ def last_build_number(self):
+ return self.job_info.get('lastCompletedBuild', {}).get('number', -1)
+
+ def build_number_and_url(self, builds_from_last:int=0):
+ if builds_from_last == 0: # last completed build
+ return self.last_build_number, self.job_info[
+ 'lastCompletedBuild']['url']
+ if self.number_of_builds < builds_from_last + 1:
+ job_info = self.job_info['builds'][-1]
+ else:
+ job_info = self.job_info['builds'][builds_from_last]
+ return job_info['number'], job_info['url']
+
+ def parameters(self, build_number):
+ params = [p for p in self.server.get_build_info(
+ self.job_name, build_number)['actions'] if 'parameters' in p]
+ parameters = {
+ param['name']: param['value'] for param in params[0]['parameters']}
+ return parameters
+
+class CIApiRecord(object):
+
+ def __init__(self, record:CollectorConfRecord):
+ self.server_name = record.ci_server
+ self.job_name = record.job_name
+ self._type = record.ci_type
+ self.server = None
+ self.job = None
+ if self._type == "Jenkins":
+ self.server = JenkinsApi(self.server_name, self.job_name)
+ self.set_build_number_and_url()
+
+ @property
+ def last_build_number(self):
+ return self.server.last_build_number
+
+ @property
+ def number_of_builds(self):
+ return self.server.number_of_builds
+
+ def set_build_number_and_url(self, builds_from_last: int = 0):
+ self.build_number, self.uri = self.server.build_number_and_url(builds_from_last)
+ if self.uri.endswith('/'):
+ self.uri = self.uri[:-1]
+ self.parameters = self.server.parameters(self.build_number)
+ return self.build_number, self.uri
+
+ def get_param_value(self, param_name):
+ return self.parameters.get(param_name, None)
+
+
+class CollectCodeCoverage(object):
+
+ def __init__(self, record: CollectorConfRecord, ci: CIApiRecord,
+ util_queries):
+ self._conf_record = record
+ self.ci = ci
+ self.util_queries = util_queries
+
+ def run(self, data_file="data.json"):
+ uri = self.ci.uri
+ logger.info(f"Checking job '{uri}' ...")
+ if self.util_queries.get_result_id(uri, self._conf_record.kpi_id,
+ self._conf_record.team_id) is not None:
+ logger.info(f"Job '{uri}' already uploaded.")
+ return NO_OP # The job-cc report is already in the DB
+ if (required_params := self._conf_record.job_req_parameters) is \
+ not None:
+ for key, value in required_params.items():
+ if (ci_val := self.ci.get_param_value(key)) != value:
+ logger.info(f"Job '{uri}' with requirement '{key}' was not "
+ f"met with value '{ci_val}'")
+ return NO_OP # No meet requirements to collect cc
+ # Now invoke lcov parser
+ args = argparse.Namespace(ci_url=uri,
+ lcov_path=self._conf_record \
+ .job_arguments.get('lcov_path', ''),
+ ci_type=self._conf_record.ci_type,
+ json_file=data_file,
+ metadata=f"team="
+ f"{self._conf_record.team_name} "
+ f"repo={self._conf_record.team_repo}"
+ )
+ return ParseCodeCoverageHTMLReport(args).to_json()
+
+class Collector(object):
+
+ def __init__(self, args):
+ self.args = args
+ self.db_conn = MySqlDBConnection(args.db_name, args.db_server,
+ args.netrc_file)
+ self.db_conn.connect()
+ self.queries = DB_Queries(self.db_conn)
+
+ def get_collections(self):
+ collector_conf_table, kpi_table, ci_table, job_conf_table, team_table = \
+ Tables('CollectorConf', 'KPI', 'CI', 'JobConf', 'Team')
+ # The collections are enabled if their field "Status" is "On"
+ collections = self.db_conn.read(
+ MySQLQuery \
+ .from_(collector_conf_table) \
+ .join(kpi_table) \
+ .on_field("KpiId") \
+ .join(ci_table) \
+ .on_field("CiId") \
+ .join(job_conf_table) \
+ .on_field("JobConfId") \
+ .join(team_table) \
+ .on_field("TeamId") \
+ .select(collector_conf_table.star, kpi_table.Name.as_('KpiName'),
+ ci_table.Server, job_conf_table.Name.as_('JobName'),
+ job_conf_table.RequiredParameters.
+ as_('JobRequiredParameters'),
+ job_conf_table.Arguments.as_('JobArguments'),
+ team_table.Name.as_('TeamName'),
+ team_table.Repo.as_('TeamRepo'),
+ ci_table.Type.as_("CiType")) \
+ .where(collector_conf_table.Status == ON).get_sql())
+ if len(collections) == 0:
+ logger.warning('No collections are enabled!')
+ return collections
+
+ def upload(self, data_file="data.json"):
+ # Upload record
+ print(f"Upload record to DB...")
+ args = argparse.Namespace(db_name=self.args.db_name,
+ db_server=self.args.db_server,
+ json_file=data_file,
+ netrc_file=self.args.netrc_file
+ )
+ ProcessReport(args)
+
+ def run(self):
+ collections = self.get_collections()
+ # Collect data for enabled collections
+ collector = None
+ for collection in collections:
+ record_collection = CollectorConfRecord(collection)
+ ci_handler = CIApiRecord(record_collection)
+ if record_collection.kpi_id == KPIs.CODE_COVERAGE.value:
+ collector = CollectCodeCoverage(record_collection, ci_handler,
+ self.queries)
+ build_number = ci_handler.number_of_builds if \
+ ci_handler.number_of_builds < self.args.last_builds_number + \
+ 1 else self.args.last_builds_number + 1
+ for build_index in range(build_number):
+ ci_handler.set_build_number_and_url(build_index)
+ status = collector.run()
+ if status == SUCCESS:
+ self.upload()
+ break
+
+
+
+help = """
+Collects KPI data from CI's and upload it to DB
+"""
+
+def main():
+ parser = argparse.ArgumentParser(epilog=help,
+ formatter_class=argparse.RawTextHelpFormatter)
+ parser.add_argument('--db-name', help='DB name', required=True)
+ parser.add_argument('--db-server', help='DB Server Host address',
+ required=True)
+ parser.add_argument('--netrc-file', help='.netrc file location',
+ required=False,
+ default=f"{CURRENT_PATH}/.netrc")
+ parser.add_argument('--last-builds-number', help='Number of builds from '
+ 'the last completed '
+ 'build to search for. '
+ 'Default is 5',
+ required=False,
+ type=int,
+ default=5)
+ args = parser.parse_args()
+ collector = Collector(args)
+ collector.run()
+
+if __name__ == '__main__':
+ CURRENT_PATH = dirname(abspath(sys.argv[0]))
+ logger = cc_logger.logger
+ start_time = time.time()
+ main()
+ elapsed_time = time.time() - start_time
+ print("Elapsed time: {}s".format(elapsed_time))
\ No newline at end of file
diff --git a/coverage-tool/coverage-reporting/lcov_parser.py b/coverage-tool/coverage-reporting/lcov_parser.py
new file mode 100644
index 0000000000000000000000000000000000000000..6e6db66195ff29a8ee3fac46a8da4d1e1aa6b002
--- /dev/null
+++ b/coverage-tool/coverage-reporting/lcov_parser.py
@@ -0,0 +1,217 @@
+import argparse
+import time
+from enum import Enum
+import cc_logger
+import os
+import json
+import requests as requests
+from parsel import Selector
+
+class Metrics(Enum):
+ LINES = 1
+ FUNCTIONS = 2
+ BRANCHES = 3
+ FILES = 4
+
+logger = cc_logger.logger
+
+def to_(f, s, pos=0, default=None):
+ """
+ Function to return a conversion from string to a type given by function f
+
+ :param f: Function used to convert the string
+ :param s: String to be converted
+ :param pos: The string is split and this is the position within the
+ resulting array where resides the string
+ :param default: Default value if conversion cannot be made
+ :return: Converted string value
+ """
+ r = None
+ try:
+ r = f(s.split()[pos])
+ except ValueError:
+ if default is not None:
+ return default
+ return r
+
+class ParseCodeCoverageHTMLReport(object):
+ """
+ Class used to scrape information from a LCOV report to be written to a
+ JSON file in a flat structure to be read and uploaded to a custom DB
+ """
+
+ def __init__(self, args):
+ self.args = args
+ self.ci_url = args.ci_url
+ self.lcov_path = args.lcov_path
+ self.url = f'{self.ci_url}{self.lcov_path}'
+ self.ci_type = args.ci_type
+ self.json_file = args.json_file
+ self.report = None
+
+ def to_json(self):
+ logger.info(f'Collecting from {self.url}...')
+ self.report = ParseCodeCoverageHTMLReport.process(self.url)
+ if not self.report:
+ return -1
+ _metadata = self._metadata()
+ self.report['metadata'].update(_metadata)
+ with open(self.json_file, 'w', encoding='utf-8') as f:
+ json.dump(self.report, f, ensure_ascii=False, indent=4)
+ return 0
+
+ def _metadata(self):
+ metadata = {'uri': self.ci_url, 'ci_type': self.ci_type,
+ 'kpi': 'Code Coverage'}
+ if 'metadata' in self.args:
+ metadata.update(dict(tuple(i.split('=')) for i in
+ self.args.metadata.split()))
+ return metadata
+
+
+ FIRST_LEVEL = True
+ LCOV_VERSION = "1.15"
+
+ @staticmethod
+ def process(url, parent=""):
+ """
+ Static method used to extract the summary and table information from
+ the LCOV report deployed at the given url
+
+ :param url: URL where the LCOV report resides
+ :param parent: Parent folder for the LCOV report. Empty if at the
+ first/root level
+ :return: List containing dictionaries for every file with the
+ corresponding metrics/results
+ """
+
+ def _metadata() -> {}:
+ date_time = selector.\
+ xpath("//td[contains(@class, 'headerItem') and text() = "
+ "'Date:']/following-sibling::td[1 and contains("
+ "@class, 'headerValue')]/text()").get()
+ lcov_version = selector.\
+ xpath("//td[contains(@class, 'versionInfo')]/a/text()").get()
+ metadata = {'datetime': date_time,
+ 'lcov_version': lcov_version.split()[-1],
+ 'root_url_report': url}
+ return metadata
+
+ def _summary() -> [{}]:
+ summary = {"Directory": "", "Parent": parent}
+ result_cols = selector. \
+ xpath('//td[@class="headerCovTableHead"]/text()').getall()
+ for metric in Metrics:
+ metric_sel = selector. \
+ xpath(f"//td[contains(@class, 'headerItem') "
+ f"and text() = '{metric.name.title()}:']")
+ if not metric_sel:
+ continue
+ results = metric_sel.xpath(
+ "./following-sibling::td[1 and contains"
+ "(@class, 'headerCovTableEntry')]/text()").getall()
+ for index, result_col in enumerate(result_cols):
+ summary[f'{metric.name.title()}{result_col}'] = \
+ to_(float, results[index], default=-1)
+ return [summary]
+
+ def _table() -> [{}]:
+ table =[]
+ headers = selector. \
+ xpath('//td[@class="tableHead"]/text()').getall()
+ rows = selector.xpath("//td[contains(@class, 'coverFile')]")
+ for row in rows:
+ record = {}
+ record[headers[0]] = row.xpath("./a/text()").get()
+ record['Parent'] = parent
+ percentage = row.xpath(
+ "./following-sibling::td[1 and "
+ "contains(@class, 'coverPer')]/text()").getall()
+ hit_total = row.xpath(
+ "./following-sibling::td[1 and "
+ "contains(@class, 'coverNum')]/text()").getall()
+ for index, h in enumerate(headers[1:]):
+ header = h.split()[0]
+ if header == "Line":
+ header = "Lines"
+ record[f'{header}Coverage'] = to_(float, percentage[index],
+ default=-1)
+ if ParseCodeCoverageHTMLReport.LCOV_VERSION \
+ in ["1.14", "1.15", "1.16"]:
+ hit, total = hit_total[index].split("/")
+ else:
+ hit, total = "0", "0"
+ record[f'{header}Hit'] = to_(int, hit)
+ record[f'{header}Total'] = to_(int, total)
+ table.append(record)
+ if headers[0].upper().strip() == "DIRECTORY":
+ table += ParseCodeCoverageHTMLReport.\
+ process(f'{os.path.dirname(url)}'
+ f'/{row.xpath("./a/@href").get()}',
+ parent=record[headers[0]])
+ return table
+
+ url = url
+ parent = parent
+ req = requests.get(url)
+ if req.status_code != 200:
+ logger.warning(f"Url '{url}' return status code "
+ f"{req.status_code}, returning without collecting "
+ f"data..." )
+ return []
+ text = req.text
+ selector = Selector(text=text)
+ metadata = None
+ if ParseCodeCoverageHTMLReport.FIRST_LEVEL:
+ ParseCodeCoverageHTMLReport.FIRST_LEVEL = False
+ metadata = _metadata()
+ if 'lcov_version' in metadata:
+ ParseCodeCoverageHTMLReport.LCOV_VERSION = \
+ metadata['lcov_version']
+ data: [{}] = _summary() + _table()
+ if metadata is not None:
+ ParseCodeCoverageHTMLReport.FIRST_LEVEL = True
+ return {'metadata': metadata, 'records': data}
+ else:
+ return data
+
+help = """
+Collects data (metrics and results) from lcov report and write it to a json
+file.
+
+The data might be collected in two levels:
+- Directory level
+- Filename level
+"""
+
+def main():
+ parser = argparse.\
+ ArgumentParser(epilog=help,
+ formatter_class=argparse.RawTextHelpFormatter)
+ parser.add_argument('--ci-url', help='CI url path including job',
+ required=True)
+ parser.add_argument('--lcov-path', help='LCOV report path', required=True)
+ parser.add_argument('--ci-type',
+ help='CI type, either Jenkins (default) or Gitlab',
+ default='Jenkins',
+ choices=["Jenkins", "Gitlab"])
+ parser.add_argument('--json-file',
+ help='Path and filename of the output JSON file',
+ default="data.json")
+ parser.add_argument("--metadata",
+ metavar="KEY=VALUE",
+ nargs='*',
+ help="Set a number of key-value pairs as metadata "
+ "If a value contains spaces, you should define "
+ "it with double quotes: " + 'key="value with '
+ 'spaces".')
+ args = parser.parse_args()
+ return ParseCodeCoverageHTMLReport(args).to_json()
+
+
+if __name__ == '__main__':
+ start_time = time.time()
+ main()
+ elapsed_time = time.time() - start_time
+ print("Elapsed time: {}s".format(elapsed_time))
+
diff --git a/coverage-tool/coverage-reporting/uploader.py b/coverage-tool/coverage-reporting/uploader.py
new file mode 100644
index 0000000000000000000000000000000000000000..0603e71dfa7590e5b995adf45fd9a8986d4d8df4
--- /dev/null
+++ b/coverage-tool/coverage-reporting/uploader.py
@@ -0,0 +1,212 @@
+import argparse
+import datetime
+import posixpath
+import sys
+import time
+from enum import Enum
+from typing import Union
+
+from parsel import Selector
+import cc_logger
+from os.path import dirname, abspath
+import json
+from urllib.parse import urlparse, ParseResult
+import requests as requests
+from pypika import Table, Tables, MySQLQuery
+import re
+from utils import MySqlDBConnection, KPIs, DB_Queries
+
+
+logger = cc_logger.logger
+
+class Metrics(Enum):
+ LINES = 1
+ FUNCTIONS = 2
+ BRANCHES = 3
+ FILES = 4
+
+def safe_cast(val, to_type, default=None):
+ try:
+ return to_type(val)
+ except (ValueError, TypeError):
+ return default
+
+
+class JenkinsJobParser(object):
+
+ def __init__(self, url):
+ self.url = url
+ text = requests.get(self.url).text
+ self.selector = Selector(text=text)
+
+ def build_page(self):
+ attributes = {}
+ h1 = self.selector.\
+ xpath("//h1")
+ if h1:
+ if m := h1.xpath('./img'):
+ attributes['status'] = m.attrib['alt']
+ if m := re.match(r'.+?\((.+)\)$',
+ h1.xpath('./text()').get().strip().
+ replace('\n', ' ').replace(',', '')):
+ parse_date = re.match(r'(.+?) (.+?) (.+?) (.+)$', m.groups()[0])
+ if parse_date:
+ m, d, y, r = parse_date.groups()
+ attributes['date'] = \
+ f'{y}-{datetime.datetime.strptime(m,"%b").month}-{d} {r}'
+ else:
+ attributes['date'] = "N/A"
+ return attributes
+
+ def parameters(self) -> dict[str, str]:
+ # Send a GET request to the URL
+ parameters = {}
+ text = requests.get(posixpath.join(self.url, 'parameters')).text
+ selector = Selector(text=text)
+ keys = selector.xpath(
+ "//td[contains(@class, 'setting-name')] | //div["
+ "contains(@class, 'jenkins-form-label')]")
+ values = selector.xpath("//*[contains(@class, 'setting-main')]/input "
+ "| //*[contains(@class, 'setting-main')]/textarea")
+ for k, v in zip(keys, values):
+ key = k.xpath("./text()").get()
+ _type = v.attrib.get('type', "") or v.root.tag
+ if _type == 'checkbox':
+ parameters[key] = 'checked' in v.attrib
+ elif _type == 'textarea':
+ parameters[key] = v.xpath('./text()').get()
+ else:
+ parameters[key] = v.attrib['value']
+ return parameters
+
+
+class ReportData(object):
+
+ def __init__(self, json_file):
+ self.data = None
+ self.kpi_id = None
+ self.team_id = None
+ with open(json_file) as f:
+ self.data = json.load(f)
+
+ @property
+ def kpi_name(self):
+ return self.data.get('metadata', {}).get('kpi', None)
+
+ @property
+ def team_name(self):
+ return self.data.get('metadata', {}).get('team', None)
+
+ @property
+ def uri(self):
+ return self.data.get('metadata', {}).get('uri', None)
+
+ @property
+ def ci_type(self):
+ return self.data.get('metadata', {}).get('ci_type', None)
+
+ @property
+ def records(self):
+ return self.data.get('records', [])
+
+
+class ProcessReport(object):
+
+ def __init__(self, args):
+ self.new_result_id = None
+ self.db_conn = MySqlDBConnection(args.db_name, args.db_server,
+ args.netrc_file)
+ self.db_conn.connect()
+ self.report = ReportData(args.json_file)
+ self.queries = DB_Queries(self.db_conn)
+ self.new_result_id = self.process_result()
+ if self.new_result_id:
+ self.process_jenkins(self.new_result_id)
+ if self.report.kpi_id == KPIs.CODE_COVERAGE.value:
+ self.process_cc()
+
+ def process_result(self):
+ result_table, kpi_table, team_table = Tables('Result', 'KPI', 'Team')
+ # Checking KPI and Team name exists on DB
+ self.report.kpi_id = self.queries.\
+ get_kpi_id_by_name(self.report.kpi_name)
+ self.report.team_id = self.queries.\
+ get_team_id_by_name(self.report.team_name)
+ # Checking if results already uploaded
+ if self.queries.get_result_id(
+ self.report.uri, self.report.kpi_id,
+ self.report.team_id) is not None:
+ raise Exception("Result already uploaded")
+ # Create new results record
+ new_result_id = self.db_conn.insert(
+ MySQLQuery.into(result_table) \
+ .columns('KpiId', 'ProcessedOn', 'Uri', 'TeamId') \
+ .insert(self.report.kpi_id,
+ datetime.datetime.now().strftime("%m/%d/%Y, %H:%M:%S"),
+ self.report.uri, self.report.team_id).get_sql())
+ return new_result_id
+
+ def process_jenkins(self, new_result_id: int):
+ jenkins = JenkinsJobParser(self.report.uri)
+ elements: ParseResult = urlparse(self.report.uri)
+ jenkins_table = Table('JenkinsJob')
+ name, build_number = re.match('/job/(.+?)/(.+)/?.*$',
+ elements.path).groups()
+ ci = elements.hostname
+ build_data = jenkins.build_page()
+ parameters_data = jenkins.parameters()
+ new_jenkins_job_id = self.db_conn.insert(
+ MySQLQuery.into(jenkins_table) \
+ .columns('ResultId', 'Name', 'Build', 'CI', 'DateTime', 'Status',
+ 'Parameters') \
+ .insert(new_result_id, name, build_number, ci, build_data.get(
+ 'date', ""), build_data.get('status', "None"), json.dumps(
+ parameters_data)).get_sql())
+ return new_jenkins_job_id
+
+ def process_cc(self):
+ cc_table = Table('CodeCoverage')
+ for record in self.report.records:
+ columns = ['ResultId']
+ values = [self.new_result_id]
+ for k, value in record.items():
+ key = k.strip()
+ if key in ["Filename", "Directory"]:
+ key = "Filename"
+ columns.append(key)
+ values.append(value)
+ query = MySQLQuery.into(cc_table) \
+ .columns(*columns) \
+ .insert(*values)
+ new_cc_id = self.db_conn.insert(query.get_sql())
+ print(f'{len(self.report.records)} records inserted in Code Coverage '
+ f'table linked to Result Id {self.new_result_id}')
+
+
+
+help = """
+Collects data from lcov report and uploads it to a database
+"""
+
+def main():
+ parser = argparse.ArgumentParser(epilog=help,
+ formatter_class=argparse.RawTextHelpFormatter)
+ parser.add_argument('--db-name', help='DB name', required=True)
+ parser.add_argument('--db-server', help='DB Server Host address',
+ required=True)
+ parser.add_argument('--json-file', help='JSON file with the flat LCOV '
+ 'report', required=False)
+ parser.add_argument('--netrc-file', help='.netrc file location',
+ required=False,
+ default=f"{dirname(abspath(sys.argv[0]))}/.netrc")
+ args = parser.parse_args()
+ ProcessReport(args)
+
+
+
+if __name__ == '__main__':
+ start_time = time.time()
+ main()
+ elapsed_time = time.time() - start_time
+ print("Elapsed time: {}s".format(elapsed_time))
+
diff --git a/coverage-tool/coverage-reporting/utils.py b/coverage-tool/coverage-reporting/utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6b430ee39f3d34cb090691417a47f8b5bb54a43
--- /dev/null
+++ b/coverage-tool/coverage-reporting/utils.py
@@ -0,0 +1,116 @@
+import netrc
+import os
+import subprocess
+from enum import Enum
+from typing import Union
+
+import mysql
+from mysql.connector import MySQLConnection, CMySQLConnection
+from mysql.connector.pooling import PooledMySQLConnection
+from pypika import Table, MySQLQuery, functions
+from pypika.terms import PseudoColumn
+
+
+def os_command(command, show_command=False):
+ """
+ Function that execute an os command, on fail exit the program
+
+ :param command: OS command as string
+ :param show_command: Optional argument to print the command in stdout
+ :return: The string output of the os command
+ """
+ try:
+ if show_command:
+ print("OS command: {}".format(command))
+ out = subprocess.check_output(
+ command, stderr=subprocess.STDOUT, shell=True)
+ except subprocess.CalledProcessError as ex:
+ raise Exception(
+ "Exception running command '{}': {}({})".format(
+ command, ex.output, ex.returncode))
+ return out.decode("utf8")
+
+class MySqlDBConnection(object):
+ Default: PseudoColumn = PseudoColumn('default')
+
+ def __init__(self, db_name: str, db_machine: str, netrc: str):
+ self.db_name = db_name
+ self.db_machine = db_machine
+ self.netrc = netrc
+ self.connection: PooledMySQLConnection | \
+ MySQLConnection | CMySQLConnection | None = None
+ self.cursor = None
+
+ def connect(self):
+ curr_dir = os.path.dirname(os.path.abspath(__file__))
+ secrets = netrc.netrc(self.netrc)
+ username, account, password = secrets.authenticators(
+ self.db_machine)
+ # Connect to the MySQL database
+ try:
+ self.connection = mysql.connector.connect(user=username,
+ password=password,
+ port=3306,
+ host=self.db_machine,
+ database=self.db_name)
+ print("MySQL Database connection successful")
+ except Exception as err:
+ print(f"Error: '{err}'")
+ self.cursor = self.connection.cursor(dictionary=True)
+ return self
+
+ def read(self, query):
+ self.cursor.execute(query)
+ rows = self.cursor.fetchall()
+ return rows
+
+ def insert(self, query, val=()):
+ self.cursor.execute(query, val)
+ self.connection.commit()
+ return self.cursor.lastrowid
+
+class KPIs(Enum):
+ CODE_COVERAGE = 1
+
+class DB_Queries(object):
+
+ def __init__(self, conn: MySqlDBConnection):
+ self.conn = conn
+
+ def get_kpi_id_by_name(self, kpi_name) -> int:
+ kpi_table = Table('KPI')
+ kpis = self.conn.read(
+ MySQLQuery \
+ .from_(kpi_table) \
+ .select(kpi_table.KpiId) \
+ .where(kpi_table.Name == kpi_name).get_sql())
+ if len(kpis) == 0:
+ raise Exception(f"KPI '{kpi_name}' not found")
+ return kpis[0]['KpiId']
+
+ def get_team_id_by_name(self, team_name) -> int:
+ team_table = Table('Team')
+ teams = self.conn.read(
+ MySQLQuery
+ .from_(team_table)
+ .select(team_table.TeamId)
+ .where(team_table.Name == team_name).get_sql())
+ if len(teams) == 0:
+ raise Exception(f"Team '{team_name}' not found")
+ return teams[0]['TeamId']
+
+ def get_result_id(self, uri, kpi_id, team_id) -> Union[int | None]:
+ result_table = Table('Result')
+ results = self.conn.read(
+ MySQLQuery \
+ .from_(result_table) \
+ .select(result_table.ResultId) \
+ .where(functions.Replace(
+ functions.Replace(result_table.Uri, 'https://', ''),
+ 'http://', '') == uri.replace('https://', '').replace(
+ 'http://', '')) \
+ .where(result_table.KpiId == kpi_id) \
+ .where(result_table.TeamId == team_id).get_sql())
+ if len(results) == 0:
+ return None
+ return results[0]['ResultId']
\ No newline at end of file
diff --git a/quality-metrics/broker-component/metrics-schemas/tfa_code_churn_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfa_code_churn_schema_1_0.json
deleted file mode 100644
index 8935e7678d6cc6c4c9dcf532f6555d6448be5ff5..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfa_code_churn_schema_1_0.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "properties" : {
- "Lines_of_Change" : {
- "type" : "number"
- }
- },
- "required" : ["Lines_of_Change"]
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "Git_Tag_Date" : {
- "type" : "number"
- },
- "Base_Tag" : {
- "type" : "string"
- },
- "Target_Tag" : {
- "type" : "string"
- }
- },
- "required" : ["Git_Tag_Date", "Base_Tag", "Target_Tag"],
- "additionalProperties": false
- },
- "time" : {
- }
- }
- },
- "required" : ["measurement", "fields", "tags", "time"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
diff --git a/quality-metrics/broker-component/metrics-schemas/tfa_complexity_stats_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfa_complexity_stats_schema_1_0.json
deleted file mode 100644
index 0c221606a9ce8508b79e5636e229c56b835b9ee4..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfa_complexity_stats_schema_1_0.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "properties" : {
- "Function_ID" : {
- "type" : "string"
- },
- "Score" : {
- "type" : "number"
- },
- "Whitelisted" : {
- "type" : "string"
- },
- "Threshold" : {
- "type" : "number"
- }
- },
- "required" : ["Function_ID", "Score", "Whitelisted", "Threshold"]
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "Git_Tag_Date" : {
- "type" : "number"
- },
- "Base_Tag" : {
- "type" : "string"
- },
- "Target_Tag" : {
- "type" : "string"
- },
- "Location" : {
- "type" : "string"
- }
- },
- "required" : ["Git_Tag_Date", "Base_Tag", "Target_Tag", "Location"],
- "additionalProperties": false
- },
- "time" : {
- }
- }
- },
- "required" : ["measurement", "fields", "tags", "time"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
\ No newline at end of file
diff --git a/quality-metrics/broker-component/metrics-schemas/tfa_complexity_tracking_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfa_complexity_tracking_schema_1_0.json
deleted file mode 100644
index 509a966b593f70914253f17a69ee1993bf57008a..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfa_complexity_tracking_schema_1_0.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "properties" : {
- "Functions_Exceeding_Threshold_Not_Whitelisted" : {
- "type" : "number"
- },
- "Whitelisted" : {
- "type" : "string"
- },
- "Threshold" : {
- "type" : "number"
- }
- },
- "required" : ["Functions_Exceeding_Threshold_Not_Whitelisted", "Whitelisted", "Threshold"]
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "Git_Tag_Date" : {
- "type" : "number"
- },
- "Target_Tag" : {
- "type" : "string"
- }
- },
- "required" : ["Git_Tag_Date", "Target_Tag"],
- "additionalProperties": false
- },
- "time" : {
- }
- }
- },
- "required" : ["measurement", "fields", "tags", "time"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
diff --git a/quality-metrics/broker-component/metrics-schemas/tfa_defects_stats_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfa_defects_stats_schema_1_0.json
deleted file mode 100644
index 04dcdf8e8d33107350dcb8e9da39c232878d0542..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfa_defects_stats_schema_1_0.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "properties" : {
- "Title" : {
- "type" : "string"
- },
- "Issue_Status" : {
- "type" : "string"
- },
- "URL" : {
- "type" : "string"
- }
- },
- "required" : ["Title", "Issue_Status", "URL"]
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "Defect_ID" : {
- "type" : "string"
- },
- "Measured_Date" : {
- }
- },
- "required" : ["Defect_ID", "Measured_Date"],
- "additionalProperties": false
- }
- }
- },
- "required" : ["measurement", "fields", "tags"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
diff --git a/quality-metrics/broker-component/metrics-schemas/tfa_defects_tracking_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfa_defects_tracking_schema_1_0.json
deleted file mode 100644
index 7a0d855f033b13edff110c2512e6dbd2dc1e5dc4..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfa_defects_tracking_schema_1_0.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "properties" : {
- "Issue_Status" : {
- "type" : "string"
- },
- "Number_of_Defects" : {
- "type" : "number"
- }
- },
- "required" : ["Issue_Status", "Number_of_Defects"]
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "Measured_Date" : {
- }
- },
- "required" : ["Measured_Date"],
- "additionalProperties": false
- }
- }
- },
- "required" : ["measurement", "fields", "tags"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
diff --git a/quality-metrics/broker-component/metrics-schemas/tfa_image_size_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfa_image_size_schema_1_0.json
deleted file mode 100644
index e64e1f8cd69ebe2623114af12539f2cd3d6cfe6d..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfa_image_size_schema_1_0.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "minProperties": 1,
- "patternProperties" : {
- "^BL*$" : {
- "type" : "number"
- }
- }
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "BinMode" : {
- "type" : "string"
- },
- "CommitID" : {
- "type" : "string"
- },
- "CommitTitle" : {
- "type" : "string"
- }
- },
- "required" : ["BinMode", "CommitID", "CommitTitle"],
- "additionalProperties": false
- },
- "time" : {
- }
- }
- },
- "required" : ["measurement", "fields", "tags", "time"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
diff --git a/quality-metrics/broker-component/metrics-schemas/tfa_misra_defects_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfa_misra_defects_schema_1_0.json
deleted file mode 100644
index 9109bd905acb0d92cdb23eccaeb9d8d31eb6cb0d..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfa_misra_defects_schema_1_0.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "properties" : {
- "TotalDefects" : {
- "type" : "number"
- },
- "MandatoryDefects" : {
- "type" : "number"
- },
- "RequiredDefects" : {
- "type" : "number"
- },
- "AdvisoryDefects" : {
- "type" : "number"
- }
- },
- "required" : ["TotalDefects", "MandatoryDefects", "RequiredDefects", "AdvisoryDefects"]
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "BinMode" : {
- "type" : "string"
- },
- "CommitID" : {
- "type" : "string"
- },
- "CommitTitle" : {
- "type" : "string"
- }
- },
- "required" : ["BinMode", "CommitID", "CommitTitle"],
- "additionalProperties": false
- },
- "time" : {
- }
- }
- },
- "required" : ["measurement", "fields", "tags", "time"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
diff --git a/quality-metrics/broker-component/metrics-schemas/tfa_rtinstr_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfa_rtinstr_schema_1_0.json
deleted file mode 100644
index 1801814792dedc1b7a5286f7876e6abb3eb6e4d1..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfa_rtinstr_schema_1_0.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "properties" : {
- "Latency_EL3Entry_EL3Exit" : {
- "type" : "number"
- },
- "Latency_EL3Entry_CPUPowerDown" : {
- "type" : "number"
- },
- "Latency_CPUWakeup_EL3Exit" : {
- "type" : "number"
- },
- "CacheFlush" : {
- "type" : "number"
- }
- },
- "oneOf": [
- { "required": [
- "Latency_EL3Entry_EL3Exit"
- ]},
- { "required": [
- "Latency_EL3Entry_CPUPowerDown",
- "Latency_CPUWakeup_EL3Exit",
- "CacheFlush"
- ]}
- ]
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "CommitID" : {
- "type" : "string"
- },
- "CommitTitle" : {
- "type" : "string"
- },
- "TC_Name" : {
- "type" : "string"
- },
- "Cluster_ID" : {
- "type" : "number"
- },
- "CPU_Core" : {
- "type" : "number"
- }
- },
- "required" : ["CommitID", "CommitTitle", "TC_Name", "Cluster_ID", "CPU_Core"],
- "additionalProperties": false
- },
- "time" : {
- }
- }
- },
- "required" : ["measurement", "fields", "tags", "time"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
diff --git a/quality-metrics/broker-component/metrics-schemas/tfm_code_churn_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfm_code_churn_schema_1_0.json
deleted file mode 100644
index a181c31fa7aa8ec27f13f2286785ffffe9ba0356..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfm_code_churn_schema_1_0.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "properties" : {
- "Lines_of_Change" : {
- "type" : "number"
- }
- },
- "required" : ["Lines_of_Change"]
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "Git_Tag_Date" : {
- "type" : "string"
- },
- "Base_Tag" : {
- "type" : "string"
- },
- "Target_Tag" : {
- "type" : "string"
- }
- },
- "required" : ["Git_Tag_Date", "Base_Tag", "Target_Tag"],
- "additionalProperties": false
- },
- "time" : {
- }
- }
- },
- "required" : ["measurement", "fields", "tags", "time"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
diff --git a/quality-metrics/broker-component/metrics-schemas/tfm_complexity_stats_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfm_complexity_stats_schema_1_0.json
deleted file mode 100644
index 8390692d4c4fb53c8751b66c75c78293cd9e8c0d..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfm_complexity_stats_schema_1_0.json
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "properties" : {
- "Function" : {
- "type" : "string"
- },
- "Score" : {
- "type" : "number"
- },
- "Whitelisted" : {
- "type" : "string"
- },
- "Threshold" : {
- "type" : "number"
- },
- "Location" : {
- "type" : "string"
- }
- },
- "required" : ["Function", "Whitelisted", "Threshold", "Score", "Location"]
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "Git_Tag_Date" : {
- "type" : "string"
- },
- "Target_Tag" : {
- "type" : "string"
- },
- "Base_Tag" : {
- "type" : "string"
- },
- "Location_Tag" : {
- "type" : "string"
- }
- },
- "required" : ["Git_Tag_Date", "Target_Tag", "Base_Tag", "Location_Tag"],
- "additionalProperties": false
- },
- "time" : {
- }
- }
- },
- "required" : ["measurement", "fields", "tags", "time"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
diff --git a/quality-metrics/broker-component/metrics-schemas/tfm_defects_stats_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfm_defects_stats_schema_1_0.json
deleted file mode 100644
index b5f819d60368615b16492bd8cad96ffd8eaf880f..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfm_defects_stats_schema_1_0.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- }
- }
- },
- "data" : {
- "type" : "array",
- "minItems": 1,
- "items" : {
- "type" : "object",
- "properties" :{
- "measurement" : {
- "type" : "string"
- },
- "fields" : {
- "type" : "object",
- "properties" : {
- "Status" : {
- "type" : "string"
- },
- "Priority" : {
- "type" : "string"
- },
- "Summary" : {
- "type" : "string"
- },
- "URL" : {
- "type" : "string"
- },
- "Existing_Defect" : {
- "type" : "number"
- }
- },
- "required" : ["Status", "Priority", "Summary", "URL", "Existing_Defect"]
- },
- "tags" : {
- "type" : "object",
- "properties" : {
- "Defect_ID" : {
- "type" : "string"
- },
- "Measured_Date" : {
- "type" : "string"
- }
- },
- "required" : ["Defect_ID", "Measured_Date"],
- "additionalProperties": false
- }
- }
- },
- "required" : ["measurement", "fields", "tags"],
- "additionalProperties": false
- }
- },
- "required" : ["api_version", "metadata", "data"]
-}
diff --git a/quality-metrics/broker-component/metrics-schemas/tfm_image_size_schema_1_0.json b/quality-metrics/broker-component/metrics-schemas/tfm_image_size_schema_1_0.json
deleted file mode 100644
index 30a2ffc4c450838a20ca30a4fa79a9391a7056c9..0000000000000000000000000000000000000000
--- a/quality-metrics/broker-component/metrics-schemas/tfm_image_size_schema_1_0.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "type" : "object",
- "properties" : {
- "api_version" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "properties" : {
- "metrics" : {
- "type" : "string"
- },
- "data_producer" : {
- "type" : "string"
- },
- "git_info" : {
- "type" : "object",
- "properties" : {
- "commit_time" : {
- "type" : "string"
- },
- "commit_title" : {
- "type" : "string"
- },
- "commit_id" : {
- "type" : "string"
- },
- "commit_url" : {
- "type" : "string"
- },
- "branch" : {
- "type" : "string"
- },
- "gerrit_id" : {
- "type" : "string"
- }
- },
- "required" : ["commit_time", "commit_title", "commit_id", "commit_url", "branch"],
- "additionalProperties": false
- },
- "build_info" : {
- "type" : "object",
- "properties" : {
- "build_type" : {
- "type" : "string"
- },
- "cmake_config" : {
- "type" : "string"
- },
- "compiler" : {
- "type" : "string"
- },
- "target" : {
- "type" : "string"
- }
- },
- "required" : ["build_type", "cmake_config", "compiler", "target"]
- }
- },
- "required" : ["metrics", "build_info", "git_info", "data_producer"],
- "additionalProperties": false
- },
- "data" : {
- "type" : "array",
- "minItems" : 1,
- "items" : {
- "type" : "object",
- "properties" : {
- "file" : {
- "type" : "string"
- },
- "bss" : {
- "type" : "number"
- },
- "data" : {
- "type" : "number"
- },
- "text" : {
- "type" : "number"
- }
- },
- "required" : ["file", "bss", "data", "text"],
- "additionalProperties": false
- }
- }
- },
- "required" : ["metadata", "data", "api_version"]
-}
diff --git a/quality-metrics/docs/sample-dashboards/tfa_codechurn.json b/quality-metrics/docs/sample-dashboards/tfa_codechurn.json
deleted file mode 100644
index ac9e0b7179c593451ea826d78020d0cd329f6b8a..0000000000000000000000000000000000000000
--- a/quality-metrics/docs/sample-dashboards/tfa_codechurn.json
+++ /dev/null
@@ -1,288 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 0,
- "id": 3,
- "links": [],
- "panels": [
- {
- "aliasColors": {},
- "bars": true,
- "dashLength": 10,
- "dashes": false,
- "datasource": "TFA_CodeChurn",
- "decimals": 2,
- "description": "Tracking the lines of changes in TF-A source code per release tag",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 7,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "hiddenSeries": false,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": false,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.3",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "$tag_Target_Tag",
- "dsType": "influxdb",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT max(Lines_of_Change) FROM \"TFA_CodeChurn_Tracking\" where $timeFilter group by Target_Tag, Git_Tag_Date order by time",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "TFA CodeChurn Tracking",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "series",
- "name": null,
- "show": true,
- "values": [
- "max"
- ]
- },
- "yaxes": [
- {
- "decimals": 0,
- "format": "short",
- "label": "Lines of Change",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "columns": [],
- "datasource": "TFA_CodeChurn",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 10,
- "w": 24,
- "x": 0,
- "y": 7
- },
- "id": 7,
- "links": [],
- "pageSize": 9,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "hidden"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "TFA_CodeChurn_Tracking",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT Base_Tag as \"Base Tag\", max(Lines_of_Change) as \"Lines of Change\" FROM \"TFA_CodeChurn_Tracking\" GROUP BY Target_Tag ",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "TF-A Code Churn Statistics",
- "transform": "table",
- "type": "table-old"
- }
- ],
- "refresh": "1d",
- "schemaVersion": 26,
- "style": "dark",
- "tags": [
- "TFA_QUALITY_METRICS"
- ],
- "templating": {
- "list": []
- },
- "time": {
- "from": "now-5y",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "timezone": "",
- "title": "TFA_Churn",
- "uid": "tfa-churn",
- "version": 4
-}
\ No newline at end of file
diff --git a/quality-metrics/docs/sample-dashboards/tfa_complexity.json b/quality-metrics/docs/sample-dashboards/tfa_complexity.json
deleted file mode 100644
index 87ee8223a871a007416d1b059c5eded189c52fd3..0000000000000000000000000000000000000000
--- a/quality-metrics/docs/sample-dashboards/tfa_complexity.json
+++ /dev/null
@@ -1,487 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 0,
- "id": 5,
- "iteration": 1600199355075,
- "links": [],
- "panels": [
- {
- "content": "
First table shows the details for the latest tag and the second table shows the details for the selected \"Target Tag\". ",
- "datasource": null,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "gridPos": {
- "h": 2,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "id": 6,
- "links": [],
- "mode": "html",
- "options": {
- "content": "First table shows the details for the latest tag and the second table shows the details for the selected \"Target Tag\". ",
- "mode": "html"
- },
- "pluginVersion": "7.1.0",
- "title": "Please note that when \"yes\" is selected from the above drop-down, data for both whitelisted and non-whitelisted functions is shown. Currently there are 0 whitelisted functions for TF-A.",
- "type": "text"
- },
- {
- "aliasColors": {},
- "bars": true,
- "dashLength": 10,
- "dashes": false,
- "datasource": "TFA_Complexity",
- "description": "Tracking the number of functions exceeding threshold",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 2
- },
- "hiddenSeries": false,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": false,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.3",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "$tag_Target_Tag",
- "dsType": "influxdb",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT max(Functions_Exceeding_Threshold_Not_Whitelisted) FROM \"TFA_Complexity_Tracking\" where ((Whitelisted =~ /^$Whitelisted$/ OR Whitelisted =~ /^no$/) AND $timeFilter) group by Target_Tag, Git_Tag_Date order by time",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "TFA Complexity Tracking",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "series",
- "name": null,
- "show": true,
- "values": [
- "max"
- ]
- },
- "yaxes": [
- {
- "decimals": 0,
- "format": "short",
- "label": "Functions Exceeding Threshold",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "columns": [],
- "datasource": "TFA_Complexity",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 11
- },
- "id": 4,
- "links": [],
- "pageSize": 100,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "dsType": "influxdb",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT Base_Tag, Function_ID, Location, Score, Threshold, Whitelisted FROM \"TFA_Complexity_Statistics\" where ((Whitelisted =~ /^$Whitelisted$/ OR Whitelisted =~ /^no$/) AND $timeFilter AND Target_Tag =~ /^$TargetTag1$/) GROUP BY Target_Tag",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "TFA Complexity Statistics for Target Tag $TargetTag1",
- "transform": "table",
- "type": "table-old"
- },
- {
- "columns": [],
- "datasource": "TFA_Complexity",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 20
- },
- "id": 7,
- "links": [],
- "pageSize": 100,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "dsType": "influxdb",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT Base_Tag, Function_ID, Location, Score, Threshold, Whitelisted FROM \"TFA_Complexity_Statistics\" where ((Whitelisted =~ /^$Whitelisted$/ OR Whitelisted =~ /^no$/) AND Target_Tag =~ /^$TargetTag2$/) GROUP BY Target_Tag",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "TFA Complexity Statistics for Target Tag $TargetTag2",
- "transform": "table",
- "type": "table-old"
- }
- ],
- "schemaVersion": 26,
- "style": "dark",
- "tags": [
- "TFA_QUALITY_METRICS"
- ],
- "templating": {
- "list": [
- {
- "allValue": null,
- "current": {
- "tags": [],
- "text": "no",
- "value": "no"
- },
- "hide": 0,
- "includeAll": false,
- "label": "Show data including \"whitelisted\" functions?",
- "multi": false,
- "name": "Whitelisted",
- "options": [
- {
- "selected": false,
- "text": "yes",
- "value": "yes"
- },
- {
- "selected": true,
- "text": "no",
- "value": "no"
- }
- ],
- "query": "yes,no",
- "skipUrlSync": false,
- "type": "custom"
- },
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "v2.3",
- "value": "v2.3"
- },
- "datasource": "TFA_Complexity",
- "definition": "SELECT LAST(Target_Tag) FROM (SELECT Target_Tag, Function_ID FROM TFA_Complexity_Statistics)",
- "hide": 2,
- "includeAll": false,
- "label": "Target Tag 1",
- "multi": false,
- "name": "TargetTag1",
- "options": [],
- "query": "SELECT LAST(Target_Tag) FROM (SELECT Target_Tag, Function_ID FROM TFA_Complexity_Statistics)",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "v2.0",
- "value": "v2.0"
- },
- "datasource": "TFA_Complexity",
- "definition": "SHOW TAG VALUES WITH KEY=\"Target_Tag\"",
- "hide": 0,
- "includeAll": false,
- "label": "Target Tag",
- "multi": false,
- "name": "TargetTag2",
- "options": [],
- "query": "SHOW TAG VALUES WITH KEY=\"Target_Tag\"",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-2y",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "timezone": "",
- "title": "TFA_Complexity",
- "uid": "tfa-complexity",
- "version": 6
-}
\ No newline at end of file
diff --git a/quality-metrics/docs/sample-dashboards/tfa_defects.json b/quality-metrics/docs/sample-dashboards/tfa_defects.json
deleted file mode 100644
index 17b7f1e338a700e268a8755bd36df8bca3274389..0000000000000000000000000000000000000000
--- a/quality-metrics/docs/sample-dashboards/tfa_defects.json
+++ /dev/null
@@ -1,275 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 0,
- "id": 6,
- "links": [],
- "panels": [
- {
- "aliasColors": {},
- "bars": true,
- "dashLength": 10,
- "dashes": false,
- "datasource": "TFA_Defects",
- "decimals": 0,
- "description": "Tracks the number of defects of TF-A per release tag",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 7,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "hiddenSeries": false,
- "id": 1,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": false,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.3",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "Total Defects",
- "dsType": "influxdb",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT last(Number_of_Defects) as Defects FROM \"TFA_Defects_Tracking\" where $timeFilter GROUP BY time(1w) fill(none)",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "TFA Defects Tracking",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "decimals": 0,
- "format": "short",
- "label": "Number of Defects",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "datasource": "TFA_Defects",
- "fieldConfig": {
- "defaults": {
- "custom": {
- "align": null
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 24,
- "x": 0,
- "y": 7
- },
- "id": 2,
- "links": [],
- "options": {
- "showHeader": true
- },
- "pluginVersion": "7.1.3",
- "targets": [
- {
- "alias": "",
- "dsType": "influxdb",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT * FROM \"TFA_Defects_Statistics\" where $timeFilter",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "TF-A Defects Statistics",
- "type": "table"
- }
- ],
- "refresh": "1d",
- "schemaVersion": 26,
- "style": "dark",
- "tags": [
- "TFA_QUALITY_METRICS"
- ],
- "templating": {
- "list": []
- },
- "time": {
- "from": "now-90d",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "timezone": "",
- "title": "TFA_Defects",
- "uid": "tfa-defects",
- "version": 6
-}
\ No newline at end of file
diff --git a/quality-metrics/docs/sample-dashboards/tfa_image_size.json b/quality-metrics/docs/sample-dashboards/tfa_image_size.json
deleted file mode 100644
index 8325e464aec7b3af6cfa097e79270c1d61eebf24..0000000000000000000000000000000000000000
--- a/quality-metrics/docs/sample-dashboards/tfa_image_size.json
+++ /dev/null
@@ -1,642 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "TFA_ImageSize",
- "enable": false,
- "hide": false,
- "iconColor": "#e0f9d7",
- "limit": 100,
- "name": "View PR Details",
- "query": "select PullRequestURL, Pull_Request_Title, CommitID, BL1_B, BL2_B, BL1U_B, BL2U_B, BL31_B, BL32_B from \"[[BuildConfig]]\"",
- "showIn": 0,
- "tagsColumn": "CommitID",
- "textColumn": "Pull_Request_Title",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 0,
- "id": 9,
- "iteration": 1600199357868,
- "links": [],
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "TFA_ImageSize",
- "decimals": 3,
- "description": "This shows the trend in image size of .ELF files for selected build config in stacked manner. The values are individually stacked, not cumulative.\n\nBuild Config and Bin Mode can be changed from the drop down at the top of dashboard.",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 2,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "hiddenSeries": false,
- "id": 10,
- "legend": {
- "avg": false,
- "current": true,
- "hideEmpty": true,
- "hideZero": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.3",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "$col",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT (\"BL1_B\" + \"BL1_D\" + \"BL1_R\" + \"BL1_T\" + \"BL1_W\") as bl1, (\"BL1U_B\" + \"BL1U_D\" + \"BL1U_R\" + \"BL1U_T\" + \"BL1U_W\") as bl1u, (\"BL2_B\" + \"BL2_D\" + \"BL2_R\" + \"BL2_T\" + \"BL2_W\") as bl2, (\"BL2U_B\" + \"BL2U_D\" + \"BL2U_R\" + \"BL2U_T\" + \"BL2U_W\") as bl2u, (\"BL31_B\" + \"BL31_D\" + \"BL31_R\" + \"BL31_T\" + \"BL31_W\") as bl31, (\"BL32_B\" + \"BL32_D\" + \"BL32_R\" + \"BL32_T\" + \"BL32_W\") as bl32 from \"$BuildConfig\" WHERE (\"BinMode\" =~ /^$BinMode$/ ) fill(0)",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "TF-A Image Size Time Series Graph for Selected Build Config ($BuildConfig) and Bin Mode ($BinMode)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "decimals": 3,
- "format": "decbytes",
- "label": "Image Size",
- "logBase": 1,
- "max": null,
- "min": "0",
- "show": true
- },
- {
- "format": "short",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "columns": [],
- "datasource": "TFA_ImageSize",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 9
- },
- "id": 4,
- "links": [],
- "pageSize": null,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 3,
- "pattern": "/^bl*/",
- "thresholds": [],
- "type": "number",
- "unit": "decbytes"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": true,
- "linkTargetBlank": true,
- "linkTooltip": "",
- "linkUrl": "${__cell:raw}",
- "pattern": "Pull Request URL",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT CommitTitle as \"Commit Title\", \"BinMode\", \"CommitID\" as \"Commit ID\", (\"BL1_B\" + \"BL1_D\" + \"BL1_R\" + \"BL1_T\" + \"BL1_W\") as bl1, (\"BL1U_B\" + \"BL1U_D\" + \"BL1U_R\" + \"BL1U_T\" + \"BL1U_W\") as bl1u, (\"BL2_B\" + \"BL2_D\" + \"BL2_R\" + \"BL2_T\" + \"BL2_W\") as bl2, (\"BL2U_B\" + \"BL2U_D\" + \"BL2U_R\" + \"BL2U_T\" + \"BL2U_W\") as bl2u, (\"BL31_B\" + \"BL31_D\" + \"BL31_R\" + \"BL31_T\" + \"BL31_W\") as bl31, (\"BL32_B\" + \"BL32_D\" + \"BL32_R\" + \"BL32_T\" + \"BL32_W\") as bl32 from \"$BuildConfig\" WHERE (\"BinMode\" =~ /^$BinMode$/ ) fill(0)",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "TF-A Image Size Details Table for $BuildConfig",
- "transform": "table",
- "type": "table-old"
- },
- {
- "aliasColors": {},
- "bars": true,
- "dashLength": 10,
- "dashes": false,
- "datasource": "TFA_ImageSize",
- "decimals": 3,
- "description": "",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 18
- },
- "hiddenSeries": false,
- "id": 8,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "hideEmpty": true,
- "hideZero": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "sideWidth": null,
- "total": false,
- "values": true
- },
- "lines": false,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.3",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "$col",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT *\nFROM \"$BuildConfig\"\nWHERE (\"CommitID\" =~ /^$CommitID$/ AND \"BinMode\" =~ /^$BinMode$/ )\nGROUP BY \"BinMode\", \"PullRequestURL\", \"CommitID\"",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Image size memory details for selected Commit ID ($CommitID) and Bin Mode ($BinMode) for $BuildConfig",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "series",
- "name": null,
- "show": true,
- "values": [
- "total"
- ]
- },
- "yaxes": [
- {
- "decimals": 3,
- "format": "decbytes",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "breakPoint": "50%",
- "cacheTimeout": null,
- "combine": {
- "label": "Others",
- "threshold": 0
- },
- "datasource": "TFA_ImageSize",
- "decimals": 3,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "80%",
- "format": "decbytes",
- "gridPos": {
- "h": 9,
- "w": 19,
- "x": 0,
- "y": 27
- },
- "id": 6,
- "interval": null,
- "legend": {
- "header": "Image Size",
- "show": true,
- "sideWidth": 300,
- "values": true
- },
- "legendType": "Right side",
- "links": [],
- "maxDataPoints": 3,
- "nullPointMode": "connected",
- "pieType": "pie",
- "strokeWidth": "2",
- "targets": [
- {
- "alias": "$col",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT (\"BL1_B\" + \"BL1_D\" + \"BL1_R\" + \"BL1_T\" + \"BL1_W\") as bl1, (\"BL1U_B\" + \"BL1U_D\" + \"BL1U_R\" + \"BL1U_T\" + \"BL1U_W\") as bl1u, (\"BL2_B\" + \"BL2_D\" + \"BL2_R\" + \"BL2_T\" + \"BL2_W\") as bl2, (\"BL2U_B\" + \"BL2U_D\" + \"BL2U_R\" + \"BL2U_T\" + \"BL2U_W\") as bl2u, (\"BL31_B\" + \"BL31_D\" + \"BL31_R\" + \"BL31_T\" + \"BL31_W\") as bl31, (\"BL32_B\" + \"BL32_D\" + \"BL32_R\" + \"BL32_T\" + \"BL32_W\") as bl32 \nFROM \"$BuildConfig\"\nWHERE (\"CommitID\" =~ /^$CommitID$/ AND (\"BinMode\" =~ /^$BinMode$/ ))\nGROUP BY \"CommitID\", \"PullRequestURL\", \"BinMode\" fill(0)\n",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "Image size pie chart for selected Commit ID ($CommitID) and Bin Mode ($BinMode) for $BuildConfig",
- "type": "grafana-piechart-panel",
- "valueName": "current"
- },
- {
- "content": "\"BlX_B\": Size of uninitialized data section\n\"BlX_D\": Size of initialized data section\n\"BlX_R\": Size of read only data section\n\"BlX_T\": Size of text (code) section\n\"BlX_V\": Size of weak object\n\"BlX_W\": Size of weak symbol\n\n
Build Config, Commit ID and Bin Mode can
\nbe changed from the drop down menu at
the top of\npage.",
- "datasource": null,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 5,
- "x": 19,
- "y": 27
- },
- "id": 12,
- "links": [],
- "mode": "html",
- "options": {
- "content": "\"BlX_B\": Size of uninitialized data section\n\"BlX_D\": Size of initialized data section\n\"BlX_R\": Size of read only data section\n\"BlX_T\": Size of text (code) section\n\"BlX_V\": Size of weak object\n\"BlX_W\": Size of weak symbol\n\n
Build Config, Commit ID and Bin Mode can
\nbe changed from the drop down menu at
the top of\npage.",
- "mode": "html"
- },
- "pluginVersion": "7.1.0",
- "title": "Memory Section Details:",
- "transparent": true,
- "type": "text"
- }
- ],
- "refresh": "1d",
- "schemaVersion": 26,
- "style": "dark",
- "tags": [
- "TFA_QUALITY_METRICS"
- ],
- "templating": {
- "list": [
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "poplar-default",
- "value": "poplar-default"
- },
- "datasource": "TFA_ImageSize",
- "definition": "",
- "hide": 0,
- "includeAll": false,
- "label": "Build Config",
- "multi": false,
- "name": "BuildConfig",
- "options": [],
- "query": "show measurements",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 1,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "9b2bf15016",
- "value": "9b2bf15016"
- },
- "datasource": "TFA_ImageSize",
- "definition": "",
- "hide": 0,
- "includeAll": false,
- "label": "Commit ID",
- "multi": false,
- "name": "CommitID",
- "options": [],
- "query": "SHOW TAG VALUES WITH KEY = \"CommitID\"",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "Debug",
- "value": "Debug"
- },
- "datasource": "TFA_ImageSize",
- "definition": "",
- "hide": 0,
- "includeAll": false,
- "label": "Bin Mode",
- "multi": false,
- "name": "BinMode",
- "options": [],
- "query": "SHOW TAG VALUES WITH KEY = \"BinMode\"",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-30d",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "timezone": "",
- "title": "TFA_Image_Size",
- "uid": "GkzYOKFiz",
- "version": 6
-}
\ No newline at end of file
diff --git a/quality-metrics/docs/sample-dashboards/tfa_misra_defects.json b/quality-metrics/docs/sample-dashboards/tfa_misra_defects.json
deleted file mode 100644
index 303e8021de39e0327af00e8d619d4644522ba5e0..0000000000000000000000000000000000000000
--- a/quality-metrics/docs/sample-dashboards/tfa_misra_defects.json
+++ /dev/null
@@ -1,897 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "TFA_MisraDefects",
- "enable": false,
- "hide": false,
- "iconColor": "#e0f9d7",
- "limit": 100,
- "name": "View PR Details",
- "query": "select PullRequestURL, Pull_Request_Title, CommitID, TotalDefects from \"[[BuildConfig]]\"",
- "showIn": 0,
- "tagsColumn": "CommitID",
- "textColumn": "Pull_Request_Title",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 0,
- "id": 8,
- "iteration": 1600199358960,
- "links": [],
- "panels": [
- {
- "aliasColors": {
- "MandatoryDefects": "#bf1b00",
- "RequiredDefects": "#eab839"
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "TFA_MisraDefects",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "hiddenSeries": false,
- "id": 2,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "null as zero",
- "percentage": false,
- "pluginVersion": "7.1.3",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "$col",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT TotalDefects FROM \"$BuildConfig\" WHERE (\"BinMode\" =~ /^Debug$/ )",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "$col",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT MandatoryDefects FROM \"$BuildConfig\" WHERE (\"BinMode\" =~ /^Debug$/ )",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "$col",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT RequiredDefects FROM \"$BuildConfig\" WHERE (\"BinMode\" =~ /^Debug$/ )",
- "rawQuery": true,
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "$col",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT AdvisoryDefects FROM \"$BuildConfig\" WHERE (\"BinMode\" =~ /^Debug$/ )",
- "rawQuery": true,
- "refId": "D",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "TF-A Misra Defects Time Series Graph for Selected Build Config ($BuildConfig) and Bin Mode Debug",
- "tooltip": {
- "shared": true,
- "sort": 1,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "columns": [],
- "datasource": "TFA_MisraDefects",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 9
- },
- "id": 4,
- "links": [],
- "pageSize": null,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": true,
- "linkTargetBlank": true,
- "linkTooltip": "",
- "linkUrl": "${__cell:raw} ",
- "pattern": "Pull Request URL",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 3,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT CommitTitle as \"Commit Title\", \"BinMode\", \"CommitID\" as \"Commit ID\", \"MandatoryDefects\" as \"Mandatory Defects\", \"RequiredDefects\" as \"Required Defects\", \"AdvisoryDefects\" as \"Advisory Defects\", \"TotalDefects\" as \"Total Defects\" from \"$BuildConfig\" WHERE (\"BinMode\" =~ /^Debug$/ )",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "TF-A Misra C Defects Details Table for $BuildConfig",
- "transform": "table",
- "type": "table-old"
- },
- {
- "columns": [],
- "datasource": "TFA_MisraDefects",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 5,
- "w": 24,
- "x": 0,
- "y": 18
- },
- "id": 6,
- "links": [],
- "pageSize": null,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "date"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": true,
- "linkTargetBlank": true,
- "linkTooltip": "",
- "linkUrl": "$__cell",
- "pattern": "Pull Request URL",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 3,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "alias": "$col",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \"CommitID\" as \"Commit ID\", CommitTitle as \"Commit Title\", \"BinMode\", \"MandatoryDefects\" as \"Mandatory Defects\", \"RequiredDefects\" as \"Required Defects\", \"AdvisoryDefects\" as \"Advisory Defects\", \"TotalDefects\" as \"Total Defects\" from \"$BuildConfig\" WHERE (\"BinMode\" =~ /^Debug$/ AND \"CommitID\" =~ /^$CommitID1$/ )",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \"CommitID\" as \"Commit ID\", CommitTitle as \"Commit Title\", \"BinMode\", \"MandatoryDefects\" as \"Mandatory Defects\", \"RequiredDefects\" as \"Required Defects\", \"AdvisoryDefects\" as \"Advisory Defects\", \"TotalDefects\" as \"Total Defects\" from \"$BuildConfig\" WHERE (\"BinMode\" =~ /^Debug$/ AND \"CommitID\" =~ /^$CommitID2$/ )",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "Comparison table between $CommitID1 and $CommitID2 for BinMode \"Debug\"",
- "transform": "table",
- "transparent": true,
- "type": "table-old"
- },
- {
- "aliasColors": {
- "Advisory Defects": "#ef843c",
- "Mandatory Defects": "#bf1b00",
- "Total Defects": "#629e51"
- },
- "bars": true,
- "dashLength": 10,
- "dashes": false,
- "datasource": "TFA_MisraDefects",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 23
- },
- "hiddenSeries": false,
- "id": 8,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": false,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.3",
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "Mandatory Defects",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT DIFFERENCE(\"MandatoryDefects\") FROM \"$BuildConfig\" WHERE ((\"CommitID\" =~ /^$CommitID1$/ AND (\"BinMode\" =~ /^Debug$/ )) OR (\"CommitID\" =~ /^$CommitID2$/ AND (\"BinMode\" =~ /^Debug$/ )))",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "Required Defects",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT DIFFERENCE(\"RequiredDefects\") FROM \"$BuildConfig\" WHERE ((\"CommitID\" =~ /^$CommitID1$/ AND (\"BinMode\" =~ /^Debug$/ )) OR (\"CommitID\" =~ /^$CommitID2$/ AND (\"BinMode\" =~ /^Debug$/ )))",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "Advisory Defects",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT DIFFERENCE(\"AdvisoryDefects\") FROM \"$BuildConfig\" WHERE ((\"CommitID\" =~ /^$CommitID1$/ AND (\"BinMode\" =~ /^Debug$/ )) OR (\"CommitID\" =~ /^$CommitID2$/ AND (\"BinMode\" =~ /^Debug$/ )))",
- "rawQuery": true,
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "Total Defects",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT DIFFERENCE(\"TotalDefects\") FROM \"$BuildConfig\" WHERE ((\"CommitID\" =~ /^$CommitID1$/ AND (\"BinMode\" =~ /^Debug$/ )) OR (\"CommitID\" =~ /^$CommitID2$/ AND (\"BinMode\" =~ /^Debug$/ )))",
- "rawQuery": true,
- "refId": "D",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "Comparison Chart between [$CommitID1,Debug] and [$CommitID2,Debug] Misra C Defects for \"$BuildConfig\"",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "transparent": true,
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "series",
- "name": null,
- "show": true,
- "values": [
- "total"
- ]
- },
- "yaxes": [
- {
- "format": "short",
- "label": "Difference in Misra C Defects",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- }
- ],
- "schemaVersion": 26,
- "style": "dark",
- "tags": [
- "TFA_QUALITY_METRICS"
- ],
- "templating": {
- "list": [
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "fvp-rst-bl31",
- "value": "fvp-rst-bl31"
- },
- "datasource": "TFA_MisraDefects",
- "definition": "",
- "hide": 0,
- "includeAll": false,
- "label": "Build Config",
- "multi": false,
- "name": "BuildConfig",
- "options": [],
- "query": "show measurements",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "9b2bf15016",
- "value": "9b2bf15016"
- },
- "datasource": "TFA_MisraDefects",
- "definition": "",
- "hide": 0,
- "includeAll": false,
- "label": "Commit ID 1",
- "multi": false,
- "name": "CommitID1",
- "options": [],
- "query": "SHOW TAG VALUES WITH KEY = \"CommitID\" ",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "a41ca4c344",
- "value": "a41ca4c344"
- },
- "datasource": "TFA_MisraDefects",
- "definition": "",
- "hide": 0,
- "includeAll": false,
- "label": "Commit ID 2",
- "multi": false,
- "name": "CommitID2",
- "options": [],
- "query": "SHOW TAG VALUES WITH KEY = \"CommitID\" ",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-30d",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "timezone": "",
- "title": "TFA_Misra_Defects",
- "uid": "41hRgW-mz",
- "version": 10
-}
\ No newline at end of file
diff --git a/quality-metrics/docs/sample-dashboards/tfa_runtime_perf_details.json b/quality-metrics/docs/sample-dashboards/tfa_runtime_perf_details.json
deleted file mode 100644
index bbe140bd49aaf683beab336373cd57d3fb4f6756..0000000000000000000000000000000000000000
--- a/quality-metrics/docs/sample-dashboards/tfa_runtime_perf_details.json
+++ /dev/null
@@ -1,1089 +0,0 @@
-{
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "TFA_RunTime_Perf",
- "enable": false,
- "hide": false,
- "iconColor": "#fce2de",
- "limit": 100,
- "name": "View Commit Details",
- "query": "select CommitTitle, CommitID, TC_Name, CPU_Core, CacheFlush, Latency_EL3Entry_EL3Exit from \"[[Instrumentation]]\" WHERE ($timeFilter AND \"TC_Name\" =~ /^$TestCase$/ AND \"CPU_Core\" =~ /^0/ AND \"Cluster_ID\" =~ /^0/) LIMIT 1000",
- "showIn": 0,
- "tagsColumn": "CommitID",
- "textColumn": "CommitTitle",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 0,
- "id": 10,
- "iteration": 1600199360656,
- "links": [],
- "panels": [
- {
- "aliasColors": {
- "Cluster ID: 0, CPU Core: 0": "#eab839",
- "Cluster ID: 0, CPU Core: 1": "#eab839",
- "Cluster ID: 1, CPU Core: 0": "#70dbed",
- "Cluster ID: 1, CPU Core: 1": "#70dbed",
- "Cluster ID: 1, CPU Core: 2": "#70dbed",
- "Cluster ID: 1, CPU Core: 3": "#70dbed",
- "Latency_CPUWakeup_EL3Exit for CPU Core 0": "#e24d42"
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "TFA_RunTime_Perf",
- "decimals": 3,
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "hiddenSeries": false,
- "id": 2,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "hideEmpty": true,
- "hideZero": false,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": false,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pluginVersion": "7.1.3",
- "pointradius": 3,
- "points": true,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "alias": "Cluster ID: 0, CPU Core: 0",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \"$Latency\" FROM \"$Instrumentation\" WHERE (\"TC_Name\" =~ /^$TestCase$/ AND \"CPU_Core\" =~ /^0/ AND \"Cluster_ID\" =~ /^0/)",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "Cluster ID: 0, CPU Core: 1",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \"$Latency\" FROM \"$Instrumentation\" WHERE (\"TC_Name\" =~ /^$TestCase$/ AND \"CPU_Core\" =~ /^1/ AND \"Cluster_ID\" =~ /^0/)",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "Cluster ID: 0, CPU Core: 2",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \"$Latency\" FROM \"$Instrumentation\" WHERE (\"TC_Name\" =~ /^$TestCase$/ AND \"CPU_Core\" =~ /^2/ AND \"Cluster_ID\" =~ /^0/)",
- "rawQuery": true,
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "Cluster ID: 0, CPU Core: 3",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \"$Latency\" FROM \"$Instrumentation\" WHERE (\"TC_Name\" =~ /^$TestCase$/ AND \"CPU_Core\" =~ /^3/ AND \"Cluster_ID\" =~ /^0/)",
- "rawQuery": true,
- "refId": "D",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "Cluster ID: 1, CPU Core: 0",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \"$Latency\" FROM \"$Instrumentation\" WHERE (\"TC_Name\" =~ /^$TestCase$/ AND \"CPU_Core\" =~ /^0/ AND \"Cluster_ID\" =~ /^1/)",
- "rawQuery": true,
- "refId": "E",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "Cluster ID: 1, CPU Core: 1",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \"$Latency\" FROM \"$Instrumentation\" WHERE (\"TC_Name\" =~ /^$TestCase$/ AND \"CPU_Core\" =~ /^1/ AND \"Cluster_ID\" =~ /^1/)",
- "rawQuery": true,
- "refId": "F",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "Cluster ID: 1, CPU Core: 2",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \"$Latency\" FROM \"$Instrumentation\" WHERE (\"TC_Name\" =~ /^$TestCase$/ AND \"CPU_Core\" =~ /^2/ AND \"Cluster_ID\" =~ /^1/)",
- "rawQuery": true,
- "refId": "G",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "alias": "Cluster ID: 1, CPU Core: 3",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT \"$Latency\" FROM \"$Instrumentation\" WHERE (\"TC_Name\" =~ /^$TestCase$/ AND \"CPU_Core\" =~ /^3/ AND \"Cluster_ID\" =~ /^1/)",
- "rawQuery": true,
- "refId": "H",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "[TC: $TestCase] $Latency Graph for $Instrumentation",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "transparent": true,
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "decimals": 3,
- "format": "µs",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": "0",
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "columns": [],
- "datasource": "TFA_RunTime_Perf",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "100%",
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 9
- },
- "id": 7,
- "links": [],
- "pageSize": null,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": 0,
- "desc": true
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "hidden"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 3,
- "pattern": "/^Max*/",
- "thresholds": [],
- "type": "number",
- "unit": "ns"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": true,
- "linkTargetBlank": true,
- "linkTooltip": "",
- "linkUrl": "${__cell:raw}",
- "pattern": "Pull_Request_URL",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT CommitID, CommitTitle as \"Commit Title\", Cluster_ID as \"Cluster ID\", MAX($Latency) AS \"Max $Latency\"\nFROM \"[[Instrumentation]]\" WHERE (TC_Name =~ /^$TestCase$/ AND Cluster_ID =~ /^0/) GROUP BY CommitID",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT CommitID, CommitTitle as \"Commit Title\", Cluster_ID as \"Cluster ID\", MAX($Latency) AS \"Max $Latency\"\nFROM \"[[Instrumentation]]\" WHERE (TC_Name =~ /^$TestCase$/ AND Cluster_ID =~ /^1/) GROUP BY CommitID",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "Details for selected instrumentation and test case ([[Instrumentation]], [[TestCase]])",
- "transform": "table",
- "type": "table-old"
- },
- {
- "columns": [],
- "datasource": "TFA_RunTime_Perf",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "110%",
- "gridPos": {
- "h": 3.7,
- "w": 12,
- "x": 0,
- "y": 18
- },
- "id": 4,
- "links": [],
- "pageSize": null,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": null,
- "desc": false
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "hidden"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 3,
- "pattern": "/^MAX*/",
- "thresholds": [],
- "type": "number",
- "unit": "ns"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT Cluster_ID, MAX(\"$Latency\") AS \"MAX($Latency)\" FROM \"[[Instrumentation]]\" WHERE (CommitID =~ /^$CommitID1$/ AND Cluster_ID =~ /^0/ AND \"TC_Name\" =~ /^$TestCase$/)",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT Cluster_ID, MAX(\"$Latency\") AS \"MAX($Latency)\" FROM \"[[Instrumentation]]\" WHERE (CommitID =~ /^$CommitID1$/ AND Cluster_ID =~ /^1/ AND \"TC_Name\" =~ /^$TestCase$/)",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "Max $Latency for Cluster IDs 0 and 1 for ($TestCase, $CommitID1)",
- "transform": "table",
- "transparent": true,
- "type": "table-old"
- },
- {
- "columns": [],
- "datasource": "TFA_RunTime_Perf",
- "fieldConfig": {
- "defaults": {
- "custom": {}
- },
- "overrides": []
- },
- "fontSize": "110%",
- "gridPos": {
- "h": 3.7,
- "w": 12,
- "x": 12,
- "y": 18
- },
- "id": 5,
- "links": [],
- "pageSize": null,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": null,
- "desc": false
- },
- "styles": [
- {
- "alias": "Time",
- "align": "auto",
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "hidden"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 3,
- "pattern": "/^MAX*/",
- "thresholds": [],
- "type": "number",
- "unit": "ns"
- },
- {
- "alias": "",
- "align": "auto",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "decimals": 2,
- "pattern": "/.*/",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- }
- ],
- "targets": [
- {
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT Cluster_ID, MAX(\"$Latency\") AS \"MAX($Latency)\" FROM \"[[Instrumentation]]\" WHERE (CommitID =~ /^$CommitID2$/ AND Cluster_ID =~ /^0/ AND \"TC_Name\" =~ /^$TestCase$/)",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- },
- {
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT Cluster_ID, MAX(\"$Latency\") AS \"MAX($Latency)\" FROM \"[[Instrumentation]]\" WHERE (CommitID =~ /^$CommitID2$/ AND Cluster_ID =~ /^1/ AND \"TC_Name\" =~ /^$TestCase$/)",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "table",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": []
- }
- ],
- "title": "Max $Latency for Cluster IDs 0 and 1 for ($TestCase, $CommitID2)",
- "transform": "table",
- "transparent": true,
- "type": "table-old"
- }
- ],
- "refresh": false,
- "schemaVersion": 26,
- "style": "dark",
- "tags": [
- "TFA_QUALITY_METRICS"
- ],
- "templating": {
- "list": [
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "juno-tftf+aarch32-rt32.instr-r2",
- "value": "juno-tftf+aarch32-rt32.instr-r2"
- },
- "datasource": "TFA_RunTime_Perf",
- "definition": "show measurements",
- "hide": 0,
- "includeAll": false,
- "label": "Instrumentation",
- "multi": false,
- "name": "Instrumentation",
- "options": [],
- "query": "show measurements",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "tags": [],
- "text": "testrtinstrpsciversionparallel",
- "value": "testrtinstrpsciversionparallel"
- },
- "hide": 0,
- "includeAll": false,
- "label": "Test Case",
- "multi": false,
- "name": "TestCase",
- "options": [
- {
- "selected": false,
- "text": "testrtinstrcpuoffserial",
- "value": "testrtinstrcpuoffserial"
- },
- {
- "selected": false,
- "text": "testrtinstrcpususpparallel",
- "value": "testrtinstrcpususpparallel"
- },
- {
- "selected": false,
- "text": "testrtinstrcpususpserial",
- "value": "testrtinstrcpususpserial"
- },
- {
- "selected": true,
- "text": "testrtinstrpsciversionparallel",
- "value": "testrtinstrpsciversionparallel"
- },
- {
- "selected": false,
- "text": "testrtinstrsuspdeepparallel",
- "value": "testrtinstrsuspdeepparallel"
- },
- {
- "selected": false,
- "text": "testrtinstrsuspdeepserial",
- "value": "testrtinstrsuspdeepserial"
- }
- ],
- "query": "testrtinstrcpuoffserial,testrtinstrcpususpparallel,testrtinstrcpususpserial,testrtinstrpsciversionparallel,testrtinstrsuspdeepparallel,testrtinstrsuspdeepserial",
- "skipUrlSync": false,
- "type": "custom"
- },
- {
- "allValue": null,
- "current": {
- "tags": [],
- "text": "Latency_EL3Entry_EL3Exit",
- "value": "Latency_EL3Entry_EL3Exit"
- },
- "hide": 0,
- "includeAll": false,
- "label": "Latency",
- "multi": false,
- "name": "Latency",
- "options": [
- {
- "selected": false,
- "text": "CacheFlush",
- "value": "CacheFlush"
- },
- {
- "selected": false,
- "text": "Latency_CPUWakeup_EL3Exit",
- "value": "Latency_CPUWakeup_EL3Exit"
- },
- {
- "selected": false,
- "text": "Latency_EL3Entry_CPUPowerDown",
- "value": "Latency_EL3Entry_CPUPowerDown"
- },
- {
- "selected": true,
- "text": "Latency_EL3Entry_EL3Exit",
- "value": "Latency_EL3Entry_EL3Exit"
- }
- ],
- "query": "CacheFlush,Latency_CPUWakeup_EL3Exit,Latency_EL3Entry_CPUPowerDown,Latency_EL3Entry_EL3Exit",
- "skipUrlSync": false,
- "type": "custom"
- },
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "e98d934aee",
- "value": "e98d934aee"
- },
- "datasource": "TFA_RunTime_Perf",
- "definition": "SHOW TAG VALUES WITH KEY=CommitID",
- "hide": 0,
- "includeAll": false,
- "label": "Commit ID 1",
- "multi": false,
- "name": "CommitID1",
- "options": [],
- "query": "SHOW TAG VALUES WITH KEY=CommitID",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": "e98d934aee",
- "value": "e98d934aee"
- },
- "datasource": "TFA_RunTime_Perf",
- "definition": "SHOW TAG VALUES WITH KEY=CommitID",
- "hide": 0,
- "includeAll": false,
- "label": "Commit ID 2",
- "multi": false,
- "name": "CommitID2",
- "options": [],
- "query": "SHOW TAG VALUES WITH KEY=CommitID",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-30d",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "timezone": "",
- "title": "TFA_RunTime_Perf_Details",
- "uid": "qqVv390mz",
- "version": 10
-}
\ No newline at end of file