In order to analyse and improve performance of my Daml code deployed on a Canton network, I want to measure how the total processing time of a transaction is split across all the components in the stack, eg -
-
Time to create the command and send it to the ledger api.
-
Time to unfold the command to a DAML transaction, which may vary based on the size of the transaction and the load on the participant.
-
Time to create a confirmation request (encryption, etc), which may vary based on the size of the transaction and the load on the participant.
-
Time to send the confirmation request to the sequencer, which may vary based on where the sequencer is hosted relative to the participant.
-
Time to process the confirmation request at the sequencer, which may vary based on the load on the sequencer.
What’s the best way to understand how much processing time a Daml command is taking at each of these steps?
Approach 1 - just look at the logs for various components?
Approach 2 - would the metrics reported by Canton as per Monitoring — Daml SDK 2.3.2 documentation be the recommended approach?
Any other recommendations?