record

abstract fun record(tableName: String, operation: String, durationMs: Long)

Called after every successful query execution (both blocking and suspend paths).

Parameters

tableName

the primary table name the query targeted

operation

one of: "save", "update", "delete", "saveAll", "deleteAll", "batch"

durationMs

wall-clock duration of the execute call in milliseconds


open fun record(tableName: String, operation: String, durationMs: Long, attempts: Int)

Same as record, but also reports how many attempts the query took to succeed (a query that only succeeded on its 3rd attempt still round-tripped 3 times — record alone can't distinguish that from a query that succeeded on the first try). Defaults to delegating to record so existing implementations (including SAM lambdas built against the single-abstract-method record) keep compiling and behaving exactly as before; override this overload instead if you want attempt counts.

Parameters

attempts

total number of execution attempts made, including the successful one (always >= 1)