Skip to content

Commit b149cba

Browse files
authored
Merge master into feature/config-ntp-timezone-maxcstate (#6705)
2 parents c7e0f7c + 8654f0c commit b149cba

File tree

193 files changed

+545
-421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+545
-421
lines changed

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(lang dune 3.15)
1+
(lang dune 3.20)
22

33
(formatting
44
(enabled_for ocaml))

ocaml/database/dune

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
threads.posix
5252
http_lib
5353
httpsvr
54+
unix
5455
uuid
5556
xapi-backtrace
5657
xapi-datamodel
@@ -78,6 +79,7 @@
7879
(name block_device_io)
7980
(modules block_device_io)
8081
(libraries
82+
unix
8183
xapi_database
8284
xapi-log
8385
xapi-stdext-pervasives
@@ -98,6 +100,7 @@
98100
http_lib
99101
httpsvr
100102
threads.posix
103+
unix
101104
xapi_database
102105
xapi-stdext-threads
103106
xapi-stdext-unix))
@@ -113,6 +116,7 @@
113116
rpclib.xml
114117
sexplib
115118
sexplib0
119+
unix
116120
xapi_database
117121
xml-light2))
118122

ocaml/database/stats.ml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ let sd (p : Normal_population.t) =
6868
in
6969
sqrt v
7070

71-
let string_of (p : Normal_population.t) =
72-
Printf.sprintf "%f [sd = %f]" (mean p) (sd p)
71+
let string_of ?(counts = false) (p : Normal_population.t) =
72+
match counts with
73+
| false ->
74+
Printf.sprintf "%f [sd = %f]" (mean p) (sd p)
75+
| true ->
76+
Printf.sprintf "%f [sd = %f, n=%d]" (mean p) (sd p) p.n
7377

7478
(** [sample thing t] records new time [t] for population named [thing] *)
7579
let sample (name : string) (x : float) : unit =
@@ -104,7 +108,7 @@ let time_this (name : string) f =
104108
name
105109
)
106110

107-
let summarise () =
111+
let summarise ?(counts = false) () =
108112
with_lock timings_m (fun () ->
109-
Hashtbl.fold (fun k v acc -> (k, string_of v) :: acc) timings []
113+
Hashtbl.fold (fun k v acc -> (k, string_of ~counts v) :: acc) timings []
110114
)

ocaml/database/stats.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* GNU Lesser General Public License for more details.
1313
*)
1414

15-
val summarise : unit -> (string * string) list
15+
val summarise : ?counts:bool -> unit -> (string * string) list
1616
(** Produce a string name -> string mean, standard deviation summary for each population *)
1717

1818
val time_this : string -> (unit -> 'a) -> 'a

ocaml/doc/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
mustache
66
rpclib.core
77
rpclib.json
8+
unix
89
uuid
910
xapi-consts
1011
xapi-datamodel

ocaml/forkexecd/cli/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(executable
22
(modes exe)
33
(name fe_cli)
4-
(libraries forkexec))
4+
(libraries forkexec unix))
55

66
(install
77
(package xapi-forkexecd)

ocaml/forkexecd/lib/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
rpclib.core
1111
rpclib.json
1212
rpclib.xml
13+
unix
1314
uuid
1415
xapi-backtrace
1516
xapi-log

ocaml/forkexecd/src/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
astring
66
fd-send-recv
77
forkexec
8+
unix
89
uuid
910
xapi-log
1011
xapi-stdext-unix

ocaml/forkexecd/test/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(executable
22
(modes exe)
33
(name fe_test)
4-
(libraries fmt forkexec mtime clock mtime.clock.os uuid xapi-stdext-unix fd-send-recv xapi-log))
4+
(libraries fmt forkexec mtime clock mtime.clock.os str uuid xapi-stdext-unix fd-send-recv xapi-log unix))
55

66
; preload library to redirect "/dev/log"
77
(rule

ocaml/gencert/dune

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
ptime.clock.os
1717
result
1818
rresult
19+
unix
1920
x509
2021
xapi-backtrace
2122
xapi-consts
@@ -32,6 +33,7 @@
3233
(libraries
3334
astring
3435
gencertlib
36+
unix
3537
x509
3638
xapi-inventory
3739
xapi_aux

0 commit comments

Comments
 (0)