Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/dune_trace/category.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type t =
| Promote
| Build
| Debug
| Config

let all =
[ Rpc
Expand All @@ -27,6 +28,7 @@ let all =
; Promote
; Build
; Debug
; Config
]
;;

Expand All @@ -43,6 +45,7 @@ let to_string = function
| Promote -> "promote"
| Build -> "build"
| Debug -> "debug"
| Config -> "config"
;;

let of_string =
Expand Down Expand Up @@ -71,5 +74,6 @@ module Set = Bit_set.Make (struct
| Promote -> 9
| Build -> 10
| Debug -> 11
| Config -> 12
;;
end)
1 change: 1 addition & 0 deletions src/dune_trace/category.mli
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type t =
| Promote
| Build
| Debug
| Config

val to_string : t -> string
val of_string : string -> t option
Expand Down
1 change: 1 addition & 0 deletions src/dune_trace/dune_trace.mli
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module Category : sig
| Promote
| Build
| Debug
| Config

val of_string : string -> t option
end
Expand Down
8 changes: 6 additions & 2 deletions src/dune_trace/event.ml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,18 @@ let config ~version =
in
let open Chrome_trace in
let ts = make_ts (Time.now ()) in
let common = Event.common_fields ~cat:[ "config" ] ~name:"config" ~ts () in
let common =
Event.common_fields ~cat:[ Category.to_string Config ] ~name:"config" ~ts ()
in
Event.instant ~args common
;;

let exit () =
let open Chrome_trace in
let ts = make_ts (Time.now ()) in
let common = Event.common_fields ~cat:[ "config" ] ~name:"exit" ~ts () in
let common =
Event.common_fields ~cat:[ Category.to_string Config ] ~name:"exit" ~ts ()
in
Event.instant common
;;

Expand Down
Loading