diff --git a/tests/conftest.py b/tests/conftest.py index e901f6966..f24a7b62c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -788,11 +788,9 @@ def generate_enough_perf_datum(test_repository, test_perf_signature): # to generate the actual alert) for (push_id, value) in zip([1] * 30 + [2] * 30, [1] * 30 + [2] * 30): - # push_id == result_set_id == timestamp for purposes of this test push = Push.objects.get(id=push_id) PerformanceDatum.objects.create( repository=test_repository, - result_set_id=push_id, push_id=push_id, signature=test_perf_signature, value=value, diff --git a/tests/model/test_cycle_data.py b/tests/model/test_cycle_data.py index deb07f231..09e5ea04c 100644 --- a/tests/model/test_cycle_data.py +++ b/tests/model/test_cycle_data.py @@ -169,7 +169,6 @@ def test_cycle_job_with_performance_data( PerformanceDatum.objects.create( repository=test_repository, - result_set_id=1, push=test_job.push, job=test_job, signature=test_perf_signature, diff --git a/tests/perfalert/test_alerts/test_generate_alerts.py b/tests/perfalert/test_alerts/test_generate_alerts.py index 2d81515aa..378e53361 100644 --- a/tests/perfalert/test_alerts/test_generate_alerts.py +++ b/tests/perfalert/test_alerts/test_generate_alerts.py @@ -64,7 +64,6 @@ def _generate_performance_data( ) PerformanceDatum.objects.create( repository=test_repository, - result_set_id=t, push=push, signature=test_perf_signature, push_timestamp=datetime.datetime.utcfromtimestamp(base_timestamp + t), diff --git a/tests/webapp/api/test_performance_data_api.py b/tests/webapp/api/test_performance_data_api.py index 6a505b86f..c7626d525 100644 --- a/tests/webapp/api/test_performance_data_api.py +++ b/tests/webapp/api/test_performance_data_api.py @@ -220,7 +220,6 @@ def test_filter_data_by_framework( PerformanceDatum.objects.create( repository=signature.repository, push=push, - result_set_id=1, signature=signature, value=0.0, push_timestamp=push.time, @@ -317,7 +316,6 @@ def test_filter_data_by_interval( ) PerformanceDatum.objects.create( repository=test_perf_signature.repository, - result_set_id=push.id, push=push, signature=test_perf_signature, value=i, @@ -356,7 +354,6 @@ def test_filter_data_by_range( ) PerformanceDatum.objects.create( repository=test_perf_signature.repository, - result_set_id=push.id, push=push, signature=test_perf_signature, value=i, @@ -398,7 +395,6 @@ def test_filter_data_by_signature( for (i, signature) in enumerate([test_perf_signature, summary_perf_signature]): PerformanceDatum.objects.create( repository=signature.repository, - result_set_id=push.id, push=push, signature=signature, value=i, diff --git a/treeherder/client/thclient/perfherder.py b/treeherder/client/thclient/perfherder.py index 06db796b7..a36af2ab4 100644 --- a/treeherder/client/thclient/perfherder.py +++ b/treeherder/client/thclient/perfherder.py @@ -92,14 +92,13 @@ class PerformanceSeries(list): Represents a series of performance observations You can access the individual elements of the series by using the [] - syntax. For example, to get the result set ids and geometric means - in a summary series: + syntax. For example, to get the geometric means in a summary series: :: pc = PerfherderClient() signature = '9cfc271dab9b7fc2c1229736fecfbbc6e7c5fac9' series = pc.get_performance_data('mozilla-central', signature=signature)[signature] - (result_set_ids, geomeans) = (series['result_set_id'], series['geomean']) + geomeans = series['geomean'] """ def __getitem__(self, key): diff --git a/treeherder/perf/management/commands/create_test_perf_data.py b/treeherder/perf/management/commands/create_test_perf_data.py index 482475b4d..a55410ad4 100644 --- a/treeherder/perf/management/commands/create_test_perf_data.py +++ b/treeherder/perf/management/commands/create_test_perf_data.py @@ -46,8 +46,6 @@ Type 'yes' to continue, or 'no' to cancel: """ ): PerformanceDatum.objects.create( repository=s.repository, - result_set_id=t, - ds_job_id=t, signature=s, push_timestamp=datetime.datetime.utcfromtimestamp(now + (t * 60 * 60)), push_id=1, diff --git a/treeherder/perf/management/commands/test_analyze_perf.py b/treeherder/perf/management/commands/test_analyze_perf.py index d9f04ad8c..e5ac7503b 100644 --- a/treeherder/perf/management/commands/test_analyze_perf.py +++ b/treeherder/perf/management/commands/test_analyze_perf.py @@ -103,10 +103,8 @@ class Command(BaseCommand): data = [] - for (push_id, timestamp, value) in zip( - series['result_set_id'], series['push_timestamp'], series['value'] - ): - data.append(RevisionDatum(timestamp, value, testrun_id=push_id)) + for (timestamp, value) in zip(series['push_timestamp'], series['value']): + data.append(RevisionDatum(timestamp, value)) for r in detect_changes(data): if r.state == 'regression': diff --git a/treeherder/perf/migrations/0034_remove_performancedatum_fields.py b/treeherder/perf/migrations/0034_remove_performancedatum_fields.py new file mode 100644 index 000000000..c6eb1edf4 --- /dev/null +++ b/treeherder/perf/migrations/0034_remove_performancedatum_fields.py @@ -0,0 +1,21 @@ +# Generated by Django 3.0.8 on 2020-10-14 07:47 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('perf', '0033_permit_multi_data_per_job'), + ] + + operations = [ + migrations.RemoveField( + model_name='performancedatum', + name='ds_job_id', + ), + migrations.RemoveField( + model_name='performancedatum', + name='result_set_id', + ), + ] diff --git a/treeherder/perf/models.py b/treeherder/perf/models.py index a38576d19..4b7399a77 100644 --- a/treeherder/perf/models.py +++ b/treeherder/perf/models.py @@ -147,11 +147,6 @@ class PerformanceDatum(models.Model): job = models.ForeignKey(Job, null=True, default=None, on_delete=models.SET_NULL) push = models.ForeignKey(Push, on_delete=models.CASCADE) - # the following properties are obsolete and should be removed at some - # point - ds_job_id = models.PositiveIntegerField(db_column="ds_job_id", null=True) - result_set_id = models.PositiveIntegerField(null=True) - class Meta: db_table = 'performance_datum' index_together = [