Skip to content

Instantly share code, notes, and snippets.

@jmaher
Created June 23, 2020 17:06
Show Gist options
  • Save jmaher/da0ef6052363f1f7c0c89e7255a74b96 to your computer and use it in GitHub Desktop.
Save jmaher/da0ef6052363f1f7c0c89e7255a74b96 to your computer and use it in GitHub Desktop.
SET @frameworks = 'raptor,browsertime,talos,awsy';
SELECT summary.bug_number AS bug_number,
alert.created,
alert.is_regression,
commit.revision,
job_type.name
FROM performance_alert AS alert
INNER JOIN performance_alert_summary AS summary ON ((alert.related_summary_id IS NULL AND summary.id = alert.summary_id) OR summary.id = alert.related_summary_id)
INNER JOIN performance_alert_summary AS original_summary ON original_summary.id = alert.summary_id
INNER JOIN performance_signature AS signature ON signature.id = alert.series_signature_id
INNER JOIN performance_framework AS framework ON framework.id = signature.framework_id
INNER JOIN commit AS commit ON commit.push_id = original_summary.push_id
INNER JOIN performance_datum as datum ON (datum.push_id = commit.push_id and datum.signature_id = signature.id)
INNER JOIN job as job on job.id = datum.job_id
INNER JOIN job_type as job_type on job_type.id = job.job_type_id
WHERE FIND_IN_SET(framework.name, @frameworks)
AND summary.status in (7, 8)
AND (summary.notes IS NULL OR summary.notes NOT LIKE '%#harness%') -- ignore harness updates
AND (summary.notes IS NULL OR summary.notes NOT LIKE '%#infra%') -- ignore false alerts caused by infra changes
AND alert.created >= "2020-01-01"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment