Issue 467 - provide JVM heap usage as part of the progress monitor during project creation.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@2341 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
ff7bbc8ec0
commit
9a9f4c1354
@ -635,7 +635,7 @@ public class ImportingUtilities {
|
||||
|
||||
static public String getEncoding(JSONObject fileRecord) {
|
||||
String encoding = JSONUtilities.getString(fileRecord, "encoding", null);
|
||||
if (encoding == null) {
|
||||
if (encoding == null || encoding.isEmpty()) {
|
||||
encoding = JSONUtilities.getString(fileRecord, "declaredEncoding", null);
|
||||
}
|
||||
return encoding;
|
||||
@ -942,5 +942,7 @@ public class ImportingUtilities {
|
||||
}
|
||||
JSONUtilities.safePut(progress, "message", message);
|
||||
JSONUtilities.safePut(progress, "percent", percent);
|
||||
JSONUtilities.safePut(progress, "memory", Runtime.getRuntime().totalMemory() / 1000000);
|
||||
JSONUtilities.safePut(progress, "maxmemory", Runtime.getRuntime().maxMemory() / 1000000);
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
<tr><td colspan="3">
|
||||
<button class="button" id="create-project-progress-cancel-button">Cancel</button>
|
||||
<span id="create-project-progress-timing"></span>
|
||||
<span id="create-project-progress-memory"></span>
|
||||
</td></tr>
|
||||
</table></div>
|
||||
<iframe id="create-project-iframe" name="create-project-iframe"></iframe>
|
||||
|
@ -228,6 +228,7 @@ 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");
|
||||
}
|
||||
},
|
||||
"json"
|
||||
|
Loading…
Reference in New Issue
Block a user