提交 5d350ce9 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!529 UI optimizing the display of profiling English pages and put profiling files together

Merge pull request !529 from 黄伟锋/myMaster
...@@ -238,6 +238,8 @@ ...@@ -238,6 +238,8 @@
"profilingDashboard": "Profiling Dashboard", "profilingDashboard": "Profiling Dashboard",
"showAverage": "Average value", "showAverage": "Average value",
"iterationGapTime": "Step interval", "iterationGapTime": "Step interval",
"fpBpTime": "Forward and Backward Propagation",
"tailTime": "Step Tail",
"time": "Time", "time": "Time",
"operatorTimeConAnalysis": "Operator Time Consumption Analysis", "operatorTimeConAnalysis": "Operator Time Consumption Analysis",
"avgCost": "Average total consumed time:", "avgCost": "Average total consumed time:",
...@@ -318,7 +320,7 @@ ...@@ -318,7 +320,7 @@
"pipelineTopTitle": "Average usage of queues between operators", "pipelineTopTitle": "Average usage of queues between operators",
"pipelineMiddleTitle": "Queue relationship between operators", "pipelineMiddleTitle": "Queue relationship between operators",
"deviceQueueOp": "Data Transmission", "deviceQueueOp": "Data Transmission",
"deviceQueueOpTip": "Data Transmission Operator", "deviceQueueOpTip": "Forward and Backward Propagation",
"getNext": "Data Obtaining Operator", "getNext": "Data Obtaining Operator",
"connectorQuene": "Host Queues", "connectorQuene": "Host Queues",
"getData": "Data Obtaining", "getData": "Data Obtaining",
...@@ -339,9 +341,9 @@ ...@@ -339,9 +341,9 @@
"fpbpTimeRatio": "Ratio of time consumed by forward and backward propagation:", "fpbpTimeRatio": "Ratio of time consumed by forward and backward propagation:",
"iterationGapTimeRatio": "Ratio of time consumed by step interval:", "iterationGapTimeRatio": "Ratio of time consumed by step interval:",
"iterativeTailingTimeRatio": "Ratio of time consumed by step tail:", "iterativeTailingTimeRatio": "Ratio of time consumed by step tail:",
"dataProcess": "This shows the data processing. Data is stored in the host queue during data processing, and then stored in the data queue on a chip during data transmission. Finally, the data transmission operator get_next transmits the data to forward propagation.", "dataProcess": "This shows the data processing. Data is stored in the host queue during data processing, and then stored in the data queue on a chip during data transmission. Finally, the forward and backward propagation get_next transmits the data to forward propagation.",
"dataProcessInfo": "By determining the empty host and data queues, you can preliminarily determine the stage where the performance is abnormal.", "dataProcessInfo": "By determining the empty host and data queues, you can preliminarily determine the stage where the performance is abnormal.",
"analysisOne": "1. If the step interval is long and some batches of the data queue on a chip are empty, the performance is abnormal during data processing and transmission. Otherwise, locate the internal problem of the data transmission operator get_next.", "analysisOne": "1. If the step interval is long and some batches of the data queue on a chip are empty, the performance is abnormal during data processing and transmission. Otherwise, locate the internal problem of the forward and backward propagation get_next.",
"analysisTwo": "2. If the performance is abnormal during data processing and transmission, check the host queue. If the host queue is empty at a high probability, the exception may occur during data transmission.", "analysisTwo": "2. If the performance is abnormal during data processing and transmission, check the host queue. If the host queue is empty at a high probability, the exception may occur during data transmission.",
"higherAnalysis": "Note: You can perform advanced analysis based on the time consumed by operators.", "higherAnalysis": "Note: You can perform advanced analysis based on the time consumed by operators.",
"chipInfo": "Ratio of empty data queues on a chip:", "chipInfo": "Ratio of empty data queues on a chip:",
......
...@@ -236,6 +236,8 @@ ...@@ -236,6 +236,8 @@
"profilingDashboard": "性能看板", "profilingDashboard": "性能看板",
"showAverage": "展示平均值", "showAverage": "展示平均值",
"iterationGapTime": "迭代间隙时间", "iterationGapTime": "迭代间隙时间",
"fpBpTime": "前向+反向时间",
"tailTime": "迭代拖尾时间",
"time": "时间", "time": "时间",
"operatorTimeConAnalysis": "算子耗时分析", "operatorTimeConAnalysis": "算子耗时分析",
"avgCost": "平均总耗时:", "avgCost": "平均总耗时:",
......
...@@ -80,25 +80,24 @@ export default new Router({ ...@@ -80,25 +80,24 @@ export default new Router({
}, },
{ {
path: '/profiling', path: '/profiling',
component: () => import('./views/train-manage/profiling.vue'), component: () => import('./views/profiling/profiling.vue'),
redirect: '/profiling/profiling-dashboard', redirect: '/profiling/profiling-dashboard',
children: [ children: [
{ {
path: 'profiling-dashboard', path: 'profiling-dashboard',
component: () => component: () => import('./views/profiling/profiling-dashboard.vue'),
import('./views/train-manage/profiling-dashboard.vue'),
}, },
{ {
path: 'step-trace', path: 'step-trace',
component: () => import('./views/train-manage/step-trace.vue'), component: () => import('./views/profiling/step-trace.vue'),
}, },
{ {
path: 'operator', path: 'operator',
component: () => import('./views/train-manage/operator.vue'), component: () => import('./views/profiling/operator.vue'),
}, },
{ {
path: 'data-process', path: 'data-process',
component: () => import('./views/train-manage/data-process.vue'), component: () => import('./views/profiling/data-process.vue'),
}, },
], ],
}, },
......
...@@ -902,7 +902,9 @@ export default { ...@@ -902,7 +902,9 @@ export default {
xAxis: { xAxis: {
name: `${this.$t('profiling.sampleInterval')}/${ name: `${this.$t('profiling.sampleInterval')}/${
data.sample_interval data.sample_interval
}ms`, }ms`
.split(' ')
.join('\n'),
data: dataY.map((val, index) => index + 1), data: dataY.map((val, index) => index + 1),
}, },
yAxis: { yAxis: {
......
...@@ -108,8 +108,13 @@ limitations under the License. ...@@ -108,8 +108,13 @@ limitations under the License.
:sortable="ele === 'op_info' ? false : 'custom'" :sortable="ele === 'op_info' ? false : 'custom'"
:width="(ele==='avg_execution_time'|| ele==='subgraph' || :width="(ele==='avg_execution_time'|| ele==='subgraph' ||
ele==='op_name'|| ele==='op_type')?'220':''" ele==='op_name'|| ele==='op_type')?'220':''"
show-overflow-tooltip show-overflow-tooltip>
:label="ele==='avg_execution_time'?`${ele} (${$t('profiling.unit')})`:ele"> <template slot="header">
<div class="custom-label"
:title="ele==='avg_execution_time'?`${ele} (${$t('profiling.unit')})`:ele">
{{ele==='avg_execution_time'?`${ele} (${$t('profiling.unit')})`:ele}}
</div>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination :current-page="props.row.opDetailPage.offset + 1" <el-pagination :current-page="props.row.opDetailPage.offset + 1"
...@@ -125,8 +130,13 @@ limitations under the License. ...@@ -125,8 +130,13 @@ limitations under the License.
<el-table-column v-for="(item, $index) in opTypeCol" <el-table-column v-for="(item, $index) in opTypeCol"
:property="item" :property="item"
:key="$index" :key="$index"
sortable sortable>
:label="item==='execution_time'?`${item} (${$t('profiling.unit')})`:item"> <template slot="header">
<div class="custom-label"
:title="item==='execution_time'?`${item} (${$t('profiling.unit')})`:item">
{{item==='execution_time'?`${item} (${$t('profiling.unit')})`:item}}
</div>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table v-show="statisticType && opAllTypeList.opDetailCol && opAllTypeList.opDetailCol.length" <el-table v-show="statisticType && opAllTypeList.opDetailCol && opAllTypeList.opDetailCol.length"
...@@ -141,11 +151,16 @@ limitations under the License. ...@@ -141,11 +151,16 @@ limitations under the License.
<el-table-column v-for="(item, $index) in opAllTypeList.opDetailCol" <el-table-column v-for="(item, $index) in opAllTypeList.opDetailCol"
:property="item" :property="item"
:key="$index" :key="$index"
:label="item==='avg_execution_time'?`${item} (${$t('profiling.unit')})`:item"
:sortable="item === 'op_info' ? false : 'custom'" :sortable="item === 'op_info' ? false : 'custom'"
:width="(item==='avg_execution_time'|| item==='subgraph' || :width="(item==='avg_execution_time'|| item==='subgraph' ||
item==='op_name'|| item==='op_type')?'220':''" item==='op_name'|| item==='op_type')?'220':''"
show-overflow-tooltip> show-overflow-tooltip>
<template slot="header">
<div class="custom-label"
:title="item==='avg_execution_time'?`${item} (${$t('profiling.unit')})`:item">
{{item==='avg_execution_time'?`${item} (${$t('profiling.unit')})`:item}}
</div>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination v-show="statisticType" <el-pagination v-show="statisticType"
...@@ -204,10 +219,16 @@ limitations under the License. ...@@ -204,10 +219,16 @@ limitations under the License.
<el-table-column v-for="(item, $index) in opCpuList.opDetailCol" <el-table-column v-for="(item, $index) in opCpuList.opDetailCol"
:property="item" :property="item"
:key="$index" :key="$index"
:label="(item==='total_time' || item==='dispatch_time')?
`${item} (${$t('profiling.unit')})`:item"
sortable="custom" sortable="custom"
show-overflow-tooltip> show-overflow-tooltip>
<template slot="header">
<div class="custom-label"
:title="(item==='total_time' || item==='dispatch_time')?
`${item} (${$t('profiling.unit')})`:item">
{{(item==='total_time' || item==='dispatch_time')?
`${item} (${$t('profiling.unit')})`:item}}
</div>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination v-if="opCpuList.opDetailList.length" <el-pagination v-if="opCpuList.opDetailList.length"
...@@ -829,6 +850,7 @@ export default { ...@@ -829,6 +850,7 @@ export default {
*/ */
setOption(chart) { setOption(chart) {
const option = {}; const option = {};
const maxLabelLength = 20;
if (!chart.type) { if (!chart.type) {
option.legend = { option.legend = {
data: [], data: [],
...@@ -885,13 +907,18 @@ export default { ...@@ -885,13 +907,18 @@ export default {
option.series = [ option.series = [
{ {
type: 'pie', type: 'pie',
center: ['25%', '65%'], center: ['23%', '60%'],
data: chart.data, data: chart.data,
radius: '50%', radius: '50%',
lable: { label: {
position: 'outer', position: 'outer',
alignTo: 'none', alignTo: 'labelLine',
bleedMargin: 5, formatter: (params) => {
return params.data.name &&
params.data.name.length > maxLabelLength
? `${params.data.name.slice(0, maxLabelLength)}...`
: params.data.name;
},
}, },
itemStyle: { itemStyle: {
normal: { normal: {
...@@ -1111,6 +1138,11 @@ export default { ...@@ -1111,6 +1138,11 @@ export default {
background: #fff; background: #fff;
padding: 0 16px; padding: 0 16px;
overflow: hidden; overflow: hidden;
.custom-label {
max-width: calc(100% - 25px);
padding: 0;
vertical-align: middle;
}
.el-tabs { .el-tabs {
height: 100%; height: 100%;
.el-tabs__header { .el-tabs__header {
......
...@@ -273,6 +273,7 @@ limitations under the License. ...@@ -273,6 +273,7 @@ limitations under the License.
<p v-show="!pieChart.initOver">{{$t("public.dataLoading")}}</p> <p v-show="!pieChart.initOver">{{$t("public.dataLoading")}}</p>
<p v-show="pieChart.initOver">{{$t("public.noData")}}</p> <p v-show="pieChart.initOver">{{$t("public.noData")}}</p>
</div> </div>
<div class="op-time-content"> <div class="op-time-content">
<div id="pieChart" <div id="pieChart"
class="pie-chart" class="pie-chart"
...@@ -358,7 +359,6 @@ limitations under the License. ...@@ -358,7 +359,6 @@ limitations under the License.
<div class="info-line"> <div class="info-line">
<span>{{$t('profiling.opTimes')}}</span><span>{{timelineInfo.opTimes + $t('profiling.times')}}</span> <span>{{$t('profiling.opTimes')}}</span><span>{{timelineInfo.opTimes + $t('profiling.times')}}</span>
</div> </div>
</div> </div>
<div class="image-noData" <div class="image-noData"
v-if="timelineInfo.noData"> v-if="timelineInfo.noData">
...@@ -369,6 +369,7 @@ limitations under the License. ...@@ -369,6 +369,7 @@ limitations under the License.
<p v-show="!timelineInfo.initOver">{{$t("public.dataLoading")}}</p> <p v-show="!timelineInfo.initOver">{{$t("public.dataLoading")}}</p>
<p v-show="timelineInfo.initOver">{{$t("public.noData")}}</p> <p v-show="timelineInfo.initOver">{{$t("public.noData")}}</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -485,7 +486,12 @@ export default { ...@@ -485,7 +486,12 @@ export default {
this.timelineInfo.initOver = true; this.timelineInfo.initOver = true;
this.processSummary.initOver = true; this.processSummary.initOver = true;
} }
if (newValue.query.dir && newValue.query.id && newValue.query.path && newValue.curCardNum) { if (
newValue.query.dir &&
newValue.query.id &&
newValue.query.path &&
newValue.curCardNum
) {
this.summaryPath = newValue.query.dir; this.summaryPath = newValue.query.dir;
this.trainingJobId = newValue.query.id; this.trainingJobId = newValue.query.id;
this.relativePath = newValue.query.path; this.relativePath = newValue.query.path;
...@@ -1114,13 +1120,17 @@ export default { ...@@ -1114,13 +1120,17 @@ export default {
this.timelineInfo.initOver = true; this.timelineInfo.initOver = true;
if (res && res.data) { if (res && res.data) {
this.timelineInfo.noData = false; this.timelineInfo.noData = false;
this.timelineInfo.totalTime = this.toFixedFun(
res.data.total_time, this.timelineInfo.totalTime =
4, this.toFixedFun(res.data.total_time, 4) ||
); (res.data.total_time === 0 ? 0 : '--');
this.timelineInfo.streamNum = res.data.num_of_streams; this.timelineInfo.streamNum =
this.timelineInfo.opNum = res.data.num_of_ops; res.data.num_of_streams ||
this.timelineInfo.opTimes = res.data.op_exe_times; (res.data.num_of_streams === 0 ? 0 : '--');
this.timelineInfo.opNum =
res.data.num_of_ops || (res.data.num_of_ops === 0 ? 0 : '--');
this.timelineInfo.opTimes =
res.data.op_exe_times || (res.data.op_exe_times === 0 ? 0 : '--');
} else { } else {
this.timelineInfo.noData = true; this.timelineInfo.noData = true;
} }
......
...@@ -122,9 +122,8 @@ export default { ...@@ -122,9 +122,8 @@ export default {
}; };
RequestService.getProfilerDeviceData(params) RequestService.getProfilerDeviceData(params)
.then((res) => { .then((res) => {
if (res && res.data) { if (res && res.data && res.data.length) {
const deviceList = res.data; const deviceList = res.data;
if (deviceList.length) {
deviceList.forEach((item) => { deviceList.forEach((item) => {
this.CardNumArr.push({ this.CardNumArr.push({
value: item, value: item,
...@@ -132,10 +131,10 @@ export default { ...@@ -132,10 +131,10 @@ export default {
}); });
this.curDashboardInfo.curCardNum = this.CardNumArr[0].value; this.curDashboardInfo.curCardNum = this.CardNumArr[0].value;
this.getDataOfProfileHelper(); this.getDataOfProfileHelper();
}
} else { } else {
this.CardNumArr = []; this.CardNumArr = [];
this.curDashboardInfo.curCardNum = ''; this.curDashboardInfo.curCardNum = '';
this.curDashboardInfo.initOver = true;
} }
}) })
.catch(() => { .catch(() => {
......
...@@ -30,7 +30,9 @@ limitations under the License. ...@@ -30,7 +30,9 @@ limitations under the License.
v-model.number="steps.step" v-model.number="steps.step"
:disabled="steps.disabled" :disabled="steps.disabled"
@blur="resetStep" @blur="resetStep"
@keyup.native.enter="changeStep"> @keyup.native.enter="changeStep"
@clear="clearStep"
clearable>
</el-input> </el-input>
<el-button @click="changeStep" <el-button @click="changeStep"
:disabled="steps.disabled"> :disabled="steps.disabled">
...@@ -320,9 +322,18 @@ export default { ...@@ -320,9 +322,18 @@ export default {
*/ */
resetStep() { resetStep() {
setTimeout(() => { setTimeout(() => {
if (!this.$refs.step.focused) {
this.steps.step = this.steps.trueStep; this.steps.step = this.steps.trueStep;
}
}, 200); }, 200);
}, },
/**
* Clear the current step value
*/
clearStep() {
this.steps.step = null;
this.$refs.step.focus();
},
/** /**
* Get different types of time information * Get different types of time information
* @param {String} id Dom id * @param {String} id Dom id
...@@ -380,7 +391,8 @@ export default { ...@@ -380,7 +391,8 @@ export default {
type: 'value', type: 'value',
name: '', name: '',
nameTextStyle: { nameTextStyle: {
padding: [0, 0, 0, 30], padding: [0, 0, 0, -30],
align: 'left',
}, },
}, },
grid: { grid: {
...@@ -411,15 +423,11 @@ export default { ...@@ -411,15 +423,11 @@ export default {
this.tabsArr[0].noData = this.steps.max ? false : true; this.tabsArr[0].noData = this.steps.max ? false : true;
this.tabsArr[0].initOver = true; this.tabsArr[0].initOver = true;
} else if (type === 'fp_and_bp') { } else if (type === 'fp_and_bp') {
option.yAxis.name = `${this.$t( option.yAxis.name = `${this.$t('profiling.fpBpTime')}(ms)`;
'profiling.deviceQueueOpTip',
)}${this.$t('profiling.time')}(ms)`;
this.tabsArr[1].noData = this.steps.max ? false : true; this.tabsArr[1].noData = this.steps.max ? false : true;
this.tabsArr[1].initOver = true; this.tabsArr[1].initOver = true;
} else if (type === 'tail') { } else if (type === 'tail') {
option.yAxis.name = `${this.$t( option.yAxis.name = `${this.$t('profiling.tailTime')}(ms)`;
'profiling.lterationTail',
)}${this.$t('profiling.time')}(ms)`;
this.tabsArr[2].noData = this.steps.max ? false : true; this.tabsArr[2].noData = this.steps.max ? false : true;
this.tabsArr[2].initOver = true; this.tabsArr[2].initOver = true;
} }
...@@ -986,6 +994,7 @@ export default { ...@@ -986,6 +994,7 @@ export default {
.chart { .chart {
height: calc(100% - 85px); height: calc(100% - 85px);
min-height: 180px; min-height: 180px;
min-width: 250px;
overflow: hidden; overflow: hidden;
} }
.title { .title {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册