-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstatic.patch
98 lines (86 loc) · 2.92 KB
/
static.patch
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
diff --git a/src/bin/dune b/src/bin/dune
index 1d90f04..64b24e0 100644
--- a/src/bin/dune
+++ b/src/bin/dune
@@ -1,5 +1,6 @@
(executable
(name main)
+ (flags (:standard -cclib -static))
(public_name clarke)
(libraries
eio_main
diff --git a/src/bin/main.ml b/src/bin/main.ml
index 681e0ac..74e14b1 100644
--- a/src/bin/main.ml
+++ b/src/bin/main.ml
@@ -82,17 +82,17 @@ module Specs = struct
let output_spec = Cmdliner.Arg.conv (output_spec_of_string, pp_output_spec)
- type meter_spec = [ `Const of float | `Ipmi of string | `Variorum ]
+ type meter_spec = [ `Const of float | `Ipmi of string (* | `Variorum *) ]
let meter_of_meter_spec ~clock ~process_mgr : meter_spec -> S.meter = function
| `Const f -> Models.const ~clock f
| `Ipmi sensor ->
S.Meter ((module Clarke.Models.Ipmi), { clock; process_mgr; sensor })
- | `Variorum -> S.Meter ((module Clarke.Models.Variorum), { clock })
+ (* | `Variorum -> S.Meter ((module Clarke.Models.Variorum), { clock }) *)
let meter_spec_of_string s : (meter_spec, [ `Msg of string ]) result =
match String.lowercase_ascii s with
- | "variorum" -> Ok `Variorum
+ (* | "variorum" -> Ok `Variorum *)
| "ipmi" -> Ok (`Ipmi "Pwr Consumption")
| v -> (
match String.split_on_char ':' v with
@@ -106,7 +106,7 @@ module Specs = struct
let pp_meter_spec ppf : meter_spec -> unit = function
| `Const f -> Format.fprintf ppf "const:%.2fW" f
- | `Variorum -> Format.pp_print_string ppf "variorum"
+ (* | `Variorum -> Format.pp_print_string ppf "variorum" *)
| `Ipmi s -> Format.fprintf ppf "ipmi:%s" s
let meter_spec = Cmdliner.Arg.conv (meter_spec_of_string, pp_meter_spec)
diff --git a/src/lib/dune b/src/lib/dune
index 5955c98..95836db 100644
--- a/src/lib/dune
+++ b/src/lib/dune
@@ -12,7 +12,7 @@
(libraries
eio.unix
ptime
- variorum
+ ; variorum
ezjsonm
prometheus
carbon
diff --git a/src/lib/models.ml b/src/lib/models.ml
index 971a6f7..684e593 100644
--- a/src/lib/models.ml
+++ b/src/lib/models.ml
@@ -27,7 +27,7 @@ let time ~clock f =
end in
S.Meter ((module M : S.Meter with type t = M.t), M.{ clock })
-module Variorum = struct
+(* module Variorum = struct
open Variorum
open Eio
@@ -42,7 +42,7 @@ module Variorum = struct
Info.v
(Option.get (Ptime.of_float_s @@ Time.now t.clock))
(Node_power.power_node s)
-end
+end *)
module Ipmi = struct
module Cmd = struct
diff --git a/src/lib/models.mli b/src/lib/models.mli
index 3e95e63..41d43b8 100644
--- a/src/lib/models.mli
+++ b/src/lib/models.mli
@@ -16,11 +16,11 @@ val time : clock:Time.clock -> (Ptime.t -> float) -> S.meter
[fn] is a function from the current time to the energy usage. *)
(** Variorum-based metric collecting *)
-module Variorum : sig
+(* module Variorum : sig
type t = { clock : Time.clock }
include S.Meter with type t := t
-end
+end *)
(** IPMI-based metric collecting *)
module Ipmi : sig