Statistics
[hcoop/zz_old/portal.git] / stats.sig
diff --git a/stats.sig b/stats.sig
new file mode 100644 (file)
index 0000000..8bf823c
--- /dev/null
+++ b/stats.sig
@@ -0,0 +1,19 @@
+signature STATS =
+sig
+    type host = {ssl : bool,        (* Is it HTTPS? *)
+                hostname : string, (* Internet hostname *)
+                id : string}       (* Name of stats directory *)
+
+    val getWebbw : int -> int * (host * int) list * (string * host list * int) list
+    (* Get web bandwidth usage stats.  The argument tells how many months ago
+     * to look for the data.  The return gives the total b/w usage, a mapping from
+     * vhosts to kilobytes, and a mapping from usernames to their vhosts and bandwidth
+     * totals. *)
+
+    type disk = {uname : string,    (* UNIX username *)
+                blocks : int,      (* Number of disk blocks used *)
+                files : int}       (* Number of files used *)
+
+    val getDiskUsage : unit -> disk list
+    (* Get /home disk usage statistics, in descending blocks order. *)
+end