[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/utils/net/ip.ml
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/utils/net/ip.ml |
Date: |
Thu, 07 Jul 2005 13:22:43 -0400 |
Index: mldonkey/src/utils/net/ip.ml
diff -u mldonkey/src/utils/net/ip.ml:1.9 mldonkey/src/utils/net/ip.ml:1.10
--- mldonkey/src/utils/net/ip.ml:1.9 Thu Jul 7 00:25:46 2005
+++ mldonkey/src/utils/net/ip.ml Thu Jul 7 17:22:43 2005
@@ -156,7 +156,7 @@
with _ ->
lprintf "[NS]: Resolving [%s] ..." name;
let ip = gethostbyname name in
- lprintf "[NS]: done\n";
+ lprintf_nl "[NS]: done";
Hashtbl.add ip_cache name (ip, current_time +. 3600.);
ip
@@ -233,6 +233,12 @@
(* We check for names every 1/10 second. Too long ? *)
let _ =
+ Heap.add_memstat "IP" (fun level buf ->
+ Printf.bprintf buf " %d IPs in ip_cache\n" (Hashtbl.length ip_cache);
+ Printf.bprintf buf " %d entries in hostname_table\n" (Hashtbl.length
hostname_table);
+ Printf.bprintf buf " %d entries in ip_fifo\n" (Fifo.length ip_fifo);
+ );
+
BasicSocket.add_infinite_timer 0.1 (fun _ ->
let current_time = Unix.gettimeofday () in
while true do