Skip to content

Commit

Permalink
Shorten field name
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrice-acasandrei authored and Archaeopteryx committed Sep 14, 2023
1 parent 8933660 commit 1cc3a5e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
16 changes: 8 additions & 8 deletions tests/webapp/api/test_perfcompare_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def test_perfcompare_results_against_no_base(
'header_name': response['header_name'],
'base_repository_name': base_sig.repository.name,
'new_repository_name': new_sig.repository.name,
'base_application': 'firefox',
'new_application': 'geckoview',
'base_app': 'firefox',
'new_app': 'geckoview',
'is_complete': response['is_complete'],
'base_measurement_unit': base_sig.measurement_unit,
'new_measurement_unit': new_sig.measurement_unit,
Expand Down Expand Up @@ -267,8 +267,8 @@ def test_perfcompare_results_with_only_one_run_and_diff_repo(
'header_name': response['header_name'],
'base_repository_name': base_sig.repository.name,
'new_repository_name': new_sig.repository.name,
'base_application': 'firefox',
'new_application': 'geckoview',
'base_app': 'firefox',
'new_app': 'geckoview',
'is_complete': response['is_complete'],
'base_measurement_unit': base_sig.measurement_unit,
'new_measurement_unit': new_sig.measurement_unit,
Expand Down Expand Up @@ -425,8 +425,8 @@ def test_perfcompare_results_multiple_runs(
'header_name': first_row['header_name'],
'base_repository_name': sig1.repository.name,
'new_repository_name': sig2.repository.name,
'base_application': '',
'new_application': '',
'base_app': '',
'new_app': '',
'is_complete': first_row['is_complete'],
'base_measurement_unit': sig1.measurement_unit,
'new_measurement_unit': sig2.measurement_unit,
Expand Down Expand Up @@ -471,8 +471,8 @@ def test_perfcompare_results_multiple_runs(
'header_name': second_row['header_name'],
'base_repository_name': sig3.repository.name,
'new_repository_name': sig4.repository.name,
'base_application': '',
'new_application': '',
'base_app': '',
'new_app': '',
'is_complete': second_row['is_complete'],
'base_measurement_unit': sig3.measurement_unit,
'new_measurement_unit': sig4.measurement_unit,
Expand Down
7 changes: 2 additions & 5 deletions treeherder/webapp/api/performance_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,9 +922,6 @@ def list(self, request):
new_is_better, base_avg_value, new_avg_value, confidence
)

base_application = base_sig.get('application', '')
new_application = new_sig.get('application', '')

is_improvement = class_name == 'success'
is_regression = class_name == 'danger'
is_meaningful = class_name == ''
Expand All @@ -934,8 +931,8 @@ def list(self, request):
'new_rev': new_rev,
'header_name': header,
'platform': platform,
'base_application': base_application,
'new_application': new_application,
'base_app': base_sig.get('application', ''),
'new_app': new_sig.get('application', ''),
'suite': base_sig.get('suite', ''), # same suite for base_result and new_result
'test': base_sig.get('test', ''), # same test for base_result and new_result
'is_complete': is_complete,
Expand Down
8 changes: 4 additions & 4 deletions treeherder/webapp/api/performance_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,11 @@ def validate(self, data):
class PerfCompareResultsSerializer(serializers.ModelSerializer):
base_rev = serializers.CharField()
new_rev = serializers.CharField()
base_application = serializers.CharField(
base_app = serializers.CharField(
max_length=10,
default='',
)
new_application = serializers.CharField(
new_app = serializers.CharField(
max_length=10,
default='',
)
Expand Down Expand Up @@ -497,8 +497,8 @@ class Meta:
fields = [
'base_rev',
'new_rev',
'base_application',
'new_application',
'base_app',
'new_app',
'framework_id',
'platform',
'suite',
Expand Down

0 comments on commit 1cc3a5e

Please sign in to comment.