[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [collector/master] Add log statement for current memory usage.
commit bddc73ce6700a1498cbffb294de135949d02a41d
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
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 "
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits