Documentation ¶
Index ¶
- type TxnWriteThroughputSLI
- func (t *TxnWriteThroughputSLI) AddReadKeys(readKeys int64)
- func (t *TxnWriteThroughputSLI) AddTxnWriteSize(size, keys int)
- func (t *TxnWriteThroughputSLI) FinishExecuteStmt(cost time.Duration, affectRow uint64, inTxn bool)
- func (t *TxnWriteThroughputSLI) IsInvalid() bool
- func (t *TxnWriteThroughputSLI) IsSmallTxn() bool
- func (t *TxnWriteThroughputSLI) Reset()
- func (t *TxnWriteThroughputSLI) SetInvalid()
- func (t *TxnWriteThroughputSLI) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TxnWriteThroughputSLI ¶
type TxnWriteThroughputSLI struct {
// contains filtered or unexported fields
}
TxnWriteThroughputSLI uses to report transaction write throughput metrics for SLI.
func (*TxnWriteThroughputSLI) AddReadKeys ¶
func (t *TxnWriteThroughputSLI) AddReadKeys(readKeys int64)
AddReadKeys adds the read keys.
func (*TxnWriteThroughputSLI) AddTxnWriteSize ¶
func (t *TxnWriteThroughputSLI) AddTxnWriteSize(size, keys int)
AddTxnWriteSize adds the transaction write size and keys.
func (*TxnWriteThroughputSLI) FinishExecuteStmt ¶
func (t *TxnWriteThroughputSLI) FinishExecuteStmt(cost time.Duration, affectRow uint64, inTxn bool)
FinishExecuteStmt records the cost for write statement which affect rows more than 0. And report metrics when the transaction is committed.
func (*TxnWriteThroughputSLI) IsInvalid ¶
func (t *TxnWriteThroughputSLI) IsInvalid() bool
IsInvalid checks the transaction is valid to report SLI metrics. Currently, the following case will cause invalid: 1. The transaction contains `insert|replace into ... select ... from ...` statement. 2. The write SQL statement has more read keys than write keys.
func (*TxnWriteThroughputSLI) IsSmallTxn ¶
func (t *TxnWriteThroughputSLI) IsSmallTxn() bool
IsSmallTxn exports for testing.
func (*TxnWriteThroughputSLI) Reset ¶
func (t *TxnWriteThroughputSLI) Reset()
Reset exports for testing.
func (*TxnWriteThroughputSLI) SetInvalid ¶
func (t *TxnWriteThroughputSLI) SetInvalid()
SetInvalid marks this transaction is invalid to report SLI metrics.
func (*TxnWriteThroughputSLI) String ¶
func (t *TxnWriteThroughputSLI) String() string
String exports for testing.