From 2c449165e42f59fa6dfa8186bfca8c371de4c51a Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Wed, 11 Feb 2015 15:19:07 +0100 Subject: Adding a statistic function on hashconsing tables. --- lib/hashcons.ml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/hashcons.ml') diff --git a/lib/hashcons.ml b/lib/hashcons.ml index 752e2634a6..46ba0b6285 100644 --- a/lib/hashcons.ml +++ b/lib/hashcons.ml @@ -43,6 +43,7 @@ module type S = type table val generate : u -> table val hcons : table -> t -> t + val stats : table -> Hashset.statistics end module Make (X : HashconsedType) : (S with type t = X.t and type u = X.u) = @@ -67,6 +68,8 @@ module Make (X : HashconsedType) : (S with type t = X.t and type u = X.u) = let y = X.hashcons u x in Htbl.repr (X.hash y) y tab + let stats (tab, _) = Htbl.stats tab + end (* A few usefull wrappers: -- cgit v1.2.3