Skip to content

Commit

Permalink
auto-format, update to recent ocamlformat
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Mar 3, 2023
1 parent 431821f commit 087ea9f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 0.21.0
version = 0.24.1
profile = conventional

parse-docstrings = true
13 changes: 7 additions & 6 deletions lib/memory.ml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ let metrics ?(quick = true) ~tags () =
let data () =
let stat = stat () in
Data.v
[ uint "memory heap words" stat.heap_words
; uint "memory live words" stat.live_words
; uint "memory stack words" stat.stack_words
; uint "memory free words" stat.free_words ]
[
uint "memory heap words" stat.heap_words;
uint "memory live words" stat.live_words;
uint "memory stack words" stat.stack_words;
uint "memory free words" stat.free_words;
]
in
Src.v ~doc ~tags ~data "memory"

let () =
Metrics_lwt.periodically (metrics ~tags:Metrics.Tags.[] ())
let () = Metrics_lwt.periodically (metrics ~tags:Metrics.Tags.[] ())
5 changes: 4 additions & 1 deletion lib/xen_os.mli
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ module Memory : sig
(** [trim ()] release free memory from the heap (may update the value returned
by {!quick_stat}) *)

val metrics : ?quick:bool -> tags:'a Metrics.Tags.t -> unit ->
val metrics :
?quick:bool ->
tags:'a Metrics.Tags.t ->
unit ->
('a, unit -> Metrics.Data.t) Metrics.src
(** [metrics ~quick ~tags] is a metrics source calling {quick_stat} (unless
[quick] is set to [false]) or {stat}. By default, this metrics source is
Expand Down

0 comments on commit 087ea9f

Please sign in to comment.