Documentation ¶
Index ¶
- Constants
- Variables
- func DBStartTransaction(db *sql.DB, query string) (*sql.Tx, *sql.Stmt, error)
- func NameToIdInt64(name string) int64
- func NameToIdUint64(name string) uint64
- func ReconstructTree(data map[int64]types.ClickhouseField, root *types.FlameGraphNode, ...)
- type ClickhouseConfig
- type ClickhouseHTTPSender
- func (c *ClickhouseHTTPSender) Commit() error
- func (c *ClickhouseHTTPSender) NewRequest() error
- func (c *ClickhouseHTTPSender) SendClusterHTTP(cluster, server string) error
- func (c *ClickhouseHTTPSender) SendFlatFgPB(node *fgpb.FlameGraphFlat) error
- func (c *ClickhouseHTTPSender) SendMetricstatsHTTP(node *fgpb.FlatMetricInfo) error
- func (c *ClickhouseHTTPSender) SendTimestampHTTP(graphType, cluster string, timestamp int64) error
- type ClickhouseSender
- func (c *ClickhouseSender) Commit() (int64, error)
- func (c *ClickhouseSender) CommitAndRenew(tx *sql.Tx, query string) error
- func (c *ClickhouseSender) GracefulCommit() error
- func (c *ClickhouseSender) SendCluster(cluster, server string) error
- func (c *ClickhouseSender) SendFg(cluster, name string, id int64, mtime int64, total, value, parentID int64, ...) error
- func (c *ClickhouseSender) SendFgPB(tree *fgpb.FlameGraph) error
- func (c *ClickhouseSender) SendFlatFgPB(node *fgpb.FlameGraphFlat) error
- func (c *ClickhouseSender) SendFlatMetricStatsPB(stats *fgpb.FlatMetricInfo) error
- func (c *ClickhouseSender) SendMetricStats(timestamp int64, cluster, path string, mtime, atime, rdtime, count int64) error
- func (c *ClickhouseSender) SendMetricStatsPB(stats *fgpb.MultiMetricStats) error
- func (c *ClickhouseSender) SendStacktrace(data *types.StackFlameGraphNode, fullName string) error
- func (c *ClickhouseSender) SendStacktraceTimestamp(data *types.StackFlameGraphNode) error
- func (c *ClickhouseSender) SendTimestamp(graphType, cluster string, timestamp int64) error
- type Query
Constants ¶
View Source
const ( FlamegraphInsertHttpQuery = "" /* 135-byte string literal not displayed */ FlamegraphInsertQuery = "" /* 185-byte string literal not displayed */ BaseLevel = 0 )
View Source
const ( FlamegraphClusterInsertHTTPQuery = "INSERT INTO flamegraph_clusters (type, cluster, date, server, version)" FlamegraphClusterInsertQuery = "INSERT INTO flamegraph_clusters (type, cluster, date, server, version) VALUES (?, ?, ?, ?, ?)" )
View Source
const ( FlamegraphTimestampInsertHTTPQuery = "INSERT INTO flamegraph_timestamps (type, cluster, timestamp, date, version)" FlamegraphTimestampInsertQuery = "INSERT INTO flamegraph_timestamps (type, cluster, timestamp, date, version) VALUES (?, ?, ?, ?, ?)" )
View Source
const ( MetricStatInsertHTTPQuery = "INSERT INTO metricstats (timestamp, type, cluster, name, mtime, atime, rdtime, server, date, version)" MetricStatInsertQuery = "" /* 139-byte string literal not displayed */ )
Variables ¶
View Source
var ErrGracefulCommitNotEnoughLines = fmt.Errorf("not enough lines to commit")
Functions ¶
func DBStartTransaction ¶
func NameToIdInt64 ¶
func NameToIdUint64 ¶
func ReconstructTree ¶
func ReconstructTree(data map[int64]types.ClickhouseField, root *types.FlameGraphNode, minValue int64)
Types ¶
type ClickhouseConfig ¶
type ClickhouseConfig struct { ClickhouseServers []string `yaml:"servers"` ClickhouseHost string `yaml:"host"` Cluster string `yaml:"cluster"` RowsPerInsert int `yaml:"rows_per_insert"` UseDistributedTables bool `yaml:"use_distributed_tables"` DistributedClusterName string `yaml:"distributed_cluster_name"` }
type ClickhouseHTTPSender ¶
type ClickhouseHTTPSender struct {
// contains filtered or unexported fields
}
func NewClickhouseHTTPSender ¶
func NewClickhouseHTTPSender(servers []string, query string) *ClickhouseHTTPSender
func (*ClickhouseHTTPSender) Commit ¶
func (c *ClickhouseHTTPSender) Commit() error
func (*ClickhouseHTTPSender) NewRequest ¶
func (c *ClickhouseHTTPSender) NewRequest() error
func (*ClickhouseHTTPSender) SendClusterHTTP ¶
func (c *ClickhouseHTTPSender) SendClusterHTTP(cluster, server string) error
func (*ClickhouseHTTPSender) SendFlatFgPB ¶
func (c *ClickhouseHTTPSender) SendFlatFgPB(node *fgpb.FlameGraphFlat) error
func (*ClickhouseHTTPSender) SendMetricstatsHTTP ¶
func (c *ClickhouseHTTPSender) SendMetricstatsHTTP(node *fgpb.FlatMetricInfo) error
func (*ClickhouseHTTPSender) SendTimestampHTTP ¶
func (c *ClickhouseHTTPSender) SendTimestampHTTP(graphType, cluster string, timestamp int64) error
type ClickhouseSender ¶
type ClickhouseSender struct {
// contains filtered or unexported fields
}
func NewClickhouseSender ¶
func (*ClickhouseSender) Commit ¶
func (c *ClickhouseSender) Commit() (int64, error)
func (*ClickhouseSender) CommitAndRenew ¶
func (c *ClickhouseSender) CommitAndRenew(tx *sql.Tx, query string) error
func (*ClickhouseSender) GracefulCommit ¶
func (c *ClickhouseSender) GracefulCommit() error
func (*ClickhouseSender) SendCluster ¶
func (c *ClickhouseSender) SendCluster(cluster, server string) error
func (*ClickhouseSender) SendFgPB ¶
func (c *ClickhouseSender) SendFgPB(tree *fgpb.FlameGraph) error
func (*ClickhouseSender) SendFlatFgPB ¶
func (c *ClickhouseSender) SendFlatFgPB(node *fgpb.FlameGraphFlat) error
func (*ClickhouseSender) SendFlatMetricStatsPB ¶
func (c *ClickhouseSender) SendFlatMetricStatsPB(stats *fgpb.FlatMetricInfo) error
func (*ClickhouseSender) SendMetricStats ¶
func (c *ClickhouseSender) SendMetricStats(timestamp int64, cluster, path string, mtime, atime, rdtime, count int64) error
func (*ClickhouseSender) SendMetricStatsPB ¶
func (c *ClickhouseSender) SendMetricStatsPB(stats *fgpb.MultiMetricStats) error
func (*ClickhouseSender) SendStacktrace ¶
func (c *ClickhouseSender) SendStacktrace(data *types.StackFlameGraphNode, fullName string) error
func (*ClickhouseSender) SendStacktraceTimestamp ¶
func (c *ClickhouseSender) SendStacktraceTimestamp(data *types.StackFlameGraphNode) error
"INSERT INTO stacktraceTimestamps (Timestamp, Application, Instance, Date, Version)
func (*ClickhouseSender) SendTimestamp ¶
func (c *ClickhouseSender) SendTimestamp(graphType, cluster string, timestamp int64) error
Click to show internal directories.
Click to hide internal directories.