This is an automated email from the ASF dual-hosted git repository. hanahmily pushed a commit to branch 6.0.0/dev in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-ui.git
The following commit(s) were added to refs/heads/6.0.0/dev by this push: new 91961c5 Fix bugs about integration test 91961c5 is described below commit 91961c5e821fe78c958355495fc0a12654b707a5 Author: Gao Hongtao <hanahm...@gmail.com> AuthorDate: Wed Oct 10 18:49:48 2018 +0800 Fix bugs about integration test --- query-protocol | 2 +- src/components/Topology/AppTopology.js | 3 ++ src/models/dashboard.js | 50 +++++++++++++++++++++++++++++++ src/models/endpoint.js | 55 ++++++++++++++++++++++++++++++++++ src/models/service.js | 20 ++++++------- src/routes/Dashboard/Dashboard.js | 18 +++++++++-- src/routes/Endpoint/Endpoint.js | 21 ++++++++++--- src/routes/Service/Service.js | 4 +-- 8 files changed, 154 insertions(+), 19 deletions(-) diff --git a/query-protocol b/query-protocol index 9762145..3a83be7 160000 --- a/query-protocol +++ b/query-protocol @@ -1 +1 @@ -Subproject commit 9762145c89ba6b70b48cc4cb0c886d7b9de18ec5 +Subproject commit 3a83be79a9c23aad6576ed2a4a04b82de6d7a829 diff --git a/src/components/Topology/AppTopology.js b/src/components/Topology/AppTopology.js index e583e91..2b60ab1 100644 --- a/src/components/Topology/AppTopology.js +++ b/src/components/Topology/AppTopology.js @@ -180,6 +180,9 @@ export default class AppTopology extends Base { if (!id) { return lLimit; } + if (range < 1) { + return lLimit; + } const value = values.find(_ => _.id === id); let v = min; if (value) { diff --git a/src/models/dashboard.js b/src/models/dashboard.js index de75220..5fe6df4 100644 --- a/src/models/dashboard.js +++ b/src/models/dashboard.js @@ -35,6 +35,21 @@ export default base({ nodes: [], responseTimeStep: 0, }, + getP99: { + values: [], + }, + getP95: { + values: [], + }, + getP90: { + values: [], + }, + getP75: { + values: [], + }, + getP50: { + values: [], + }, getTopNSlowEndpoint: [], getTopNServiceThroughput: [], }, @@ -76,6 +91,41 @@ export default base({ label: name value } + getP99: getLinearIntValues(metric: { + name: "service_p99" + }, duration: $duration) { + values { + value + } + } + getP95: getLinearIntValues(metric: { + name: "service_p95" + }, duration: $duration) { + values { + value + } + } + getP90: getLinearIntValues(metric: { + name: "service_p90" + }, duration: $duration) { + values { + value + } + } + getP75: getLinearIntValues(metric: { + name: "service_p75" + }, duration: $duration) { + values { + value + } + } + getP50: getLinearIntValues(metric: { + name: "service_p50" + }, duration: $duration) { + values { + value + } + } } `, }); diff --git a/src/models/endpoint.js b/src/models/endpoint.js index 00d4d8c..27135dd 100644 --- a/src/models/endpoint.js +++ b/src/models/endpoint.js @@ -65,6 +65,46 @@ const dataQuery = ` } total } + getP99: getLinearIntValues(metric: { + name: "endpoint_p99" + id: $endpointId + }, duration: $duration) { + values { + value + } + } + getP95: getLinearIntValues(metric: { + name: "endpoint_p95" + id: $endpointId + }, duration: $duration) { + values { + value + } + } + getP90: getLinearIntValues(metric: { + name: "endpoint_p90" + id: $endpointId + }, duration: $duration) { + values { + value + } + } + getP75: getLinearIntValues(metric: { + name: "endpoint_p75" + id: $endpointId + }, duration: $duration) { + values { + value + } + } + getP50: getLinearIntValues(metric: { + name: "endpoint_p50" + id: $endpointId + }, duration: $duration) { + values { + value + } + } } `; @@ -126,6 +166,21 @@ export default base({ traces: [], total: 0, }, + getP99: { + values: [], + }, + getP95: { + values: [], + }, + getP90: { + values: [], + }, + getP75: { + values: [], + }, + getP50: { + values: [], + }, }, dataQuery, optionsQuery, diff --git a/src/models/service.js b/src/models/service.js index 30f90fb..c0aa4c7 100644 --- a/src/models/service.js +++ b/src/models/service.js @@ -76,7 +76,7 @@ const dataQuery = ` detectPoint } } - getServiceP99: getLinearIntValues(metric: { + getP99: getLinearIntValues(metric: { name: "service_p99" id: $serviceId }, duration: $duration) { @@ -84,7 +84,7 @@ const dataQuery = ` value } } - getServiceP95: getLinearIntValues(metric: { + getP95: getLinearIntValues(metric: { name: "service_p95" id: $serviceId }, duration: $duration) { @@ -92,7 +92,7 @@ const dataQuery = ` value } } - getServiceP90: getLinearIntValues(metric: { + getP90: getLinearIntValues(metric: { name: "service_p90" id: $serviceId }, duration: $duration) { @@ -100,7 +100,7 @@ const dataQuery = ` value } } - getServiceP75: getLinearIntValues(metric: { + getP75: getLinearIntValues(metric: { name: "service_p75" id: $serviceId }, duration: $duration) { @@ -108,7 +108,7 @@ const dataQuery = ` value } } - getServiceP50: getLinearIntValues(metric: { + getP50: getLinearIntValues(metric: { name: "service_p50" id: $serviceId }, duration: $duration) { @@ -222,19 +222,19 @@ export default base({ nodes: [], calls: [], }, - getServiceP99: { + getP99: { values: [], }, - getServiceP95: { + getP95: { values: [], }, - getServiceP90: { + getP90: { values: [], }, - getServiceP75: { + getP75: { values: [], }, - getServiceP50: { + getP50: { values: [], }, getServiceInstances: [], diff --git a/src/routes/Dashboard/Dashboard.js b/src/routes/Dashboard/Dashboard.js index 57e3ee0..3c24d76 100644 --- a/src/routes/Dashboard/Dashboard.js +++ b/src/routes/Dashboard/Dashboard.js @@ -20,9 +20,9 @@ import React, { PureComponent } from 'react'; import { connect } from 'dva'; import { Row, Col, Card, Tooltip, Icon } from 'antd'; import { - ChartCard, MiniArea, Field, HeatMap, + ChartCard, MiniArea, Field, HeatMap, Line, } from '../../components/Charts'; -import { axis, generateDuration } from '../../utils/time'; +import { axis, generateDuration, axisMY } from '../../utils/time'; import { avgTimeSeries, redirect } from '../../utils/utils'; import { Panel } from '../../components/Page'; import RankList from '../../components/RankList'; @@ -144,6 +144,20 @@ export default class Dashboard extends PureComponent { </ChartCard> </Col> </Row> + <Row> + <Col xs={24} sm={24} md={24} lg={24} xl={24} style={{ marginTop: 8 }}> + <Card + title="Response Time" + bordered={false} + bodyStyle={{ padding: 5, height: 150}} + > + <Line + data={axisMY(this.props.duration, [{ title: 'p99', value: data.getP99}, { title: 'p95', value: data.getP95} + , { title: 'p90', value: data.getP90}, { title: 'p75', value: data.getP75}, { title: 'p50', value: data.getP50}])} + /> + </Card> + </Col> + </Row> <Row gutter={8}> <Col xs={24} sm={24} md={24} lg={16} xl={16} style={{ marginTop: 8 }}> <Card diff --git a/src/routes/Endpoint/Endpoint.js b/src/routes/Endpoint/Endpoint.js index f4c6e01..a16f36f 100644 --- a/src/routes/Endpoint/Endpoint.js +++ b/src/routes/Endpoint/Endpoint.js @@ -20,9 +20,9 @@ import React, { PureComponent } from 'react'; import { connect } from 'dva'; import { Row, Col, Form, Button, Icon, Select } from 'antd'; import { - ChartCard, MiniArea, MiniBar, Sankey, + ChartCard, MiniArea, MiniBar, Sankey, Line, } from 'components/Charts'; -import { axisY } from '../../utils/time'; +import { axisY, axisMY } from '../../utils/time'; import { avgTS } from '../../utils/utils'; import { Panel, Search } from '../../components/Page'; import TraceList from '../../components/Trace/TraceList'; @@ -113,8 +113,8 @@ export default class Endpoint extends PureComponent { endpointId, duration, traceCondition: { - endpointId: parseInt(values.endpointId, 10), - endpointName: endpointName, + endpointId: values.endpointId, + endpointName, queryDuration: duration, traceState: 'ALL', queryOrder: 'BY_DURATION', @@ -196,6 +196,19 @@ export default class Endpoint extends PureComponent { </ChartCard> </Col> </Row> + <Row> + <Col xs={24} sm={24} md={24} lg={24} xl={24} style={{ marginTop: 8 }}> + <ChartCard + title="Response Time" + > + <Line + height={150} + data={axisMY(this.props.duration, [{ title: 'p99', value: data.getP99}, { title: 'p95', value: data.getP95} + , { title: 'p90', value: data.getP90}, { title: 'p75', value: data.getP75}, { title: 'p50', value: data.getP50}])} + /> + </ChartCard> + </Col> + </Row> <Row gutter={8}> <Col xs={24} sm={24} md={24} lg={24} xl={24} style={{ marginTop: 8 }}> <ChartCard diff --git a/src/routes/Service/Service.js b/src/routes/Service/Service.js index 35658b0..ce4c149 100644 --- a/src/routes/Service/Service.js +++ b/src/routes/Service/Service.js @@ -183,8 +183,8 @@ export default class Service extends PureComponent { bodyStyle={{ padding: 5, height: 150}} > <Line - data={axisMY(this.props.duration, [{ title: 'p99', value: data.getServiceP99}, { title: 'p95', value: data.getServiceP95} - , { title: 'p90', value: data.getServiceP90}, { title: 'p75', value: data.getServiceP75}, { title: 'p50', value: data.getServiceP50}])} + data={axisMY(this.props.duration, [{ title: 'p99', value: data.getP99}, { title: 'p95', value: data.getP95} + , { title: 'p90', value: data.getP90}, { title: 'p75', value: data.getP75}, { title: 'p50', value: data.getP50}])} /> </Card> </Col>