diff --git a/src/lib_dal_node/daemon.ml b/src/lib_dal_node/daemon.ml index cd8e36b6b4071e0f35ff1e3408f9330b7974d9bf..9dbd3c909639e2f3e6939c95a49426587afeda59 100644 --- a/src/lib_dal_node/daemon.ml +++ b/src/lib_dal_node/daemon.ml @@ -267,7 +267,7 @@ let connect_gossipsub_with_p2p proto_parameters gs_worker transport_layer return_unit | _ -> return_unit) [@profiler.aggregate_s - {verbosity = Notice; profiler_module = Profiler} "shards_handler"]) + {verbosity = Notice; profiler_module = Profiler} "output_shards_handler"]) in let shards_in_handler still_to_receive_indices = fun Types.Message_id.{level; slot_index; shard_index; _} from_peer -> @@ -317,7 +317,8 @@ let connect_gossipsub_with_p2p proto_parameters gs_worker transport_layer return_unit in match[@profiler.aggregate_s - {verbosity = Notice; profiler_module = Profiler} "shards_handler"] + {verbosity = Notice; profiler_module = Profiler} + "input_shards_handler"] Profile_manager.get_profiles @@ Node_context.get_profile_ctxt node_ctxt with | Controller profile diff --git a/src/lib_dal_node/message_validation.ml b/src/lib_dal_node/message_validation.ml index d9be35cf119a13cc44cae72d2cbb5cae143371c8..56d0a821de6f05fc1da55c911da0f9e11995c8b8 100644 --- a/src/lib_dal_node/message_validation.ml +++ b/src/lib_dal_node/message_validation.ml @@ -23,6 +23,9 @@ (* *) (*****************************************************************************) +module Profiler = + (val Tezos_profiler.Profiler.wrap Gossipsub.Profiler.gossipsub_profiler) + let string_of_validation_error = function | `Invalid_degree_strictly_less_than_expected Cryptobox.{given; expected} -> Format.sprintf @@ -402,7 +405,11 @@ let gossipsub_batch_validation ctxt cryptobox ~head_level proto_parameters batch let batch_size = List.length batch in let result = Array.init batch_size (fun _ -> `Unknown) in let {to_check_in_batch; not_valid} = - triage ctxt head_level proto_parameters batch + (triage + ctxt + head_level + proto_parameters + batch [@profiler.record_f {verbosity = Notice} "triage"]) in List.iter (fun (index, error) -> result.(index) <- error) not_valid ; diff --git a/src/lib_gossipsub/gossipsub_worker.ml b/src/lib_gossipsub/gossipsub_worker.ml index f405382247115aae6750ebe26826b68ddf551740..5e639f85d5d84b31bd59fd32422192862753a41d 100644 --- a/src/lib_gossipsub/gossipsub_worker.ml +++ b/src/lib_gossipsub/gossipsub_worker.ml @@ -990,7 +990,12 @@ module Make (C : Gossipsub_intf.WORKER_CONFIGURATION) : state [@profiler.span_f {verbosity = Notice} ["apply_event"; "Check_unknown_messages"]] - | Process_batch batch -> apply_batch_event state batch + | Process_batch batch -> + apply_batch_event + state + batch + [@profiler.span_f + {verbosity = Notice} ["apply_event"; "apply_batch_event"]] (** A helper function that pushes events in the state *) let push e {status = _; state; self = _; _} = diff --git a/tezt/tests/cloud/tezos.ml b/tezt/tests/cloud/tezos.ml index 7ebfc34f300c8157b564f8bf58970ba274753aba..dd309a0d734eb5fb161c08ae64af479f7e27ccd4 100644 --- a/tezt/tests/cloud/tezos.ml +++ b/tezt/tests/cloud/tezos.ml @@ -630,15 +630,27 @@ module Dal_node = struct in let on_shutdown = match Agent.artifacts_dir agent with - | Some destination_root when Tezt_cloud_cli.retrieve_daily_logs -> - [ - (fun () -> - Agent_kind.Logs.scp_logs - ~destination_root - ~daemon_name:name - agent); - ] - | None | Some _ -> [] + | Some destination_root -> + (if Tezt_cloud_cli.retrieve_daily_logs then + [ + (fun () -> + Agent_kind.Logs.scp_logs + ~destination_root + ~daemon_name:name + agent); + ] + else []) + @ + if Tezt_cloud_cli.retrieve_ppx_profiling_traces then + [ + (fun () -> + Agent_kind.Logs.scp_profiling + ~destination_root + ~daemon_name:name + agent); + ] + else [] + | None -> [] in Cloud.service_register ~name