sessions

package
v0.0.0-...-e6fb8a6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgressValues

type ProgressValues struct {

	// 花费了多长时间
	Cost sync2.AtomicDuration

	// 读取了多少行
	ReadRows sync2.AtomicInt64

	// 读取了多少个字节
	ReadBytes sync2.AtomicInt64

	// 总共读取了多少行
	TotalRowsToRead sync2.AtomicInt64

	// 写了多少行
	WrittenRows sync2.AtomicInt64

	// 写了多少个字节
	WrittenBytes sync2.AtomicInt64
}

ProgressValues 一些统计信息,为了成本优化的时候使用

type Session

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

查询的会话信息,用于统计做成本优化之类的

func NewSession

func NewSession() *Session

func (*Session) Close

func (s *Session) Close()

func (*Session) GetDatabase

func (s *Session) GetDatabase() string

func (*Session) GetProgress

func (s *Session) GetProgress() *ProgressValues

func (*Session) SetDatabase

func (s *Session) SetDatabase(db string)

func (*Session) UpdateProgress

func (s *Session) UpdateProgress(pv *ProgressValues)

Jump to

Keyboard shortcuts

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