提交 4e3213a8 编写于 作者: F fengxuefeng

give the costing time an acurate unit

上级 34074440
...@@ -291,7 +291,7 @@ export default { ...@@ -291,7 +291,7 @@ export default {
getMetricsData() { getMetricsData() {
return axios({ return axios({
method: 'get', method: 'get',
url: 'v1/mindinsight/resource_monitor/current/metrics', url: 'v1/mindinsight/sysmetric/current',
headers: { headers: {
ignoreError: true, ignoreError: true,
}, },
......
...@@ -396,8 +396,8 @@ export default { ...@@ -396,8 +396,8 @@ export default {
this.temperatureMax = this.temperatureMax =
Math.max(...this.chipTableData.map((val) => val.temperature)) * 1.2; Math.max(...this.chipTableData.map((val) => val.temperature)) * 1.2;
// 1.2 In order to Demonstrated effect // 1.2 In order to Demonstrated effect
if (res.data.momory && res.data.momory.virtual) { if (res.data.memory && res.data.memory.virtual) {
this.dealChartData(this.virtualChart, res.data.momory.virtual); this.dealChartData(this.virtualChart, res.data.memory.virtual);
this.setOption(this.virtualChart); this.setOption(this.virtualChart);
} }
if (res.data.cpu) { if (res.data.cpu) {
......
...@@ -22,6 +22,7 @@ limitations under the License. ...@@ -22,6 +22,7 @@ limitations under the License.
<el-tab-pane label="AI CORE" <el-tab-pane label="AI CORE"
name="core"> name="core">
<div class="cl-profiler-top" <div class="cl-profiler-top"
:class="{fullScreen:fullScreen}"
v-if="coreCharts.data.length"> v-if="coreCharts.data.length">
<div> <div>
<span class="profiler-title"> <span class="profiler-title">
...@@ -46,10 +47,15 @@ limitations under the License. ...@@ -46,10 +47,15 @@ limitations under the License.
</div> </div>
</div> </div>
<div class="cl-profiler-bottom" <div class="cl-profiler-bottom"
:class="{fullScreen:fullScreen}"
v-if="coreCharts.data.length"> v-if="coreCharts.data.length">
<span class="profiler-title"> <span class="profiler-title">
{{ $t('operator.operatorStatistics') }} {{ $t('operator.operatorStatistics') }}
</span> </span>
<img src="../../assets/images/full-screen.png"
:title="$t('graph.fullScreen')"
class="fullScreen"
@click="fullScreen=!fullScreen">
<div> <div>
<el-radio-group v-model="statisticType" <el-radio-group v-model="statisticType"
@change="coreTableChange" @change="coreTableChange"
...@@ -120,7 +126,7 @@ limitations under the License. ...@@ -120,7 +126,7 @@ limitations under the License.
:property="item" :property="item"
:key="$index" :key="$index"
sortable sortable
:label="item==='execution_time'?`${item} (ms)`:item"> :label="item==='execution_time'?`${item} (${$t('profiling.unit')})`:item">
</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"
...@@ -135,7 +141,7 @@ limitations under the License. ...@@ -135,7 +141,7 @@ 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} (ms)`:item" :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':''"
...@@ -198,7 +204,8 @@ limitations under the License. ...@@ -198,7 +204,8 @@ 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} (ms)`:item" :label="(item==='total_time' || item==='dispatch_time')?
`${item} (${$t('profiling.unit')})`:item"
sortable="custom" sortable="custom"
show-overflow-tooltip> show-overflow-tooltip>
</el-table-column> </el-table-column>
...@@ -318,6 +325,7 @@ export default { ...@@ -318,6 +325,7 @@ export default {
childProp: null, childProp: null,
childOrder: null, childOrder: null,
}, },
fullScreen: false,
}; };
}, },
watch: { watch: {
...@@ -1106,13 +1114,25 @@ export default { ...@@ -1106,13 +1114,25 @@ export default {
.cl-search-box { .cl-search-box {
float: right; float: right;
margin-bottom: 10px; margin-bottom: 10px;
margin-right: 20px;
} }
.cl-profiler-top { .cl-profiler-top {
height: 45%; height: 45%;
} }
.cl-profiler-top.fullScreen{
display: none;
}
.cl-profiler-bottom { .cl-profiler-bottom {
height: 55%; height: 55%;
padding-top: 10px; padding-top: 10px;
.fullScreen{
float: right;
margin-top: 5px;
cursor: pointer;
}
}
.cl-profiler-bottom.fullScreen{
height: 100%;
} }
.cpu-tab { .cpu-tab {
.cl-profiler-top { .cl-profiler-top {
......
...@@ -281,7 +281,7 @@ limitations under the License. ...@@ -281,7 +281,7 @@ limitations under the License.
<span class="time"> <span class="time">
<span class="bar" <span class="bar"
:style="{width: item.time / pieChart.topN[0].time * 100 + '%'}"></span> :style="{width: item.time / pieChart.topN[0].time * 100 + '%'}"></span>
<span class="value">{{item.time}}ms</span> <span class="value">{{item.time + $t('profiling.unit')}}</span>
</span> </span>
</li> </li>
</ul> </ul>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册