зеркало из https://github.com/mozilla/treeherder.git
Bug 1670936 - Remove deprecated columns from performance_datum table
This commit is contained in:
Родитель
ab48a51a44
Коммит
fc08ce1ebd
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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':
|
||||
|
|
|
@ -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',
|
||||
),
|
||||
]
|
|
@ -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 = [
|
||||
|
|
Загрузка…
Ссылка в новой задаче