(profile, opt_indent)
| 1060 | } |
| 1061 | |
| 1062 | printHeavyProfile(profile, opt_indent) { |
| 1063 | const indent = opt_indent || 0; |
| 1064 | const indentStr = ''.padStart(indent); |
| 1065 | this.processProfile(profile, () => true, (rec) => { |
| 1066 | // Cut off too infrequent callers. |
| 1067 | if (rec.parentTotalPercent < TickProcessor.CALL_PROFILE_CUTOFF_PCT) return; |
| 1068 | const funcName = this.formatFunctionName(rec.internalFuncName); |
| 1069 | print(`${` ${rec.totalTime.toString().padStart(5)} ` + |
| 1070 | rec.parentTotalPercent.toFixed(1).toString().padStart(5)}% ${indentStr}${funcName}`); |
| 1071 | // Limit backtrace depth. |
| 1072 | if (indent < 2 * this.callGraphSize_) { |
| 1073 | this.printHeavyProfile(rec.children, indent + 2); |
| 1074 | } |
| 1075 | // Delimit top-level functions. |
| 1076 | if (indent == 0) print(''); |
| 1077 | }); |
| 1078 | } |
| 1079 | } |
no test coverage detected