let dump () =
  let filename = Metrics_parameters.Dump.get () in
  try
    let cout = open_out_bin filename in
    let fmt = Format.formatter_of_out_channel cout in
    pretty fmt;
    close_out cout
  with Sys_error _ as e ->
    Metrics_parameters.warning "Cannot open file \"%s\" for dumping metrics: %s"
      filename (Printexc.to_string e)