Versions in this module Expand all Collapse all v2 v2.4.0 Jul 9, 2021 Changes in this version + const ReadBlocksType + const ReadyEventType + const ResultEventType + type Config struct + ProfilingInterval time.Duration + ReadRatio float64 + SampleThreshold int + WriteRatio float64 + type Estimator struct + func NewEstimator(cfg *Config) *Estimator + func (e *Estimator) Config() Config + func (e *Estimator) Reload(cfg Config) + func (e *Estimator) Run(ctx context.Context, p *Profiler) + type Event struct + EventType string + type Monitor struct + func NewMonitor(pid int, container string, profiler *Profiler) *Monitor + func (m *Monitor) InspectIOBlocks(ctx context.Context) error + type Profiler struct + func NewProfiler(conn pgxtype.Querier, opts TraceOptions) *Profiler + func (p *Profiler) CountSamples() int + func (p *Profiler) EstimateTime(ctx context.Context) (string, error) + func (p *Profiler) Finish() chan struct{} + func (p *Profiler) IsEnoughSamples() bool + func (p *Profiler) RenderStat() string + func (p *Profiler) Start(ctx context.Context) + func (p *Profiler) Stop() + func (p *Profiler) TotalTime() float64 + func (p *Profiler) WaitEventsRatio() map[string]float64 + type ReadBlocksEvent struct + EventType string + ReadBlocks uint64 + type Result struct + EstTime string + IsEnoughStat bool + RenderedStat string + SampleCounter int + TotalTime float64 + WaitEventsRatio map[string]float64 + type ResultEvent struct + EventType string + Payload Result + type StatDatabase struct + BlockReadTime float64 + BlockWriteTime float64 + BlocksHit int64 + BlocksRead int64 + type Timing struct + func NewTiming(waitEvents map[string]float64, readRatio, writeRatio float64) *Timing + func (est *Timing) CalcMax(elapsed float64) float64 + func (est *Timing) CalcMin(elapsed float64) float64 + func (est *Timing) EstTime(elapsed float64) string + func (est *Timing) SetRealReadRatio(realReadRatio float64) + type TraceOptions struct + Interval time.Duration + Pid int + ReadRatio float64 + SampleThreshold int + WriteRatio float64 + type TraceStat struct