File tree Expand file tree Collapse file tree 5 files changed +14
-3
lines changed
test/blackbox-tests/test-cases/sandbox Expand file tree Collapse file tree 5 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1+ - Add sandbox extraction trace event (#13544 , @rgrinberg )
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ let move_targets_to_build_dir t ~should_be_skipped ~(targets : Targets.Validated
274274 : unit Fiber. t
275275 =
276276 let open Fiber.O in
277- let + _start, _finish, _queued =
277+ let + start, stop, queued =
278278 maybe_async (fun () ->
279279 Option. iter t.snapshot ~f: (fun old_snapshot ->
280280 register_snapshot_promotion t targets ~old_snapshot );
@@ -308,7 +308,8 @@ let move_targets_to_build_dir t ~should_be_skipped ~(targets : Targets.Validated
308308 if Path.Untracked. exists (Path. build src_dir)
309309 then Unix. rename (Path.Build. to_string src_dir) (Path.Build. to_string target)))
310310 in
311- ()
311+ Dune_trace. emit ~buffered: true Sandbox (fun () ->
312+ Dune_trace.Event. sandbox `Extract ~start ~stop ~queued t.loc ~dir: t.dir)
312313;;
313314
314315let failed_to_delete_sandbox dir reason =
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ module Event : sig
3838 type t
3939
4040 val sandbox
41- : [ `Create | `Snapshot | `Destroy ]
41+ : [ `Create | `Snapshot | `Destroy | `Extract ]
4242 -> start:Time. t
4343 -> stop:Time. t
4444 -> queued:Time.Span. t option
Original file line number Diff line number Diff line change @@ -761,6 +761,7 @@ let sandbox name ~start ~stop ~queued loc ~dir =
761761 | `Destroy -> " destroy"
762762 | `Snapshot -> " snapshot"
763763 | `Create -> " create"
764+ | `Extract -> " extract"
764765 in
765766 Event. complete ~args ~name ~start ~dur Sandbox
766767;;
Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ Demonstrate sandbox events:
2525 " dir" : " _build/.sandbox/$ DIGEST"
2626 }
2727 }
28+ {
29+ " cat" : " sandbox" ,
30+ " name" : " extract" ,
31+ " args" : {
32+ " loc" : " dune:1" ,
33+ " dir" : " _build/.sandbox/$ DIGEST"
34+ }
35+ }
2836 {
2937 " cat" : " sandbox" ,
3038 " name" : " destroy" ,
You can’t perform that action at this time.
0 commit comments