No bug - Remove unnecessary console.log calls from Cleopatra code; r=dcamp

This commit is contained in:
Anton Kovalyov 2013-07-10 18:28:10 -07:00
parent b919e9d555
commit 3bccfad489
3 changed files with 3 additions and 24 deletions

View File

@ -51,8 +51,7 @@ function WorkerRequest(worker) {
var startTime = Date.now();
var data = msg.data;
var readTime = Date.now() - startTime;
if (readTime > 10)
console.log("reading data from worker message: " + readTime + "ms");
if (data.requestID == requestID || !data.requestID) {
switch(data.type) {
case "error":
@ -125,8 +124,6 @@ WorkerRequest.prototype = {
taskData: taskData
});
var postTime = Date.now() - startTime;
if (true || postTime > 10)
console.log("posting message to worker: " + postTime + "ms");
this._sendChunkReporter.finish();
this._executeReporter.begin("Processing worker request...");
},
@ -164,8 +161,6 @@ WorkerRequest.prototype = {
var startTime = Date.now();
self._worker.postMessage(msg);
var postTime = Date.now() - startTime;
if (postTime > 10)
console.log("posting message to worker: " + postTime + "ms");
self._sendChunkReporter.setProgress((msgIndex + 1) / totalMessages);
}
var messagePostingTimer = 0;
@ -214,7 +209,6 @@ WorkerRequest.prototype = {
var Parser = {
parse: function Parser_parse(data, params) {
console.log("profile num chars: " + data.length);
var request = new WorkerRequest(gParserWorker);
request.sendInChunks("parseRawProfile", data, params, 3000000);
return request;

View File

@ -177,7 +177,6 @@ TreeView.prototype = {
},
// Take a selection snapshot and restore the selection
restoreSelectionSnapshot: function TreeView_restoreSelectionSnapshot(snapshot, allowNonContigious) {
//console.log("restore selection: " + JSON.stringify(snapshot));
var currNode = this._horizontalScrollbox.firstChild;
if (currNode.data.name == snapshot[0] || snapshot[0] == "(total)") {
snapshot.shift();
@ -188,7 +187,6 @@ TreeView.prototype = {
this._syncProcessPendingActionProcessing();
for (var i = 0; i < currNode.treeChildren.length; i++) {
if (currNode.treeChildren[i].data.name == snapshot[0]) {
//console.log("Found: " + currNode.treeChildren[i].data.name + "\n");
snapshot.shift();
this._toggle(currNode, false, true);
currNode = currNode.treeChildren[i];
@ -200,7 +198,6 @@ TreeView.prototype = {
var pendingSearch = [currNode.data];
while (pendingSearch.length > 0) {
var node = pendingSearch.shift();
//console.log("searching: " + node.name + " for: " + snapshot[0] + "\n");
if (!node.treeChildren)
continue;
for (var i = 0; i < node.treeChildren.length; i++) {

View File

@ -627,7 +627,6 @@ RangeSelector.prototype = {
},
// echo the location off the mouse on the histogram
drawMouseMarker: function RangeSelector_drawMouseMarker(x) {
console.log("Draw");
var mouseMarker = this._mouseMarker;
mouseMarker.style.left = x + "px";
},
@ -814,12 +813,10 @@ window.onpopstate = function(ev) {
return; // Conflicts with document url
if (!gBreadcrumbTrail)
return;
console.log("pop: " + JSON.stringify(ev.state));
gBreadcrumbTrail.pop();
if (ev.state) {
console.log("state");
if (ev.state.action === "popbreadcrumb") {
console.log("bread");
//gBreadcrumbTrail.pop();
}
}
@ -908,8 +905,7 @@ BreadcrumbTrail.prototype = {
//var state = {action: "popbreadcrumb",};
//window.history.pushState(state, "Cleopatra");
}
if (!li)
console.log("li at index " + index + " is null!");
delete li.breadcrumbIsTransient;
li.classList.add("selected");
this._deleteBeyond(index);
@ -1469,7 +1465,6 @@ function loadRawProfile(reporter, rawProfile, profileId) {
reporter.setProgress(progress);
});
parseRequest.addEventListener("finished", function (result) {
console.log("parsing (in worker): " + (Date.now() - startTime) + "ms");
reporter.finish();
gMeta = result.meta;
gNumSamples = result.numSamples;
@ -1518,7 +1513,6 @@ function toggleInvertCallStack() {
gInvertCallstack = !gInvertCallstack;
var startTime = Date.now();
viewOptionsChanged();
console.log("invert time: " + (Date.now() - startTime) + "ms");
}
var gMergeUnbranched = false;
@ -1675,7 +1669,6 @@ function enterProgressUI() {
totalProgressReporter.addListener(function (r) {
var progress = r.getProgress();
progressLabel.innerHTML = r.getAction();
console.log("Action: " + r.getAction());
if (isNaN(progress))
progressBar.removeAttribute("value");
else
@ -1852,7 +1845,6 @@ function filtersChanged() {
});
var start = Date.now();
updateRequest.addEventListener("finished", function (filteredSamples) {
console.log("profile filtering (in worker): " + (Date.now() - start) + "ms.");
gCurrentlyShownSampleData = filteredSamples;
gInfoBar.display();
@ -1860,7 +1852,6 @@ function filtersChanged() {
start = Date.now();
gPluginView.display(gSampleFilters[gSampleFilters.length-1].pluginName, gSampleFilters[gSampleFilters.length-1].param,
gCurrentlyShownSampleData, gHighlightedCallstack);
console.log("plugin displaying: " + (Date.now() - start) + "ms.");
} else {
gPluginView.hide();
}
@ -1872,7 +1863,6 @@ function filtersChanged() {
gHistogramView.display(data.histogramData, data.frameStart, data.widthSum, gHighlightedCallstack);
if (gFrameView)
gFrameView.display(data.histogramData, data.frameStart, data.widthSum, gHighlightedCallstack);
console.log("histogram displaying: " + (Date.now() - start) + "ms.");
});
if (gDiagnosticBar) {
@ -1880,7 +1870,6 @@ function filtersChanged() {
diagnosticsRequest.addEventListener("finished", function (diagnosticItems) {
start = Date.now();
gDiagnosticBar.display(diagnosticItems);
console.log("diagnostic items displaying: " + (Date.now() - start) + "ms.");
});
}
@ -1897,7 +1886,6 @@ function viewOptionsChanged() {
updateViewOptionsRequest.addEventListener("finished", function (calltree) {
var start = Date.now();
gTreeManager.display(calltree, gSymbols, gFunctions, gResources, gMergeFunctions, filterNameInput && filterNameInput.value);
console.log("tree displaying: " + (Date.now() - start) + "ms.");
});
}