/
common.ml
55 lines (49 loc) · 1.64 KB
/
common.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
let urls =
[ "http://ocsigen.org"
; "http://openmirage.org"
; "http://ddg.gg"
; "http://github.com"
; "http://www.ocsigen.org"
; "http://www.openmirage.org"
; "http://www.ddg.gg"
; "http://www.github.com"
; "http://caml.inria.fr"
; "http://www.lri.fr/~marche/regexp/regexp-0.3.tar.gz"
; "http://ocsigen.org/lwt/api/Lwt"
; "http://www.lri.fr/~marche/regexp/regexp-0.3.tar.gz"
; "http://ocsigen.org/lwt/api/Lwt"
; "http://ocsi"
; "http://nodejs.org/docs/v0.3.1/api/buffers.html"
; "http://help.ubuntu.com/community/UpgradeNotes"
; "http://www-uxsup.csx.cam.ac.uk/pub/linux/ubuntu/"
; "http://www-uxsup.csx.cam.ac.uk/pub/linux/ubuntu"
; "http://extras.ubuntu.com/ubuntu"
; "http://ocsigen.org/js_of_ocaml/sources/lib/regexp.mli"
; "http://www.lri.fr/~marche/regexp/regexp-0.3.tar.gz"
; "http://ocsigen.org/lwt/api/Lwt"
; "http://ocsigen.org/js_of_ocaml/sources/lib/regexp.mli"
; "http:/nodejs.org/docs/v0.3.1/api/buffers.html"
; "http://help.ubuntu.com/community/UpgradeNotes"
; "http://www-uxsup.csx.cam.ac.uk/pub/linux/ubuntu/"
; "http://www-uxsup.csx.cam.ac.uk/pub/linux/ubuntu"
; "http://extras.ubuntu.com/ubuntu"
; "http/nodejs.org/docs/v0.3.1/api/buffers.html"
; "http://help.ubuntu.com/community/UpgradeNotes"
; "http://www-uxsup.csx.cam.ac.uk/pub/linux/ubuntu/"
; "ht//www-uxsup.csx.cam.ac.uk/pub/linux/ubuntu"
; "httpxtras://.ubuntu.com/ubuntu"
; "http://twitter.com"
]
let time f =
let t0 = Unix.gettimeofday () in
ignore (f ());
let tf = Unix.gettimeofday () in
tf -. t0
let run_n f n =
let rec aux m =
if m >= n then
()
else
(ignore (f ()); aux (succ m))
in
aux 0