修改显示单位纳秒为毫秒
This commit is contained in:
parent
c679cb81ee
commit
4385166952
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -286,12 +286,12 @@ function parse_mutexInfo(mutexObj:MutexInfo[], sinfoList:SourceInfo[], dimension
|
||||||
sinfo['product'] = `线程 ${obj.pid}`;
|
sinfo['product'] = `线程 ${obj.pid}`;
|
||||||
if(obj.condWaitTime){
|
if(obj.condWaitTime){
|
||||||
miStr += `
|
miStr += `
|
||||||
<li>线程 ${obj.pid} 临界区共耗时 ${obj.totalTime} 纳秒 其中条件变量等待时间 ${obj.condWaitTime} 纳秒.
|
<li>线程 ${obj.pid} 临界区共耗时 ${obj.totalTime/1000000} 毫秒 其中条件变量等待时间 ${obj.condWaitTime/1000000} 毫秒.
|
||||||
<ul>
|
<ul>
|
||||||
`;
|
`;
|
||||||
}else{
|
}else{
|
||||||
miStr += `
|
miStr += `
|
||||||
<li>线程 ${obj.pid} 临界区共耗时 ${obj.totalTime} 纳秒.
|
<li>线程 ${obj.pid} 临界区共耗时 ${obj.totalTime/1000000} 毫秒.
|
||||||
<ul>
|
<ul>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
@ -299,18 +299,18 @@ function parse_mutexInfo(mutexObj:MutexInfo[], sinfoList:SourceInfo[], dimension
|
||||||
let info = obj.details[key1].split('-');
|
let info = obj.details[key1].split('-');
|
||||||
if(info.length >= 3){
|
if(info.length >= 3){
|
||||||
let key = '互斥量 0x'+Number(key1).toString(16);
|
let key = '互斥量 0x'+Number(key1).toString(16);
|
||||||
sinfo[key] = Number(info[1]);
|
sinfo[key] = Number(info[1])/1000000;
|
||||||
mutexSet.add(key);
|
mutexSet.add(key);
|
||||||
if(Number(info[2])){
|
if(Number(info[2])){
|
||||||
miStr += `
|
miStr += `
|
||||||
<li>
|
<li>
|
||||||
进入互斥量(${key})保护的临界区 ${info[0]} 次, 共耗时 ${info[1]} 纳秒, 条件变量等待 ${info[2]} 纳秒.
|
进入互斥量(${key})保护的临界区 ${info[0]} 次, 共耗时 ${sinfo[key]} 毫秒, 条件变量等待 ${Number(info[2])/1000000} 毫秒.
|
||||||
</li>
|
</li>
|
||||||
`;
|
`;
|
||||||
}else{
|
}else{
|
||||||
miStr += `
|
miStr += `
|
||||||
<li>
|
<li>
|
||||||
进入互斥量(${key})保护的临界区 ${info[0]} 次, 共耗时 ${info[1]} 纳秒.
|
进入互斥量(${key})保护的临界区 ${info[0]} 次, 共耗时 ${sinfo[key]} 毫秒.
|
||||||
</li>
|
</li>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue