From c17a7ea87d1e853eb9faf229b6209ffe7f40adda Mon Sep 17 00:00:00 2001 From: beatrice-acasandrei <69891317+beatrice-acasandrei@users.noreply.github.com> Date: Fri, 26 Mar 2021 16:52:29 +0200 Subject: [PATCH] Bug 1699411 - Reduce filled bug summary * fix broken test --- .../cycle_data/test_perfherder_cycling.py | 27 ++- tests/ui/helpers/helpers_test.js | 65 +++++- .../alert_summary_downstream_regressions.json | 191 ++++++++++++++++++ .../alert_summary_improvements_only.json | 191 ++++++++++++++++++ .../alert_summary_invalid_regressions.json | 191 ++++++++++++++++++ ..._summary_regressions_and_improvements.json | 191 ++++++++++++++++++ ...rt_summary_regressions_and_reassigned.json | 191 ++++++++++++++++++ ...y_regressions_and_reassigned_to_other.json | 191 ++++++++++++++++++ .../alert_summary_with_one_regression.json | 191 ++++++++++++++++++ ui/perfherder/alerts/StatusDropdown.jsx | 11 +- ui/perfherder/constants.js | 2 + ui/perfherder/helpers.js | 99 +++++++++ 12 files changed, 1516 insertions(+), 25 deletions(-) create mode 100644 tests/ui/perfherder/filled_bug_alerts/alert_summary_downstream_regressions.json create mode 100644 tests/ui/perfherder/filled_bug_alerts/alert_summary_improvements_only.json create mode 100644 tests/ui/perfherder/filled_bug_alerts/alert_summary_invalid_regressions.json create mode 100644 tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_improvements.json create mode 100644 tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_reassigned.json create mode 100644 tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_reassigned_to_other.json create mode 100644 tests/ui/perfherder/filled_bug_alerts/alert_summary_with_one_regression.json diff --git a/tests/model/cycle_data/test_perfherder_cycling.py b/tests/model/cycle_data/test_perfherder_cycling.py index 85ec9ea79..920063a72 100644 --- a/tests/model/cycle_data/test_perfherder_cycling.py +++ b/tests/model/cycle_data/test_perfherder_cycling.py @@ -674,26 +674,25 @@ def test_one_month_worth_of_data_points( nr_months, repository, ): + assert nr_months >= 1 # as well need to subtract its start + covered_month_start = nr_months - 1 + test_repository.name = repository test_repository.save() - # Add 120 more days to timestamp because the concept of - # historical data is only for stalled data - timestamp = datetime.now() - timedelta(days=(nr_months * 30 + 120)) - start_date = datetime.now() - timedelta(days=(nr_months * 30 + 120)) - perf_signature = test_stalled_data_signature + stalled_signature = test_stalled_data_signature + timestamp = datetime.now() - timedelta(days=covered_month_start * 30) push = Push.objects.first() perf_data = [] - data_points_count = 2 * nr_months # Prepare test data: add data points to the parametrize month - for i in range(0, data_points_count): + for i in range(0, 15): data = PerformanceDatum.objects.create( - repository=perf_signature.repository, + repository=stalled_signature.repository, push=push, job=None, - signature=perf_signature, + signature=stalled_signature, push_timestamp=timestamp, value=1.0, ) @@ -701,21 +700,19 @@ def test_one_month_worth_of_data_points( timestamp += timedelta(days=30) data = PerformanceDatum.objects.create( - repository=perf_signature.repository, + repository=stalled_signature.repository, push=push, job=None, - signature=perf_signature, + signature=stalled_signature, push_timestamp=timestamp, value=1.0, ) perf_data.append(data) - num_months = (timestamp.year - start_date.year) * 12 + (timestamp.month - start_date.month) - assert num_months == 1 - call_command('cycle_data', 'from:perfherder') - assert PerformanceSignature.objects.filter(id=perf_signature.id).exists() + stalled_signature.refresh_from_db() + assert PerformanceSignature.objects.filter(id=stalled_signature.id).exists() all_perf_datum = PerformanceDatum.objects.all() for data_point in perf_data: assert data_point in all_perf_datum diff --git a/tests/ui/helpers/helpers_test.js b/tests/ui/helpers/helpers_test.js index 91acaf627..f08ba7599 100755 --- a/tests/ui/helpers/helpers_test.js +++ b/tests/ui/helpers/helpers_test.js @@ -1,5 +1,15 @@ -import { displayNumber } from '../../../ui/perfherder/helpers'; +import { + displayNumber, + getFilledBugSummary, +} from '../../../ui/perfherder/helpers'; import { getRevisionUrl } from '../../../ui/helpers/url'; +import testAlertSummaryImprovementsOnly from '../perfherder/filled_bug_alerts/alert_summary_improvements_only'; +import testAlertSummaryDownstreamRegressions from '../perfherder/filled_bug_alerts/alert_summary_downstream_regressions'; +import testAlertSummaryRegressionsAndImprovements from '../perfherder/filled_bug_alerts/alert_summary_regressions_and_improvements'; +import testAlertSummaryInvalidRegressions from '../perfherder/filled_bug_alerts/alert_summary_invalid_regressions'; +import testAlertSummaryWithOneRegression from '../perfherder/filled_bug_alerts/alert_summary_with_one_regression'; +import testAlertSummaryRegressionsAndReassigned from '../perfherder/filled_bug_alerts/alert_summary_regressions_and_reassigned'; +import testAlertSummaryRegressionsAndReassignedToOther from '../perfherder/filled_bug_alerts/alert_summary_regressions_and_reassigned_to_other'; describe('getRevisionUrl helper', () => { test('escapes some html symbols', () => { @@ -17,3 +27,56 @@ describe('displayNumber helper', () => { expect(displayNumber(Number.NaN)).toEqual('N/A'); }); }); + +test('getFilledBugSummary downstream regressions', async () => { + const result = getFilledBugSummary(testAlertSummaryDownstreamRegressions); + expect(result).toBe( + '10.67 - 2.53% MySuite Test3 / MySuite Test4 + 2 more (Android, OSX) regression on Fri March 19 2021', + ); +}); + +test('getFilledBugSummary improvements only', async () => { + const result = getFilledBugSummary(testAlertSummaryImprovementsOnly); + expect(result).toBe( + '10.67 - 2.53% MySuite Test3 / MySuite Test4 + 3 more (Android, Linux, OSX) regression on Fri March 19 2021', + ); +}); + +test('getFilledBugSummary invalid regressions', async () => { + const result = getFilledBugSummary(testAlertSummaryInvalidRegressions); + expect(result).toBe( + '10.67 - 2.75% MySuite Test3 / MySuite Test1 + 2 more (Linux, OSX) regression on Fri March 19 2021', + ); +}); + +test('getFilledBugSummary regressions and improvements', async () => { + const result = getFilledBugSummary( + testAlertSummaryRegressionsAndImprovements, + ); + expect(result).toBe( + '4.58 - 2.75% MySuite Test2 / MySuite Test1 + 1 more (Linux, OSX) regression on Fri March 19 2021', + ); +}); + +test('getFilledBugSummary regressions and reassigned', async () => { + const result = getFilledBugSummary(testAlertSummaryRegressionsAndReassigned); + expect(result).toBe( + '10.67 - 2.53% MySuite Test3 / MySuite Test4 + 3 more (Android, Linux, OSX) regression on Fri March 19 2021', + ); +}); + +test('getFilledBugSummary regressions and reassigned to other summary', async () => { + const result = getFilledBugSummary( + testAlertSummaryRegressionsAndReassignedToOther, + ); + expect(result).toBe( + '4.58 - 2.53% MySuite Test2 / MySuite Test4 + 1 more (Android, Linux, OSX) regression on Fri March 19 2021', + ); +}); + +test('getFilledBugSummary one regression', async () => { + const result = getFilledBugSummary(testAlertSummaryWithOneRegression); + expect(result).toBe( + '4.58% MySuite Test2 (Linux) regression on Fri March 19 2021', + ); +}); diff --git a/tests/ui/perfherder/filled_bug_alerts/alert_summary_downstream_regressions.json b/tests/ui/perfherder/filled_bug_alerts/alert_summary_downstream_regressions.json new file mode 100644 index 000000000..7fdda876b --- /dev/null +++ b/tests/ui/perfherder/filled_bug_alerts/alert_summary_downstream_regressions.json @@ -0,0 +1,191 @@ +{ + "id": 29340, + "push_id": 882462, + "prev_push_id": 882445, + "created": "2021-03-20T01:54:58.370401", + "repository": "autoland", + "framework": 6, + "alerts": [ + { + "id": 116590, + "status": 0, + "series_signature": { + "id": 2845686, + "framework_id": 6, + "signature_hash": "1a1e2bc4aa183f250e67cb19a5abc543666fcb9c", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test1", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1845.42, + "new_value": 1794.75, + "t_value": 9.52, + "amount_abs": -50.67, + "amount_pct": 2.75, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16DEFifteen macosx1014-64-qr opt " + }, + { + "id": 116589, + "status": 1, + "series_signature": { + "id": 2845675, + "framework_id": 6, + "signature_hash": "994db90ee403eea7ba77ce71723403728f34972b", + "machine_platform": "linux1014-64-qr", + "suite": "MySuite", + "test": "Test2", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1763.04, + "new_value": 1682.25, + "t_value": 8.43, + "amount_abs": -80.79, + "amount_pct": 18.08, + "summary_id": 29342, + "related_summary_id": 29340, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16ARThree macosx1014-64-qr opt " + }, + { + "id": 116588, + "status": 1, + "series_signature": { + "id": 2845674, + "framework_id": 6, + "signature_hash": "398bd123a1ea2dcc7188a0fbba73ac45ecf775d8", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test3", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1603.17, + "new_value": 1540.17, + "t_value": 7.91, + "amount_abs": -63, + "amount_pct": 10.67, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16AROne macosx1014-64-qr opt " + }, + { + "id": 116597, + "status": 0, + "series_signature": { + "id": 2845741, + "framework_id": 6, + "signature_hash": "7ca3e9c48c668cdb7083598a0094b01bed56563b", + "machine_platform": "android-4-0-armv7-api15", + "suite": "MySuite", + "test": "Test4", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1681.54, + "new_value": 1724.08, + "t_value": 10.26, + "amount_abs": 42.54, + "amount_pct": 2.53, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8VIFifteen macosx1014-64-qr opt " + }, + { + "id": 116596, + "status": 0, + "series_signature": { + "id": 2845703, + "framework_id": 6, + "signature_hash": "9354161dc64f82963388589e52366b44b28bf0e4", + "machine_platform": "macosx1014-64-qr", + "suite": "Strings", + "test": "PerfUTF16toUTF8THThousand", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 117897.33, + "new_value": 121948.33, + "t_value": 9.38, + "amount_abs": 4051, + "amount_pct": 3.44, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": "mozilla-ldap/igoldan@mozilla.com", + "starred": false, + "classifier_email": "igoldan@mozilla.com", + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8THThousand macosx1014-64-qr opt " + } + ], + "status": 0, + "bug_number": null, + "bug_updated": null, + "issue_tracker": 1, + "notes": null, + "revision": "eaff07d79af37c0040284ef9259db33fe5b00b63", + "push_timestamp": 1616162642, + "prev_push_revision": "abe088b82e73b9859232c624a609d7dc1ead9fe1", + "assignee_username": null, + "assignee_email": null, + "performance_tags": [] +} diff --git a/tests/ui/perfherder/filled_bug_alerts/alert_summary_improvements_only.json b/tests/ui/perfherder/filled_bug_alerts/alert_summary_improvements_only.json new file mode 100644 index 000000000..50b76eb7b --- /dev/null +++ b/tests/ui/perfherder/filled_bug_alerts/alert_summary_improvements_only.json @@ -0,0 +1,191 @@ +{ + "id": 29340, + "push_id": 882462, + "prev_push_id": 882445, + "created": "2021-03-20T01:54:58.370401", + "repository": "autoland", + "framework": 6, + "alerts": [ + { + "id": 116590, + "status": 0, + "series_signature": { + "id": 2845686, + "framework_id": 6, + "signature_hash": "1a1e2bc4aa183f250e67cb19a5abc543666fcb9c", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test1", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 1845.42, + "new_value": 1794.75, + "t_value": 9.52, + "amount_abs": -50.67, + "amount_pct": 2.75, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16DEFifteen macosx1014-64-qr opt " + }, + { + "id": 116589, + "status": 0, + "series_signature": { + "id": 2845675, + "framework_id": 6, + "signature_hash": "994db90ee403eea7ba77ce71723403728f34972b", + "machine_platform": "linux1014-64-qr", + "suite": "MySuite", + "test": "Test2", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 1763.04, + "new_value": 1682.25, + "t_value": 8.43, + "amount_abs": -80.79, + "amount_pct": 4.58, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16ARThree macosx1014-64-qr opt " + }, + { + "id": 116588, + "status": 0, + "series_signature": { + "id": 2845674, + "framework_id": 6, + "signature_hash": "398bd123a1ea2dcc7188a0fbba73ac45ecf775d8", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test3", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 1603.17, + "new_value": 1540.17, + "t_value": 7.91, + "amount_abs": -63, + "amount_pct": 10.67, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16AROne macosx1014-64-qr opt " + }, + { + "id": 116597, + "status": 0, + "series_signature": { + "id": 2845741, + "framework_id": 6, + "signature_hash": "7ca3e9c48c668cdb7083598a0094b01bed56563b", + "machine_platform": "android-4-0-armv7-api15", + "suite": "MySuite", + "test": "Test4", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 1681.54, + "new_value": 1724.08, + "t_value": 10.26, + "amount_abs": 42.54, + "amount_pct": 2.53, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8VIFifteen macosx1014-64-qr opt " + }, + { + "id": 116596, + "status": 0, + "series_signature": { + "id": 2845703, + "framework_id": 6, + "signature_hash": "9354161dc64f82963388589e52366b44b28bf0e4", + "machine_platform": "macosx1014-64-qr", + "suite": "Strings", + "test": "PerfUTF16toUTF8THThousand", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 117897.33, + "new_value": 121948.33, + "t_value": 9.38, + "amount_abs": 4051, + "amount_pct": 3.44, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": "mozilla-ldap/igoldan@mozilla.com", + "starred": false, + "classifier_email": "igoldan@mozilla.com", + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8THThousand macosx1014-64-qr opt " + } + ], + "status": 0, + "bug_number": null, + "bug_updated": null, + "issue_tracker": 1, + "notes": null, + "revision": "eaff07d79af37c0040284ef9259db33fe5b00b63", + "push_timestamp": 1616162642, + "prev_push_revision": "abe088b82e73b9859232c624a609d7dc1ead9fe1", + "assignee_username": null, + "assignee_email": null, + "performance_tags": [] +} diff --git a/tests/ui/perfherder/filled_bug_alerts/alert_summary_invalid_regressions.json b/tests/ui/perfherder/filled_bug_alerts/alert_summary_invalid_regressions.json new file mode 100644 index 000000000..8bcc5774f --- /dev/null +++ b/tests/ui/perfherder/filled_bug_alerts/alert_summary_invalid_regressions.json @@ -0,0 +1,191 @@ +{ + "id": 29340, + "push_id": 882462, + "prev_push_id": 882445, + "created": "2021-03-20T01:54:58.370401", + "repository": "autoland", + "framework": 6, + "alerts": [ + { + "id": 116590, + "status": 0, + "series_signature": { + "id": 2845686, + "framework_id": 6, + "signature_hash": "1a1e2bc4aa183f250e67cb19a5abc543666fcb9c", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test1", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1845.42, + "new_value": 1794.75, + "t_value": 9.52, + "amount_abs": -50.67, + "amount_pct": 2.75, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16DEFifteen macosx1014-64-qr opt " + }, + { + "id": 116589, + "status": 0, + "series_signature": { + "id": 2845675, + "framework_id": 6, + "signature_hash": "994db90ee403eea7ba77ce71723403728f34972b", + "machine_platform": "linux1014-64-qr", + "suite": "MySuite", + "test": "Test2", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1763.04, + "new_value": 1682.25, + "t_value": 8.43, + "amount_abs": -80.79, + "amount_pct": 4.58, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16ARThree macosx1014-64-qr opt " + }, + { + "id": 116588, + "status": 0, + "series_signature": { + "id": 2845674, + "framework_id": 6, + "signature_hash": "398bd123a1ea2dcc7188a0fbba73ac45ecf775d8", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test3", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1603.17, + "new_value": 1540.17, + "t_value": 7.91, + "amount_abs": -63, + "amount_pct": 10.67, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16AROne macosx1014-64-qr opt " + }, + { + "id": 116597, + "status": 3, + "series_signature": { + "id": 2845741, + "framework_id": 6, + "signature_hash": "7ca3e9c48c668cdb7083598a0094b01bed56563b", + "machine_platform": "android-4-0-armv7-api15", + "suite": "MySuite", + "test": "Test4", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1681.54, + "new_value": 1724.08, + "t_value": 10.26, + "amount_abs": 42.54, + "amount_pct": 2.53, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8VIFifteen macosx1014-64-qr opt " + }, + { + "id": 116596, + "status": 0, + "series_signature": { + "id": 2845703, + "framework_id": 6, + "signature_hash": "9354161dc64f82963388589e52366b44b28bf0e4", + "machine_platform": "macosx1014-64-qr", + "suite": "Strings", + "test": "PerfUTF16toUTF8THThousand", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 117897.33, + "new_value": 121948.33, + "t_value": 9.38, + "amount_abs": 4051, + "amount_pct": 3.44, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": "mozilla-ldap/igoldan@mozilla.com", + "starred": false, + "classifier_email": "igoldan@mozilla.com", + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8THThousand macosx1014-64-qr opt " + } + ], + "status": 0, + "bug_number": null, + "bug_updated": null, + "issue_tracker": 1, + "notes": null, + "revision": "eaff07d79af37c0040284ef9259db33fe5b00b63", + "push_timestamp": 1616162642, + "prev_push_revision": "abe088b82e73b9859232c624a609d7dc1ead9fe1", + "assignee_username": null, + "assignee_email": null, + "performance_tags": [] +} diff --git a/tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_improvements.json b/tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_improvements.json new file mode 100644 index 000000000..a5bfe907a --- /dev/null +++ b/tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_improvements.json @@ -0,0 +1,191 @@ +{ + "id": 29340, + "push_id": 882462, + "prev_push_id": 882445, + "created": "2021-03-20T01:54:58.370401", + "repository": "autoland", + "framework": 6, + "alerts": [ + { + "id": 116590, + "status": 0, + "series_signature": { + "id": 2845686, + "framework_id": 6, + "signature_hash": "1a1e2bc4aa183f250e67cb19a5abc543666fcb9c", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test1", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1845.42, + "new_value": 1794.75, + "t_value": 9.52, + "amount_abs": -50.67, + "amount_pct": 2.75, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16DEFifteen macosx1014-64-qr opt " + }, + { + "id": 116589, + "status": 0, + "series_signature": { + "id": 2845675, + "framework_id": 6, + "signature_hash": "994db90ee403eea7ba77ce71723403728f34972b", + "machine_platform": "linux1014-64-qr", + "suite": "MySuite", + "test": "Test2", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1763.04, + "new_value": 1682.25, + "t_value": 8.43, + "amount_abs": -80.79, + "amount_pct": 4.58, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16ARThree macosx1014-64-qr opt " + }, + { + "id": 116588, + "status": 0, + "series_signature": { + "id": 2845674, + "framework_id": 6, + "signature_hash": "398bd123a1ea2dcc7188a0fbba73ac45ecf775d8", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test3", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 1603.17, + "new_value": 1540.17, + "t_value": 7.91, + "amount_abs": -63, + "amount_pct": 10.67, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16AROne macosx1014-64-qr opt " + }, + { + "id": 116597, + "status": 0, + "series_signature": { + "id": 2845741, + "framework_id": 6, + "signature_hash": "7ca3e9c48c668cdb7083598a0094b01bed56563b", + "machine_platform": "android-4-0-armv7-api15", + "suite": "MySuite", + "test": "Test4", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 1681.54, + "new_value": 1724.08, + "t_value": 10.26, + "amount_abs": 42.54, + "amount_pct": 2.53, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8VIFifteen macosx1014-64-qr opt " + }, + { + "id": 116596, + "status": 0, + "series_signature": { + "id": 2845703, + "framework_id": 6, + "signature_hash": "9354161dc64f82963388589e52366b44b28bf0e4", + "machine_platform": "macosx1014-64-qr", + "suite": "Strings", + "test": "PerfUTF16toUTF8THThousand", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 117897.33, + "new_value": 121948.33, + "t_value": 9.38, + "amount_abs": 4051, + "amount_pct": 3.44, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": "mozilla-ldap/igoldan@mozilla.com", + "starred": false, + "classifier_email": "igoldan@mozilla.com", + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8THThousand macosx1014-64-qr opt " + } + ], + "status": 0, + "bug_number": null, + "bug_updated": null, + "issue_tracker": 1, + "notes": null, + "revision": "eaff07d79af37c0040284ef9259db33fe5b00b63", + "push_timestamp": 1616162642, + "prev_push_revision": "abe088b82e73b9859232c624a609d7dc1ead9fe1", + "assignee_username": null, + "assignee_email": null, + "performance_tags": [] +} diff --git a/tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_reassigned.json b/tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_reassigned.json new file mode 100644 index 000000000..58155c4a0 --- /dev/null +++ b/tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_reassigned.json @@ -0,0 +1,191 @@ +{ + "id": 29340, + "push_id": 882462, + "prev_push_id": 882445, + "created": "2021-03-20T01:54:58.370401", + "repository": "autoland", + "framework": 6, + "alerts": [ + { + "id": 116590, + "status": 0, + "series_signature": { + "id": 2845686, + "framework_id": 6, + "signature_hash": "1a1e2bc4aa183f250e67cb19a5abc543666fcb9c", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test1", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1845.42, + "new_value": 1794.75, + "t_value": 9.52, + "amount_abs": -50.67, + "amount_pct": 2.75, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16DEFifteen macosx1014-64-qr opt " + }, + { + "id": 116589, + "status": 0, + "series_signature": { + "id": 2845675, + "framework_id": 6, + "signature_hash": "994db90ee403eea7ba77ce71723403728f34972b", + "machine_platform": "linux1014-64-qr", + "suite": "MySuite", + "test": "Test2", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1763.04, + "new_value": 1682.25, + "t_value": 8.43, + "amount_abs": -80.79, + "amount_pct": 4.58, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16ARThree macosx1014-64-qr opt " + }, + { + "id": 116588, + "status": 2, + "series_signature": { + "id": 2845674, + "framework_id": 6, + "signature_hash": "398bd123a1ea2dcc7188a0fbba73ac45ecf775d8", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test3", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1603.17, + "new_value": 1540.17, + "t_value": 7.91, + "amount_abs": -63, + "amount_pct": 10.67, + "summary_id": 29342, + "related_summary_id": 29340, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16AROne macosx1014-64-qr opt " + }, + { + "id": 116597, + "status": 2, + "series_signature": { + "id": 2845741, + "framework_id": 6, + "signature_hash": "7ca3e9c48c668cdb7083598a0094b01bed56563b", + "machine_platform": "android-4-0-armv7-api15", + "suite": "MySuite", + "test": "Test4", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1681.54, + "new_value": 1724.08, + "t_value": 10.26, + "amount_abs": 42.54, + "amount_pct": 2.53, + "summary_id": 29343, + "related_summary_id": 29340, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8VIFifteen macosx1014-64-qr opt " + }, + { + "id": 116596, + "status": 0, + "series_signature": { + "id": 2845703, + "framework_id": 6, + "signature_hash": "9354161dc64f82963388589e52366b44b28bf0e4", + "machine_platform": "macosx1014-64-qr", + "suite": "Strings", + "test": "PerfUTF16toUTF8THThousand", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 117897.33, + "new_value": 121948.33, + "t_value": 9.38, + "amount_abs": 4051, + "amount_pct": 3.44, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": "mozilla-ldap/igoldan@mozilla.com", + "starred": false, + "classifier_email": "igoldan@mozilla.com", + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8THThousand macosx1014-64-qr opt " + } + ], + "status": 0, + "bug_number": null, + "bug_updated": null, + "issue_tracker": 1, + "notes": null, + "revision": "eaff07d79af37c0040284ef9259db33fe5b00b63", + "push_timestamp": 1616162642, + "prev_push_revision": "abe088b82e73b9859232c624a609d7dc1ead9fe1", + "assignee_username": null, + "assignee_email": null, + "performance_tags": [] +} diff --git a/tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_reassigned_to_other.json b/tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_reassigned_to_other.json new file mode 100644 index 000000000..266815983 --- /dev/null +++ b/tests/ui/perfherder/filled_bug_alerts/alert_summary_regressions_and_reassigned_to_other.json @@ -0,0 +1,191 @@ +{ + "id": 29340, + "push_id": 882462, + "prev_push_id": 882445, + "created": "2021-03-20T01:54:58.370401", + "repository": "autoland", + "framework": 6, + "alerts": [ + { + "id": 116590, + "status": 0, + "series_signature": { + "id": 2845686, + "framework_id": 6, + "signature_hash": "1a1e2bc4aa183f250e67cb19a5abc543666fcb9c", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test1", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1845.42, + "new_value": 1794.75, + "t_value": 9.52, + "amount_abs": -50.67, + "amount_pct": 2.75, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16DEFifteen macosx1014-64-qr opt " + }, + { + "id": 116589, + "status": 0, + "series_signature": { + "id": 2845675, + "framework_id": 6, + "signature_hash": "994db90ee403eea7ba77ce71723403728f34972b", + "machine_platform": "linux1014-64-qr", + "suite": "MySuite", + "test": "Test2", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1763.04, + "new_value": 1682.25, + "t_value": 8.43, + "amount_abs": -80.79, + "amount_pct": 4.58, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16ARThree macosx1014-64-qr opt " + }, + { + "id": 116588, + "status": 2, + "series_signature": { + "id": 2845674, + "framework_id": 6, + "signature_hash": "398bd123a1ea2dcc7188a0fbba73ac45ecf775d8", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test3", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1603.17, + "new_value": 1540.17, + "t_value": 7.91, + "amount_abs": -63, + "amount_pct": 10.67, + "summary_id": 29340, + "related_summary_id": 29341, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16AROne macosx1014-64-qr opt " + }, + { + "id": 116597, + "status": 0, + "series_signature": { + "id": 2845741, + "framework_id": 6, + "signature_hash": "7ca3e9c48c668cdb7083598a0094b01bed56563b", + "machine_platform": "android-4-0-armv7-api15", + "suite": "MySuite", + "test": "Test4", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1681.54, + "new_value": 1724.08, + "t_value": 10.26, + "amount_abs": 42.54, + "amount_pct": 2.53, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8VIFifteen macosx1014-64-qr opt " + }, + { + "id": 116596, + "status": 2, + "series_signature": { + "id": 2845703, + "framework_id": 6, + "signature_hash": "9354161dc64f82963388589e52366b44b28bf0e4", + "machine_platform": "windows-64-qr", + "suite": "Strings", + "test": "PerfUTF16toUTF8THThousand", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 117897.33, + "new_value": 121948.33, + "t_value": 9.38, + "amount_abs": 4051, + "amount_pct": 3.44, + "summary_id": 29340, + "related_summary_id": 29341, + "manually_created": false, + "classifier": "mozilla-ldap/igoldan@mozilla.com", + "starred": false, + "classifier_email": "igoldan@mozilla.com", + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8THThousand macosx1014-64-qr opt " + } + ], + "status": 0, + "bug_number": null, + "bug_updated": null, + "issue_tracker": 1, + "notes": null, + "revision": "eaff07d79af37c0040284ef9259db33fe5b00b63", + "push_timestamp": 1616162642, + "prev_push_revision": "abe088b82e73b9859232c624a609d7dc1ead9fe1", + "assignee_username": null, + "assignee_email": null, + "performance_tags": [] +} diff --git a/tests/ui/perfherder/filled_bug_alerts/alert_summary_with_one_regression.json b/tests/ui/perfherder/filled_bug_alerts/alert_summary_with_one_regression.json new file mode 100644 index 000000000..414a2a328 --- /dev/null +++ b/tests/ui/perfherder/filled_bug_alerts/alert_summary_with_one_regression.json @@ -0,0 +1,191 @@ +{ + "id": 29340, + "push_id": 882462, + "prev_push_id": 882445, + "created": "2021-03-20T01:54:58.370401", + "repository": "autoland", + "framework": 6, + "alerts": [ + { + "id": 116590, + "status": 0, + "series_signature": { + "id": 2845686, + "framework_id": 6, + "signature_hash": "1a1e2bc4aa183f250e67cb19a5abc543666fcb9c", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test1", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 1845.42, + "new_value": 1794.75, + "t_value": 9.52, + "amount_abs": -50.67, + "amount_pct": 2.75, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16DEFifteen macosx1014-64-qr opt " + }, + { + "id": 116589, + "status": 0, + "series_signature": { + "id": 2845675, + "framework_id": 6, + "signature_hash": "994db90ee403eea7ba77ce71723403728f34972b", + "machine_platform": "linux1014-64-qr", + "suite": "MySuite", + "test": "Test2", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": true, + "prev_value": 1763.04, + "new_value": 1682.25, + "t_value": 8.43, + "amount_abs": -80.79, + "amount_pct": 4.58, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16ARThree macosx1014-64-qr opt " + }, + { + "id": 116588, + "status": 0, + "series_signature": { + "id": 2845674, + "framework_id": 6, + "signature_hash": "398bd123a1ea2dcc7188a0fbba73ac45ecf775d8", + "machine_platform": "macosx1014-64-qr", + "suite": "MySuite", + "test": "Test3", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 1603.17, + "new_value": 1540.17, + "t_value": 7.91, + "amount_abs": -63, + "amount_pct": 10.67, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF8toUTF16AROne macosx1014-64-qr opt " + }, + { + "id": 116597, + "status": 0, + "series_signature": { + "id": 2845741, + "framework_id": 6, + "signature_hash": "7ca3e9c48c668cdb7083598a0094b01bed56563b", + "machine_platform": "android-4-0-armv7-api15", + "suite": "MySuite", + "test": "Test4", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 1681.54, + "new_value": 1724.08, + "t_value": 10.26, + "amount_abs": 42.54, + "amount_pct": 2.53, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": null, + "starred": false, + "classifier_email": null, + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8VIFifteen macosx1014-64-qr opt " + }, + { + "id": 116596, + "status": 0, + "series_signature": { + "id": 2845703, + "framework_id": 6, + "signature_hash": "9354161dc64f82963388589e52366b44b28bf0e4", + "machine_platform": "macosx1014-64-qr", + "suite": "Strings", + "test": "PerfUTF16toUTF8THThousand", + "lower_is_better": true, + "has_subtests": false, + "option_collection_hash": "102210fe594ee9b33d82058545b1ed14f4c8206e", + "tags": [""], + "extra_options": [""], + "measurement_unit": null, + "suite_public_name": null, + "test_public_name": null + }, + "is_regression": false, + "prev_value": 117897.33, + "new_value": 121948.33, + "t_value": 9.38, + "amount_abs": 4051, + "amount_pct": 3.44, + "summary_id": 29340, + "related_summary_id": null, + "manually_created": false, + "classifier": "mozilla-ldap/igoldan@mozilla.com", + "starred": false, + "classifier_email": "igoldan@mozilla.com", + "backfill_record": null, + "title": "Strings PerfUTF16toUTF8THThousand macosx1014-64-qr opt " + } + ], + "status": 0, + "bug_number": null, + "bug_updated": null, + "issue_tracker": 1, + "notes": null, + "revision": "eaff07d79af37c0040284ef9259db33fe5b00b63", + "push_timestamp": 1616162642, + "prev_push_revision": "abe088b82e73b9859232c624a609d7dc1ead9fe1", + "assignee_username": null, + "assignee_email": null, + "performance_tags": [] +} diff --git a/ui/perfherder/alerts/StatusDropdown.jsx b/ui/perfherder/alerts/StatusDropdown.jsx index 48a4c3cdd..703764349 100644 --- a/ui/perfherder/alerts/StatusDropdown.jsx +++ b/ui/perfherder/alerts/StatusDropdown.jsx @@ -8,14 +8,13 @@ import { Col, Label, } from 'reactstrap'; -import moment from 'moment'; import template from 'lodash/template'; import templateSettings from 'lodash/templateSettings'; import { getFrameworkName, getTextualSummary, - getTitle, + getFilledBugSummary, getStatus, updateAlertSummary, } from '../helpers'; @@ -120,13 +119,7 @@ export default class StatusDropdown extends React.Component { const fillTemplate = template(result.text); const commentText = fillTemplate(templateArgs); - const pushDate = moment(alertSummary.push_timestamp * 1000).format( - 'ddd MMMM D YYYY', - ); - - const bugTitle = `${getTitle(alertSummary)} regression on push ${ - alertSummary.revision - } (${pushDate})`; + const bugTitle = `${getFilledBugSummary(alertSummary)}`; const culpritDetails = await this.getCulpritDetails(culpritId); const defaultParams = { diff --git a/ui/perfherder/constants.js b/ui/perfherder/constants.js index 1b978e8a9..3f5247daf 100644 --- a/ui/perfherder/constants.js +++ b/ui/perfherder/constants.js @@ -49,6 +49,8 @@ export const notSupportedAlertFiltersMessage = (filters) => ', ', )}). Expected results might not be displayed.`; +export const availablePlatforms = ['Windows', 'Linux', 'OSX', 'Android']; + export const summaryStatusMap = { 'all statuses': -1, untriaged: 0, diff --git a/ui/perfherder/helpers.js b/ui/perfherder/helpers.js index 6c75f9e8a..2acd0ae2c 100644 --- a/ui/perfherder/helpers.js +++ b/ui/perfherder/helpers.js @@ -1,3 +1,4 @@ +import moment from 'moment'; import numeral from 'numeral'; import sortBy from 'lodash/sortBy'; import queryString from 'query-string'; @@ -16,6 +17,7 @@ import { tValueCareMin, tValueConfidence, noiseMetricTitle, + availablePlatforms, summaryStatusMap, alertStatusMap, phFrameworksWithRelatedBranches, @@ -507,6 +509,103 @@ export const getTextualSummary = ( return resultStr; }; +const getPlatformInfo = (platforms) => { + const platformInfo = []; + platforms.forEach((platform) => + availablePlatforms.forEach((name) => { + if (platform.includes(name.toLowerCase())) { + if (!platformInfo.includes(name)) { + platformInfo.push(name); + } + } + }), + ); + return platformInfo; +}; + +export const getFilledBugSummary = (alertSummary) => { + let filledBugSummary; + let maxMagnitudeAlert; + let minMagnitudeAlert; + + // we should never include downstream alerts in the description + let alertsInSummary = alertSummary.alerts.filter( + (alert) => + alert.status !== alertStatusMap.downstream || + alert.summary_id === alertSummary.id, + ); + + // figure out if there are any regressions -- if there are, + // the summary should only incorporate those. if there + // aren't, then use all of them (that aren't downstream, + // see above) + const regressions = alertsInSummary.filter((alert) => alert.is_regression); + if (regressions.length > 0) { + alertsInSummary = regressions; + } + + // reassigned and invalid alerts are excluded + alertsInSummary = [ + ...new Set( + alertsInSummary.filter( + (alert) => + (alert.related_summary_id === alertSummary.id || + alert.related_summary_id === null) && + alert.status !== alertStatusMap.invalid, + ), + ), + ]; + + if (alertsInSummary.length > 1) { + const maxMagnitude = Math.max( + ...alertsInSummary.map((alert) => alert.amount_pct), + ); + const minMagnitude = Math.min( + ...alertsInSummary.map((alert) => alert.amount_pct), + ); + maxMagnitudeAlert = alertsInSummary.find( + (alert) => alert.amount_pct === maxMagnitude, + ); + minMagnitudeAlert = alertsInSummary.find( + (alert) => alert.amount_pct === minMagnitude, + ); + filledBugSummary = `${maxMagnitude} - ${minMagnitude}%`; + } else if (alertsInSummary.length === 1) { + filledBugSummary = `${alertsInSummary[0].amount_pct}%`; + } else { + filledBugSummary = 'Empty alert'; + } + + // add test info + let testInfo = `${getTestName(alertsInSummary[0].series_signature)}`; + if (maxMagnitudeAlert && minMagnitudeAlert) { + testInfo = `${getTestName( + maxMagnitudeAlert.series_signature, + )} / ${getTestName(minMagnitudeAlert.series_signature)}`; + } + if (alertsInSummary.length > 2) { + testInfo += ` + ${alertsInSummary.length - 2} more`; + } + filledBugSummary += ` ${testInfo}`; + + // add platform info + const platforms = [ + ...new Set( + alertsInSummary.map((alert) => alert.series_signature.machine_platform), + ), + ]; + const platformInfo = getPlatformInfo(platforms).sort().join(', '); + filledBugSummary += ` (${platformInfo})`; + + // add push date info + const pushDate = moment(alertSummary.push_timestamp * 1000).format( + 'ddd MMMM D YYYY', + ); + filledBugSummary += ` regression on ${pushDate}`; + + return filledBugSummary; +}; + export const getTitle = (alertSummary) => { let title;