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:
Родитель
67d1560bf3
Коммит
77fcaf8f2e
|
@ -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 +0,0 @@
|
|||
# full-url, file-name, function-name, start-line, end-line, call-count, recurse-depth, total-time, min-time, max-time, 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
|
||||
@-item-end
|
|
@ -1,30 +0,0 @@
|
|||
|
||||
Venkman Profile Report
|
||||
|
||||
Created .......... $full-date
|
||||
User Agent ....... $user-agent
|
||||
Debugger Version . $venkman-agent
|
||||
Sorted By ........ $sort-key
|
||||
|
||||
=================================================================================
|
||||
@-section-start
|
||||
$section-number <$full-url>
|
||||
|
||||
@-range-start
|
||||
$file-name: $range-min - $range-max milliseconds
|
||||
@-item-start
|
||||
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)
|
||||
|
||||
@-item-end
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
@-range-end
|
||||
=================================================================================
|
||||
|
||||
@-section-end
|
||||
|
||||
|
||||
Thanks for using Venkman, the Mozilla JavaScript Debugger.
|
||||
<http://www.mozilla.org/projects/venkman>
|
|
@ -1,43 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://venkman/content/profile.xml" type="text/xsl"?>
|
||||
<profile xmlns="http://www.mozilla.org/venkman/0.9/profiler"
|
||||
collected="$full-date"
|
||||
useragent="$user-agent"
|
||||
version="$venkman-agent"
|
||||
sortkey="$sort-key">
|
||||
@-section-start
|
||||
<section section="S$section-number"
|
||||
prevsection="S$section-number-prev"
|
||||
nextsection="S$section-number-next"
|
||||
href="$full-url"
|
||||
filename="$file-name">
|
||||
@-range-start
|
||||
<range range="S$section-number:$range-number"
|
||||
prevsection="S$section-number-prev"
|
||||
nextsection="S$section-number-next"
|
||||
prevrange="S$section-number:$range-number-prev"
|
||||
nextrange="S$section-number:$range-number-next"
|
||||
min="$range-min"
|
||||
max="$range-max">
|
||||
@-item-start
|
||||
<item item="S$section-number:$range-number:$item-number"
|
||||
itemnumber="$item-number"
|
||||
summary="$item-summary"
|
||||
minpercent="$item-min-pct"
|
||||
belowpercent="$item-below-pct"
|
||||
abovepercent="$item-above-pct"
|
||||
mintime="$min-time"
|
||||
maxtime="$max-time"
|
||||
totaltime="$total-time"
|
||||
callcount="$call-count"
|
||||
function="$function-name"
|
||||
filename="$file-name"
|
||||
fileurl="$full-url"
|
||||
startline="$start-line"
|
||||
endline="$end-line"/>
|
||||
@-item-end
|
||||
</range>
|
||||
@-range-end
|
||||
</section>
|
||||
@-section-end
|
||||
</profile>
|
|
@ -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)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче