Skip to content

Commit

Permalink
update query name (pingcap#1354)
Browse files Browse the repository at this point in the history
  • Loading branch information
YiniXu9506 authored and shhdgit committed Jul 21, 2022
1 parent e8c9101 commit f5442c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function Metrics() {
</Card>
<ChartContext.Provider value={useEventEmitter<PointerEvent>()}>
<Stack tokens={{ childrenGap: 16 }}>
<Card noMarginTop noMarginBottom noMarginRight>
<Card noMarginTop noMarginBottom>
{metricsItems.map((item) => (
<Collapse defaultActiveKey={['1']} ghost key={item.category}>
<Collapse.Panel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function transformColorByExecTimeOverview(legendLabel: string) {
return ColorType.BLUE_4
case 'Cop':
return ColorType.BLUE_1
case 'ScanLock':
case 'Scan':
return ColorType.PURPLE
case 'execute time':
Expand Down Expand Up @@ -140,7 +141,7 @@ const metricsItems = [
color: ColorType.GREEN_3
},
{
query: `sum(rate(tidb_server_get_token_duration_seconds_sum{sql_type="general"}[$__rate_interval]))/1000000`,
query: `sum(rate(tidb_server_get_token_duration_seconds_sum[$__rate_interval]))/1000000`,
name: 'get token',
color: ColorType.RED_3
}
Expand Down Expand Up @@ -572,13 +573,12 @@ const metricsItems = [
title: 'TiDB CPU Usage',
queries: [
{
query:
'rate(process_cpu_seconds_total{job="tidb"}[$__rate_interval])',
query: 'rate(process_cpu_seconds_total{job="tidb"}[30s])',
name: '{instance}'
}
],
nullValue: TransformNullValue.AS_ZERO,
unit: 'percent',
unit: 'percentunit',
type: 'line'
},
{
Expand All @@ -590,7 +590,7 @@ const metricsItems = [
}
],
nullValue: TransformNullValue.AS_ZERO,
unit: 'decbytes',
unit: 'bytes',
type: 'line'
},
{
Expand All @@ -613,7 +613,7 @@ const metricsItems = [
name: '{instance}'
}
],
unit: 'percent',
unit: 'percentunit',
type: 'line'
},
{
Expand All @@ -624,7 +624,7 @@ const metricsItems = [
name: '{instance}'
}
],
unit: 'decbytes',
unit: 'bytes',
type: 'line'
},
{
Expand All @@ -641,7 +641,7 @@ const metricsItems = [
name: '{instance}-read'
}
],
unit: 'KBs',
unit: 'Bps',
type: 'line'
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const overviewMetrics = [
],
nullValue: TransformNullValue.AS_ZERO,
unit: 'qps',
type: 'bar_stacked'
type: 'line'
},
{
title: 'latency',
Expand Down

0 comments on commit f5442c9

Please sign in to comment.