[SERVER-35300] Track total transaction duration in TxnStats Created: 31/May/18  Updated: 29/Oct/23  Resolved: 18/Jun/18

Status: Closed
Project: Core Server
Component/s: Diagnostics, Replication
Affects Version/s: None
Fix Version/s: 4.0.2, 4.1.1

Type: Task Priority: Major - P3
Reporter: William Schultz (Inactive) Assignee: Jinny Byun
Resolution: Fixed Votes: 0
Labels: per-txn-metrics
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-35492 Rename TxnStats to SingleTransactionS... Closed
is depended on by SERVER-35159 Track transactions latency and add to... Closed
is depended on by SERVER-35302 Add startWallClockTime to the transac... Closed
is depended on by SERVER-35305 Add timeOpenMicros to the transaction... Closed
is depended on by SERVER-35310 Add timeActiveMicros and timeInactive... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0
Sprint: Repl 2018-06-18, Repl 2018-07-02
Participants:

 Description   

We want to track total transaction duration in TxnStats. To do this, we can add a TxnStats::startTime field. When a transaction begins, we will save the start time of the transaction. This will allow us to compute the total elapsed time of the transaction as (now() - startTime), when the transaction commits or aborts.



 Comments   
Comment by Githook User [ 15/Aug/18 ]

Author:

{'username': 'jinichu', 'email': 'jinnybyun@gmail.com', 'name': 'jinichu'}

Message: SERVER-35300 Added startTime field to TxnStats to store the start time of a transaction

(cherry picked from commit d364e8b0e681260d251079f5755aeaabcb924198)
Branch: v4.0
https://github.com/mongodb/mongo/commit/3defcfc4e4f1eed21540bea7521356a278858704

Comment by Githook User [ 21/Jun/18 ]

Author:

{'username': 'jinichu', 'name': 'jinichu', 'email': 'jinnybyun@gmail.com'}

Message: SERVER-35300 Added SingleTransactionStats::setEndTime to where transactions are aborted under Session::commitTransaction
Branch: master
https://github.com/mongodb/mongo/commit/2cbfb0732afa5b8bc86cbb3b9e1ebfdc144340e1

Comment by Githook User [ 18/Jun/18 ]

Author:

{'username': 'jinichu', 'name': 'jinichu', 'email': 'jinnybyun@gmail.com'}

Message: SERVER-35300 Added startTime field to TxnStats to store the start time of a transaction
Branch: master
https://github.com/mongodb/mongo/commit/d364e8b0e681260d251079f5755aeaabcb924198

Generated at Thu Feb 08 04:39:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.