Skip to content

Commit 8d02d02

Browse files
authored
feat(perf): Use p50 instead of avg (#54772)
To match Trends, use p50 on the landing page widgets.
1 parent e9ec720 commit 8d02d02

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

static/app/views/performance/landing/widgets/components/widgetContainer.spec.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ describe('Performance > Widgets > WidgetContainer', function () {
243243
'transaction.op:pageload tpm():>0.01 count_percentage():>0.25 count_percentage():<4 trend_percentage():>0% confidence():>6',
244244
sort: 'trend_percentage()',
245245
statsPeriod: '14d',
246-
trendFunction: 'avg(transaction.duration)',
246+
trendFunction: 'p50(transaction.duration)',
247247
trendType: 'improved',
248248
}),
249249
})
@@ -838,7 +838,7 @@ describe('Performance > Widgets > WidgetContainer', function () {
838838
'transaction.op:pageload tpm():>0.01 count_percentage():>0.25 count_percentage():<4 trend_percentage():>0% confidence():>6',
839839
sort: 'trend_percentage()',
840840
statsPeriod: '7d',
841-
trendFunction: 'avg(transaction.duration)',
841+
trendFunction: 'p50(transaction.duration)',
842842
trendType: 'improved',
843843
}),
844844
})
@@ -874,7 +874,7 @@ describe('Performance > Widgets > WidgetContainer', function () {
874874
'transaction.op:pageload tpm():>0.01 count_percentage():>0.25 count_percentage():<4 trend_percentage():>0% confidence():>6',
875875
sort: '-trend_percentage()',
876876
statsPeriod: '7d',
877-
trendFunction: 'avg(transaction.duration)',
877+
trendFunction: 'p50(transaction.duration)',
878878
trendType: 'regression',
879879
}),
880880
})

static/app/views/performance/landing/widgets/widgets/trendsWidget.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function TrendsWidget(props: PerformanceWidgetProps) {
6868
? TrendChangeType.IMPROVED
6969
: TrendChangeType.REGRESSION;
7070
const derivedTrendChangeType = withBreakpoint ? TrendChangeType.ANY : trendChangeType;
71-
const trendFunctionField = TrendFunctionField.AVG; // Average is the easiest chart to understand.
71+
const trendFunctionField = TrendFunctionField.P50; // Setting p50 to match trends page
7272

7373
const [selectedListIndex, setSelectListIndex] = useState<number>(0);
7474

0 commit comments

Comments
 (0)