@@ -3,7 +3,7 @@ import {useTheme} from '@emotion/react';
3
3
import { t } from 'sentry/locale' ;
4
4
import { EChartClickHandler , EChartHighlightHandler , Series } from 'sentry/types/echarts' ;
5
5
import { usePageError } from 'sentry/utils/performance/contexts/pageError' ;
6
- import { P95_COLOR } from 'sentry/views/starfish/colours' ;
6
+ import { AVG_COLOR } from 'sentry/views/starfish/colours' ;
7
7
import Chart from 'sentry/views/starfish/components/chart' ;
8
8
import { isNearBaseline } from 'sentry/views/starfish/components/samplesTable/common' ;
9
9
import { useSpanMetrics } from 'sentry/views/starfish/queries/useSpanMetrics' ;
@@ -39,16 +39,16 @@ function DurationChart({
39
39
40
40
const getSampleSymbol = (
41
41
duration : number ,
42
- p95 : number
42
+ compareToDuration : number
43
43
) : { color : string ; symbol : string } => {
44
- if ( isNearBaseline ( duration , p95 ) ) {
44
+ if ( isNearBaseline ( duration , compareToDuration ) ) {
45
45
return {
46
46
symbol : 'path://M 0 0 V -8 L 5 0 L 0 8 L -5 0 L 0 -8' ,
47
47
color : theme . gray300 ,
48
48
} ;
49
49
}
50
50
51
- return duration > p95
51
+ return duration > compareToDuration
52
52
? {
53
53
symbol : 'path://M 5 4 L 0 -4 L -5 4 L 5 4' ,
54
54
color : theme . red300 ,
@@ -66,18 +66,18 @@ function DurationChart({
66
66
} = useSpanMetricsSeries (
67
67
groupId ,
68
68
{ transactionName, 'transaction.method' : transactionMethod } ,
69
- [ `p95 (${ SPAN_SELF_TIME } )` ] ,
69
+ [ `avg (${ SPAN_SELF_TIME } )` ] ,
70
70
'api.starfish.sidebar-span-metrics-chart'
71
71
) ;
72
72
73
73
const { data : spanMetrics , error : spanMetricsError } = useSpanMetrics (
74
74
groupId ,
75
75
{ transactionName, 'transaction.method' : transactionMethod } ,
76
- [ `p95 (${ SPAN_SELF_TIME } )` , SPAN_OP ] ,
77
- 'api.starfish.span-summary-panel-samples-table-p95 '
76
+ [ `avg (${ SPAN_SELF_TIME } )` , SPAN_OP ] ,
77
+ 'api.starfish.span-summary-panel-samples-table-avg '
78
78
) ;
79
79
80
- const p95 = spanMetrics ?. [ `p95 (${ SPAN_SELF_TIME } )` ] || 0 ;
80
+ const avg = spanMetrics ?. [ `avg (${ SPAN_SELF_TIME } )` ] || 0 ;
81
81
82
82
const {
83
83
data : spans ,
@@ -89,11 +89,11 @@ function DurationChart({
89
89
transactionMethod,
90
90
} ) ;
91
91
92
- const baselineP95Series : Series = {
93
- seriesName : 'Baseline P95 ' ,
92
+ const baselineAvgSeries : Series = {
93
+ seriesName : 'Baseline Average ' ,
94
94
data : [ ] ,
95
95
markLine : {
96
- data : [ { valueDim : 'x' , yAxis : p95 } ] ,
96
+ data : [ { valueDim : 'x' , yAxis : avg } ] ,
97
97
symbol : [ 'none' , 'none' ] ,
98
98
lineStyle : {
99
99
color : theme . gray400 ,
@@ -102,7 +102,7 @@ function DurationChart({
102
102
label : {
103
103
fontSize : 11 ,
104
104
position : 'insideEndBottom' ,
105
- formatter : ( ) => 'Baseline P95 ' ,
105
+ formatter : ( ) => 'Baseline Average ' ,
106
106
} ,
107
107
} ,
108
108
} ;
@@ -120,8 +120,8 @@ function DurationChart({
120
120
value : duration ,
121
121
} ,
122
122
] ,
123
- symbol : getSampleSymbol ( duration , p95 ) . symbol ,
124
- color : getSampleSymbol ( duration , p95 ) . color ,
123
+ symbol : getSampleSymbol ( duration , avg ) . symbol ,
124
+ color : getSampleSymbol ( duration , avg ) . color ,
125
125
symbolSize : span_id === highlightedSpanId ? 15 : 10 ,
126
126
seriesName : transaction_id . substring ( 0 , 8 ) ,
127
127
} )
@@ -170,21 +170,21 @@ function DurationChart({
170
170
171
171
return (
172
172
< div onMouseLeave = { handleMouseLeave } >
173
- < h5 > { DataTitles . p95 } </ h5 >
173
+ < h5 > { DataTitles . avg } </ h5 >
174
174
< Chart
175
175
height = { 140 }
176
176
onClick = { handleChartClick }
177
177
onHighlight = { handleChartHighlight }
178
178
aggregateOutputFormat = "duration"
179
- data = { [ spanMetricsSeriesData ?. [ `p95 (${ SPAN_SELF_TIME } )` ] , baselineP95Series ] }
179
+ data = { [ spanMetricsSeriesData ?. [ `avg (${ SPAN_SELF_TIME } )` ] , baselineAvgSeries ] }
180
180
loading = { isLoading }
181
181
scatterPlot = {
182
182
areSpanSamplesLoading || areSpanSamplesRefetching
183
183
? undefined
184
184
: sampledSpanDataSeries
185
185
}
186
186
utc = { false }
187
- chartColors = { [ P95_COLOR , 'black' ] }
187
+ chartColors = { [ AVG_COLOR , 'black' ] }
188
188
isLineChart
189
189
definedAxisTicks = { 4 }
190
190
/>
0 commit comments