1234567891011121314151617181920212223242526272829303132(** Utilities for trace command line tools to use to make it easy to view traces *)open!Coreopen!AsyncmoduletypeS=sigtypet(** Offers configuration parameters for where to save a file and whether to serve it *)valparam:tCommand.Param.t(** After [f] writes a trace, either hosts a Perfetto UI server for the resulting file or
just saves it and prints a message about how to view the resulting trace.
It is the responsibility of [f] to close the writer and Perfetto may fail to load
the trace if the writer isn't closed. *)valwrite_and_view:?num_temp_strs:int->t->default_name:string->f:(Tracing_zero.Writer.t->'aDeferred.Or_error.t)->'aDeferred.Or_error.t(** Used to view existing trace files in a hosted UI *)moduleServe:sigtypetvalparam:tCommand.Param.tvalcreate:port:int->open_in_browser:bool->tvalserve_file:t->path:string->unitDeferred.Or_error.tendend