Exemple #1
0
 }).then(res => {
   if (res.code === 0) {
     let data = res.data
     if (data.avgCodeTime === 'NaN') data.avgCodeTime = 0
     if (data.avgDBTime === 'NaN') data.avgDBTime = 0
     if (data.avgElapsed === 'NaN') data.avgElapsed = 0
     if (data.avgThirdPartyTime === 'NaN') data.avgThirdPartyTime = 0
     let arr = [
       data.avgCodeTime,
       data.avgDBTime,
       data.avgThirdPartyTime
     ]
     res.data.percentArr = util.toPercentageP(arr)
     this.performanceSummariesData = res.data
   }
 })
Exemple #2
0
 }).then(res => {
   if (res.code === 0) {
     let percent = util.toPercentageP([
       res.data.normalReqCount || 0,
       res.data.slowReqCount || 0,
       res.data.veryslowReqCount || 0,
       res.data.errorReqCount || 0
     ])
     this.TransactiondiagramreqcountsectionsummaryData = {
       errorReqCount: res.data.errorReqCount || 0,
       normalReqCount: res.data.normalReqCount || 0,
       slowReqCount: res.data.slowReqCount || 0,
       veryslowReqCount: res.data.veryslowReqCount || 0,
       total: res.data.errorReqCount + res.data.normalReqCount + res.data.slowReqCount + res.data.veryslowReqCount,
       percent: percent
     }
   }
 })