qan

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2017 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_DATA_MSG  = 100
	THROTTLE_CODE = 299
)
View Source
const (
	MAX_ABSTRACT    = 100  // query_classes.abstract
	MAX_FINGERPRINT = 5000 // query_classes.fingerprint
)

Variables

View Source
var ClassCols []string = []string{
	`query_class_id`,
	`instance_id`,
	`start_ts`,
	`end_ts`,
	`query_count`,
	`lrq_count`,
}
View Source
var GlobalCols []string = []string{
	`instance_id`,
	`start_ts`,
	`end_ts`,
	`run_time`,
	`total_query_count`,
	`unique_query_count`,
	`rate_type`,
	`rate_limit`,
	`log_file`,
	`log_file_size`,
	`start_offset`,
	`end_offset`,
	`stop_offset`,
}

Functions

func SaveData

func SaveData(wsConn ws.Connector, agentId uint, dbh *MySQLMetricWriter, stats *stats.Stats) error

func SparklineData added in v1.0.4

func SparklineData(qr *Reporter, endTs int64, intervalTs int64, queryClassId uint, instanceId uint, begin, end time.Time) []qp.QueryLog

get data for spark-lines at query profile

Types

type MetricWriter

type MetricWriter interface {
	Write(report qan.Report) error
}

type MySQLMetricWriter

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

func NewMySQLMetricWriter

func NewMySQLMetricWriter(
	dbm db.Manager,
	ih instance.DbHandler,
	m *query.Mini,
	stats *stats.Stats,
) *MySQLMetricWriter

func (*MySQLMetricWriter) Write

func (h *MySQLMetricWriter) Write(report qp.Report) error

type Reporter

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

func NewReporter

func NewReporter(dbm db.Manager, stats *stats.Stats) *Reporter

func (*Reporter) Profile

func (qr *Reporter) Profile(instanceId uint, begin, end time.Time, r qp.RankBy, offset int, search string) (qp.Profile, error)

Jump to

Keyboard shortcuts

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