Skip to content

Commit

Permalink
Benchmarks: record uname, Eio backend, and number of cores
Browse files Browse the repository at this point in the history
  • Loading branch information
talex5 committed Mar 25, 2024
1 parent c53d897 commit 94ab6cb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bench/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ let () =
"metrics", `List metrics;
]
in
(* The benchmark machine runs an old Docker that blocks pidfd_open *)
(* let uname = Eio.Process.parse_out env#process_mgr Eio.Buf_read.take_all ["uname"; "-a"] in *)
let uname =
let ch = Unix.open_process_in "uname -a" in
let x = input_line ch in
close_in ch;
x
in
Fmt.pr "%a@." (Yojson.Safe.pretty_print ~std:true) @@ `Assoc [
"config", `Assoc [
"uname", `String uname;
"backend", `String env#backend_id;
"recommended_domain_count", `Int (Domain.recommended_domain_count ());
];
"results", `List (List.map run benchmarks);
]

0 comments on commit 94ab6cb

Please sign in to comment.