context:     logProfileReport: function(context)    {        var calls = [];        var totalCalls = 0;        var totalTime = 0;                updateScriptFiles(context);        var sourceFileMap = context.sourceFileMap;                jsd.enumerateScripts({enumerateScript: function(script)        {            if (script.callCount)            {                var sourceLink = FBL.getSourceForScript(script, context);                if (sourceLink && sourceLink.href in sourceFileMap)                 {                    var call = new ProfileCall(script, context, script.callCount, script.totalExecutionTime,                        script.totalOwnExecutionTime, script.minExecutionTime, script.maxExecutionTime, sourceLink);                    calls.push(call);                                        totalCalls += script.callCount;                    totalTime += script.totalOwnExecutionTime;                                        script.clearProfileData();                }            }        }});        for (var i = 0; i < calls.length; ++i)            calls[i].percent = Math.round((calls[i].totalOwnTime/totalTime) * 100 * 100) / 100;                calls.sort(function(a, b)        {           return a.totalOwnTime < b.totalOwnTime ? 1 : -1;        });        totalTime = Math.round(totalTime * 1000) / 1000;                var groupRow = context.profileRow && context.profileRow.ownerDocument            ? context.profileRow            : this.logProfileRow(context, "");        delete context.profileRow;        removeClass(groupRow, "profilerRunning");                if (totalCalls > 0)        {                        var captionBox = getElementByClass(groupRow, "profileCaption");            if (!groupRow.customMessage)                captionBox.textContent = $STR("Profile");            var timeBox = getElementByClass(groupRow, "profileTime");            timeBox.textContent = $STRF("ProfileTime", [totalTime, totalCalls]);            var groupBody = groupRow.lastChild;            var table = Firebug.Profiler.ProfileTable.tag.replace({}, groupBody);            var tbody = table.lastChild;            var tag = Firebug.Profiler.ProfileCall.tag;            var insert = tag.insertRows;            for (var i = 0; i < calls.length; ++i)                context.throttle(insert, tag, [{object: calls[i]}, tbody]);            context.throttle(groupRow.scrollIntoView, groupRow);        }        else        {            var captionBox = getElementByClass(groupRow, "profileCaption");            captionBox.textContent = $STR("NothingToProfile");        }    }
meta: 7450	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/7450/e1d42ad3fad63b72826a4e2ed0726866484c9ac3/profiler.js/clean/extension/content/firebug/profiler.js