Skip to content

Commit

Permalink
Count only.
Browse files Browse the repository at this point in the history
  • Loading branch information
smimram committed Jun 7, 2024
1 parent cacacbd commit 8d428fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/inspect.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ let show_plugin p =
Printf.printf "\n%!"

let () =
let count = ref false in
Arg.parse [
"--count", Arg.Set count, " Only count plugins."
] (fun _ -> ()) "inspect [options]";
let w = World.create () in
World.load_all w;
let pp = World.plugins w in
Printf.printf "We have %d plugins.\n\n%!" (Plugins.length pp);
Plugins.iter show_plugin pp;
if not !count then Plugins.iter show_plugin pp;
Gc.full_major ()

0 comments on commit 8d428fa

Please sign in to comment.