Skip to content

Commit 1e4472a

Browse files
antonis19JkLondon
authored andcommitted
add unsynced bytes to EnvInfo
1 parent bbe12db commit 1e4472a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mdbx/env.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ type EnvInfo struct {
341341
SystemPageSize uint //
342342
MiLastPgNo uint64 //
343343
AutoSyncThreshold uint //
344+
UnsyncedBytes uint // how many bytes have been committed but not flushed yet to disk
344345
SinceSync time.Duration //
345346
AutosyncPeriod time.Duration //
346347
SinceReaderCheck time.Duration //
@@ -397,6 +398,7 @@ func (env *Env) Info(txn *Txn) (*EnvInfo, error) {
397398
MiLastPgNo: uint64(_info.mi_last_pgno),
398399

399400
AutoSyncThreshold: uint(_info.mi_autosync_threshold),
401+
UnsyncedBytes: uint(_info.mi_unsync_volume),
400402
SinceSync: toDuration(_info.mi_since_sync_seconds16dot16),
401403
AutosyncPeriod: toDuration(_info.mi_autosync_period_seconds16dot16),
402404
SinceReaderCheck: toDuration(_info.mi_since_reader_check_seconds16dot16),

0 commit comments

Comments
 (0)