Bug 281137 Add profiling column for functions excluding other functions running

Venkman part
patch by silver@warwickcompsoc.co.uk r=rginda sr=dmose a=bsmedberg
This commit is contained in:
timeless%mozdev.org 2005-08-02 15:55:56 +00:00
Родитель d2b31f1255
Коммит 10cef0ef3e
5 изменённых файлов: 23 добавлений и 4 удалений

Просмотреть файл

@ -97,6 +97,10 @@ function pro_sumscript (scriptWrapper, key)
var min_ms = roundTo(jsdScript.minExecutionTime, 2);
var max_ms = roundTo(jsdScript.maxExecutionTime, 2);
var avg_ms = roundTo(jsdScript.totalExecutionTime / ccount, 2);
var own_tot_ms = roundTo(jsdScript.totalOwnExecutionTime, 2);
var own_min_ms = roundTo(jsdScript.minOwnExecutionTime, 2);
var own_max_ms = roundTo(jsdScript.maxOwnExecutionTime, 2);
var own_avg_ms = roundTo(jsdScript.totalOwnExecutionTime / ccount, 2);
var recurse = jsdScript.maxRecurseDepth;
var summary = new Object();
@ -105,17 +109,23 @@ function pro_sumscript (scriptWrapper, key)
summary.avg = avg_ms;
summary.min = min_ms;
summary.max = max_ms;
summary.own_avg = own_avg_ms;
summary.own_min = own_min_ms;
summary.own_max = own_max_ms;
summary.own_total = own_tot_ms;
summary.recurse = recurse;
summary.url = jsdScript.fileName;
summary.file = getFileFromPath(summary.url);
summary.base = jsdScript.baseLineNumber;
summary.end = summary.base + jsdScript.lineExtent;
summary.fun = scriptWrapper.functionName;
var own_str = getMsg(MSN_FMT_PROFILE_STR2, [own_tot_ms, own_min_ms,
own_max_ms, own_avg_ms]);
summary.str = getMsg(MSN_FMT_PROFILE_STR,
[summary.fun, summary.base, summary.end, ccount,
(summary.recurse ?
getMsg(MSN_FMT_PROFILE_RECURSE, recurse) : ""),
tot_ms, min_ms, max_ms, avg_ms]);
tot_ms, min_ms, max_ms, avg_ms, own_str]);
summary.key = summary[key];
return summary;
}
@ -266,6 +276,10 @@ function pro_rptinst (profileReport, scriptInstance, sectionData)
"\\$min-time" : summary.min,
"\\$avg-time" : summary.avg,
"\\$total-time" : summary.total,
"\\$own-max-time" : summary.own_max,
"\\$own-min-time" : summary.own_min,
"\\$own-avg-time" : summary.own_avg,
"\\$own-total-time" : summary.own_total,
"\\$call-count" : summary.ccount,
"\\$recurse-depth" : summary.recurse,
"\\$function-name" : fromUnicode(summary.fun, MSG_REPORT_CHARSET),

Просмотреть файл

@ -1,4 +1,4 @@
# full-url, file-name, function-name, start-line, end-line, call-count, recurse-depth, total-time, min-time, max-time, avg-time
# full-url, file-name, function-name, start-line, end-line, call-count, recurse-depth, total-time, min-time, max-time, avg-time, own-total-time, own-min-time, own-max-time, own-avg-time
@-item-start
$full-url, $file-name, $function-name, $start-line, $end-line, $call-count, $recurse-depth, $total-time, $min-time, $max-time, $avg-time
$full-url, $file-name, $function-name, $start-line, $end-line, $call-count, $recurse-depth, $total-time, $min-time, $max-time, $avg-time, $own-total-time, $own-min-time, $own-max-time, $own-avg-time
@-item-end

Просмотреть файл

@ -16,6 +16,7 @@ $section-number <$full-url>
Function Name: $function-name (Lines $start-line - $end-line)
Total Calls: $call-count (max recurse $recurse-depth)
Total Time: $total-time (min/max/avg $min-time/$max-time/$avg-time)
Time (ex. calls): $own-total-time (min/max/avg $own-min-time/$own-max-time/$own-avg-time)
@-item-end
-------------------------------------------------------------------------------

Просмотреть файл

@ -29,6 +29,9 @@
mintime="$min-time"
maxtime="$max-time"
totaltime="$total-time"
ownmintime="$own-min-time"
ownmaxtime="$own-max-time"
owntotaltime="$own-total-time"
callcount="$call-count"
function="$function-name"
filename="$file-name"

Просмотреть файл

@ -296,7 +296,8 @@ msn.fmt.frame.line = #%1$S: %2$S"
msn.fmt.frame.location = %1$S, line %2$S, pc %3$S
# 1: function name, 2: start line, 3: end line, 4: call count, 5: recurse,
# 6: total, 7: min, 8: max, 9: avg
msn.fmt.profile.str = %1$S: %2$S-%3$S, %4$S call(s)%5$S, %6$Sms total, %7$Sms min, %8$Sms max, %9$Sms avg
msn.fmt.profile.str = %1$S: %2$S-%3$S, %4$S call(s)%5$S, %6$Sms total, %7$Sms min, %8$Sms max, %9$Sms avg, excluding calls: %10$S
msn.fmt.profile.str2 = %1$Sms total, %2$Sms min, %3$Sms max, %4$Sms avg
# 1: max recurse depth
msn.fmt.profile.recurse = " (max depth %1$S)