Recommended way to measure latency

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 -

  1. Time to create the command and send it to the ledger api.

  2. 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.

  3. Time to create a confirmation request (encryption, etc), which may vary based on the size of the transaction and the load on the participant.

  4. Time to send the confirmation request to the sequencer, which may vary based on where the sequencer is hosted relative to the participant.

  5. 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?

1 Like

If you want to drill down into individual calls, I can definitely recommend having a look at tracing.

1 Like