FIXED - task 607: Make memory/heap reporting more user-friendly

http://code.google.com/p/google-refine/issues/detail?id=607

git-svn-id: http://google-refine.googlecode.com/svn/trunk@2542 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Tom Morris 2012-09-07 21:49:00 +00:00
parent 93d6e176d6
commit 9f7d0bc057
2 changed files with 17 additions and 1 deletions

View File

@ -228,7 +228,15 @@ Refine.CreateProjectUI.prototype.pollImportJob = function(start, jobID, timerID,
$('#create-project-progress-timing').empty();
}
$('#create-project-progress-message').text(progress.message);
$('#create-project-progress-memory').text("Heap usage: "+progress.memory+'/'+progress.maxmemory+"MB");
if ('memory' in progress) {
var percent = progress.memory * 100.0 / progress.maxmemory;
$('#create-project-progress-memory').text("Memory usage: "+percent.toFixed()+'% ('+progress.memory+'/'+progress.maxmemory+"MB)");
if (percent > 90) {
$('#create-project-progress-memory').addClass('warning');
} else {
$('#create-project-progress-memory').removeClass('warning');
}
}
}
},
"json"

View File

@ -122,6 +122,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
background: #eee;
width: 100%;
}
#create-project-progress-memory {
}
#create-project-progress-memory.warning {
color: #D8000C;
background-color: #FFBABA;
}
#create-project-iframe {
position: fixed;