dbg

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 10 Imported by: 24

Documentation

Index

Constants

View Source
const FileCloseLogLevel = log.LvlTrace

Variables

This section is empty.

Functions

func BigRoTxKb

func BigRoTxKb() uint

DEBUG_BIG_RO_TX_KB - print logs with info about large read-only transactions DEBUG_BIG_RW_TX_KB - print logs with info about large read-write transactions DEBUG_SLOW_COMMIT_MS - print logs with commit timing details if commit is slower than this threshold

func BigRwTxKb

func BigRwTxKb() uint

func DirtySpace

func DirtySpace() uint64

func DiscardHistory

func DiscardHistory() bool

func DoMemStat

func DoMemStat() bool

func MdbxReadAhead

func MdbxReadAhead() bool

func MergeTr

func MergeTr() int

func NoSync

func NoSync() bool

func ReadMemStats

func ReadMemStats(m *runtime.MemStats)

func SlowCommit

func SlowCommit() time.Duration

func SlowTx

func SlowTx() time.Duration

func Stack

func Stack() string

Stack returns stack-trace in logger-friendly compact formatting

func StackSkip

func StackSkip(skip int) string

func StopAfterReconst

func StopAfterReconst() bool

func StopAfterStage

func StopAfterStage() string

TODO(allada) We should possibly consider removing `STOP_BEFORE_STAGE`, as `STOP_AFTER_STAGE` can perform all same the functionality, but due to reverse compatibility reasons we are going to leave it.

func StopBeforeStage

func StopBeforeStage() string

func WriteMap

func WriteMap() bool

Types

type LeakDetector

type LeakDetector struct {
	// contains filtered or unexported fields
}

LeakDetector - use it to find which resource was created but not closed (leaked) periodically does print in logs resources which living longer than 1min with their creation stack trace For example db transactions can call Add/Del from Begin/Commit/Rollback methods

func NewLeakDetector

func NewLeakDetector(name string, slowThreshold time.Duration) *LeakDetector

func (*LeakDetector) Add

func (d *LeakDetector) Add() uint64

func (*LeakDetector) Del

func (d *LeakDetector) Del(id uint64)

func (*LeakDetector) Enabled

func (d *LeakDetector) Enabled() bool

func (*LeakDetector) SetSlowThreshold

func (d *LeakDetector) SetSlowThreshold(t time.Duration)

type LeakDetectorItem

type LeakDetectorItem struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL