commit bddc73ce6700a1498cbffb294de135949d02a41d Author: Karsten Loesing karsten.loesing@gmx.net Date: Thu Dec 10 22:08:42 2020 +0100
Add log statement for current memory usage. --- .../org/torproject/metrics/collector/indexer/CreateIndexJson.java | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/main/java/org/torproject/metrics/collector/indexer/CreateIndexJson.java b/src/main/java/org/torproject/metrics/collector/indexer/CreateIndexJson.java index 3d86947..887a3e1 100644 --- a/src/main/java/org/torproject/metrics/collector/indexer/CreateIndexJson.java +++ b/src/main/java/org/torproject/metrics/collector/indexer/CreateIndexJson.java @@ -245,6 +245,10 @@ public class CreateIndexJson extends CollecTorMain { logger.info("Writing uncompressed and compressed index.json files to " + "disk."); this.writeIndex(this.index, now); + Runtime rt = Runtime.getRuntime(); + logger.info("Current memory usage is: free = {} B, total = {} B, " + + "max = {} B.", + rt.freeMemory(), rt.totalMemory(), rt.maxMemory()); logger.info("Pausing until next index update run."); } catch (IOException e) { logger.error("I/O error while updating index.json files. Trying again in "