You can use something like ...|transaction <transaction_id_field> mvlist=t to group the events by their transaction ID. Once you've done that you can use mvindex to get the time of the desired event for each transaction. For example |eval received_time= mvindex(<your_time_field>, 1)| eval replying_time=mvindex(<your_time_field>,-1) | eval total_response_time = replying_time - received_time. This example would compute D-A, but the same can be done for B-A,C-B using their respective index in the transaction. You may need to play with commands like tonumber() and the time format to do the subtraction.
Also, it doesn't look like you'll have this problem so I didn't mention it, but if your transactions are not grouped in chronological order for some reason, you can use mvfind() to better index within a transaction. If this is a problem for you I can post a more detailed explanation.
... View more