pachyderm: Index | Files

package metrics

import ""


Package Files

metrics.go metrics.pb.go router.go segment.go


var (
    ErrInvalidLengthMetrics        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowMetrics          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupMetrics = fmt.Errorf("proto: unexpected end of group")

func FinishReportAndFlushUserAction Uses

func FinishReportAndFlushUserAction(action string, err error, start time.Time) func()

FinishReportAndFlushUserAction immediately reports the metric but does not block execution. It returns a wait function which waits or times out after 5s. It is used by the pachctl binary and runs on users' machines

func ReportUserAction Uses

func ReportUserAction(ctx context.Context, r *Reporter, action string) func(time.Time, error)

ReportUserAction pushes the action into a queue for reporting, and reports the start, finish, and error conditions

func StartReportAndFlushUserAction Uses

func StartReportAndFlushUserAction(action string, value interface{}) func()

StartReportAndFlushUserAction immediately reports the metric but does not block execution. It returns a wait function which waits or times out after 5s. It is used by the pachctl binary and runs on users' machines

type Metrics Uses

type Metrics struct {
    ClusterID            string   `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
    PodID                string   `protobuf:"bytes,2,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
    Nodes                int64    `protobuf:"varint,3,opt,name=nodes,proto3" json:"nodes,omitempty"`
    Version              string   `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
    Repos                int64    `protobuf:"varint,5,opt,name=repos,proto3" json:"repos,omitempty"`
    Commits              int64    `protobuf:"varint,6,opt,name=commits,proto3" json:"commits,omitempty"`
    Files                int64    `protobuf:"varint,7,opt,name=files,proto3" json:"files,omitempty"`
    Bytes                int64    `protobuf:"varint,8,opt,name=bytes,proto3" json:"bytes,omitempty"`
    Jobs                 int64    `protobuf:"varint,9,opt,name=jobs,proto3" json:"jobs,omitempty"`
    Pipelines            int64    `protobuf:"varint,10,opt,name=pipelines,proto3" json:"pipelines,omitempty"`
    ArchivedCommits      int64    `protobuf:"varint,11,opt,name=archived_commits,json=archivedCommits,proto3" json:"archived_commits,omitempty"`
    CancelledCommits     int64    `protobuf:"varint,12,opt,name=cancelled_commits,json=cancelledCommits,proto3" json:"cancelled_commits,omitempty"`
    ActivationCode       string   `protobuf:"bytes,13,opt,name=activation_code,json=activationCode,proto3" json:"activation_code,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`

func (*Metrics) Descriptor Uses

func (*Metrics) Descriptor() ([]byte, []int)

func (*Metrics) GetActivationCode Uses

func (m *Metrics) GetActivationCode() string

func (*Metrics) GetArchivedCommits Uses

func (m *Metrics) GetArchivedCommits() int64

func (*Metrics) GetBytes Uses

func (m *Metrics) GetBytes() int64

func (*Metrics) GetCancelledCommits Uses

func (m *Metrics) GetCancelledCommits() int64

func (*Metrics) GetClusterID Uses

func (m *Metrics) GetClusterID() string

func (*Metrics) GetCommits Uses

func (m *Metrics) GetCommits() int64

func (*Metrics) GetFiles Uses

func (m *Metrics) GetFiles() int64

func (*Metrics) GetJobs Uses

func (m *Metrics) GetJobs() int64

func (*Metrics) GetNodes Uses

func (m *Metrics) GetNodes() int64

func (*Metrics) GetPipelines Uses

func (m *Metrics) GetPipelines() int64

func (*Metrics) GetPodID Uses

func (m *Metrics) GetPodID() string

func (*Metrics) GetRepos Uses

func (m *Metrics) GetRepos() int64

func (*Metrics) GetVersion Uses

func (m *Metrics) GetVersion() string

func (*Metrics) Marshal Uses

func (m *Metrics) Marshal() (dAtA []byte, err error)

func (*Metrics) MarshalTo Uses

func (m *Metrics) MarshalTo(dAtA []byte) (int, error)

func (*Metrics) MarshalToSizedBuffer Uses

func (m *Metrics) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Metrics) ProtoMessage Uses

func (*Metrics) ProtoMessage()

func (*Metrics) Reset Uses

func (m *Metrics) Reset()

func (*Metrics) Size Uses

func (m *Metrics) Size() (n int)

func (*Metrics) String Uses

func (m *Metrics) String() string

func (*Metrics) Unmarshal Uses

func (m *Metrics) Unmarshal(dAtA []byte) error

func (*Metrics) XXX_DiscardUnknown Uses

func (m *Metrics) XXX_DiscardUnknown()

func (*Metrics) XXX_Marshal Uses

func (m *Metrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metrics) XXX_Merge Uses

func (m *Metrics) XXX_Merge(src proto.Message)

func (*Metrics) XXX_Size Uses

func (m *Metrics) XXX_Size() int

func (*Metrics) XXX_Unmarshal Uses

func (m *Metrics) XXX_Unmarshal(b []byte) error

type Reporter Uses

type Reporter struct {
    // contains filtered or unexported fields

Reporter is used to submit user & cluster metrics to segment

func NewReporter Uses

func NewReporter(clusterID string, env *serviceenv.ServiceEnv) *Reporter

NewReporter creates a new reporter and kicks off the loop to report cluster metrics

Package metrics imports 19 packages (graph) and is imported by 10 packages. Updated 2020-05-25. Refresh now. Tools for package owners.