Skip to content

Commit

Permalink
Removed hardcoded System.gc()
Browse files Browse the repository at this point in the history
  • Loading branch information
menzowindhouwer committed Oct 10, 2016
1 parent 016ea33 commit 19d1dc6
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/main/java/ORG/oclc/oai/harvester2/verb/HarvesterVerb.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,20 +354,6 @@ public void harvest(String requestURL, int timeout, Path temp) throws MalformedU
in = con.getInputStream();
}

// maybe we're lucky
System.gc();
logger.debug("Content-Length=" + con.getHeaderField("Content-Length"));
ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
logger.debug("Heap="+ManagementFactory.getMemoryMXBean().getHeapMemoryUsage());
logger.debug("NonHeap="+ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage());
List<MemoryPoolMXBean> beans = ManagementFactory.getMemoryPoolMXBeans();
for (MemoryPoolMXBean bean: beans) {
logger.debug(bean.getName()+"="+bean.getUsage());
}
for (GarbageCollectorMXBean bean: ManagementFactory.getGarbageCollectorMXBeans()) {
logger.debug(bean.getName()+"="+bean.getCollectionCount(), bean.getCollectionTime());
}

if (temp!=null) {
FileOutputStream out = new FileOutputStream(temp.toFile());
org.apache.commons.io.IOUtils.copy(in,out,1000000);
Expand Down

0 comments on commit 19d1dc6

Please sign in to comment.