[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/utils/net/ip_set.ml
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/utils/net/ip_set.ml |
Date: |
Mon, 05 Dec 2005 13:37:36 -0500 |
Index: mldonkey/src/utils/net/ip_set.ml
diff -u mldonkey/src/utils/net/ip_set.ml:1.19
mldonkey/src/utils/net/ip_set.ml:1.20
--- mldonkey/src/utils/net/ip_set.ml:1.19 Sat Nov 19 17:19:45 2005
+++ mldonkey/src/utils/net/ip_set.ml Mon Dec 5 18:37:34 2005
@@ -19,6 +19,8 @@
end)
let descriptions = H.create 13
+let ranges_1 = ref 0 (* ranges in blocklist file *)
+let ranges_2 = ref 0 (* ranges after optimization *)
let shared_description s =
(* Currently trims strings left and right;
@@ -220,6 +222,8 @@
if remove then (try Sys.remove filename with _ -> ());
let optimized_bl = bl_optimize !bl in
lprintf_nl () "%d ranges loaded - optimized to %d" !nranges (bl_length
optimized_bl);
+ ranges_1 := !nranges;
+ ranges_2 := bl_length optimized_bl;
(* bl_optimizedp optimized_bl;
for i=0 to 999999 do
let random_ip = Ip.of_ints (Random.int 256, Random.int 256, Random.int
256, Random.int 256) in
@@ -344,7 +348,7 @@
nleft + 1 + nright in
let count = print_list_aux bl in
- Printf.bprintf buf "%d ranges\n" count
+ Printf.bprintf buf "%d ranges loaded - optimized to %d\n" !ranges_1 !ranges_2
let bl = ref BL_Empty
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Mldonkey-commits] Changes to mldonkey/src/utils/net/ip_set.ml,
mldonkey-commits <=