mirror of
https://gitee.com/openharmony/developtools_hiperf
synced 2024-11-23 07:29:42 +00:00
update
Signed-off-by: zhangcui <zhangcui11@huawei.com>
This commit is contained in:
parent
f044756ffd
commit
42f8de4543
@ -4608,8 +4608,9 @@ input{
|
||||
*
|
||||
* @param process
|
||||
*/
|
||||
clickProcess(process){
|
||||
if(process && process.threads){
|
||||
clickProcess(process)
|
||||
{
|
||||
if (process && process.threads) {
|
||||
this.backBt.style.display = 'flex';
|
||||
this.currentLevel = 'Thread in Process'
|
||||
this.clickProcessData = process;
|
||||
@ -4618,10 +4619,10 @@ input{
|
||||
let count = 0;
|
||||
let filter = process.threads.filter(item => item.eventCount / process.eventCount > 0.001);
|
||||
let total = 0;
|
||||
filter.forEach(item=>{ total += item.eventCount});
|
||||
filter.forEach(item=>{ total += item.eventCount });
|
||||
total = process.eventCount;
|
||||
for(let item of filter){
|
||||
if(count < this.chartMaxCount){
|
||||
for (let item of filter) {
|
||||
if (count < this.chartMaxCount) {
|
||||
chartSource.push({
|
||||
id:item.tid,
|
||||
name: this.getThreadName(item.tid),
|
||||
@ -4632,11 +4633,11 @@ input{
|
||||
chartTotal += item.eventCount;
|
||||
count ++;
|
||||
}
|
||||
if(count >= this.chartMaxCount){
|
||||
if (count >= this.chartMaxCount) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(count < this.chartMaxCount && chartTotal < process.eventCount){
|
||||
if (count < this.chartMaxCount && chartTotal < process.eventCount) {
|
||||
chartSource.push({
|
||||
id : -1,
|
||||
name: 'Other',
|
||||
@ -4644,10 +4645,10 @@ input{
|
||||
color: '#888888',
|
||||
time: this.getSampleWeight(process.eventCount - chartTotal)
|
||||
});
|
||||
}else{
|
||||
this.addOtherItem(count,total,chartTotal,chartSource)
|
||||
} else {
|
||||
this.addOtherItem(count, total, chartTotal, chartSource)
|
||||
}
|
||||
chartSource.sort((a, b) => { return b.time - a.time })
|
||||
chartSource.sort((a, b) => { return b.time - a.time })
|
||||
this.threadDs = chartSource;
|
||||
this.chart.dataSource = chartSource;
|
||||
}
|
||||
@ -4657,8 +4658,9 @@ input{
|
||||
* chart click thread
|
||||
* @param thread
|
||||
*/
|
||||
clickThread(thread){
|
||||
if(thread && thread.libs){
|
||||
clickThread(thread)
|
||||
{
|
||||
if (thread && thread.libs) {
|
||||
this.currentLevel = 'Library in Thread'
|
||||
let chartSource = [];
|
||||
let chartTotal = 0;
|
||||
@ -4666,10 +4668,10 @@ input{
|
||||
this.clickThreadData = thread;
|
||||
let filter = thread.libs.filter(item => item.eventCount / thread.eventCount > 0.001);
|
||||
let total = 0;
|
||||
filter.forEach(item=>{ total += item.eventCount});
|
||||
filter.forEach(item=>{ total += item.eventCount });
|
||||
total = thread.eventCount;
|
||||
for(let item of filter){
|
||||
if(count < this.chartMaxCount){
|
||||
for (let item of filter) {
|
||||
if (count < this.chartMaxCount) {
|
||||
chartSource.push({
|
||||
id:item.fileId,
|
||||
name: this.getLibName(item.fileId),
|
||||
@ -4680,11 +4682,11 @@ input{
|
||||
chartTotal += item.eventCount;
|
||||
count ++;
|
||||
}
|
||||
if(count >= this.chartMaxCount){
|
||||
if (count >= this.chartMaxCount) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(count < this.chartMaxCount && chartTotal < thread.eventCount){
|
||||
if (count < this.chartMaxCount && chartTotal < thread.eventCount) {
|
||||
chartSource.push({
|
||||
id : -1,
|
||||
name: 'Other',
|
||||
@ -4692,10 +4694,10 @@ input{
|
||||
color: '#888888',
|
||||
time: this.getSampleWeight(thread.eventCount - chartTotal)
|
||||
});
|
||||
}else{
|
||||
this.addOtherItem(count,total,chartTotal,chartSource)
|
||||
} else {
|
||||
this.addOtherItem(count, total, chartTotal, chartSource)
|
||||
}
|
||||
chartSource.sort((a, b) => { return b.time - a.time })
|
||||
chartSource.sort((a, b) => { return b.time - a.time })
|
||||
this.libDs = chartSource;
|
||||
this.chart.dataSource = chartSource;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user