cockroach: github.com/objectundefined/cockroach/server/status Index | Files

package status

import "github.com/objectundefined/cockroach/server/status"

Package status is a generated protocol buffer package.

It is generated from these files:

cockroach/server/status/status.proto

It has these top-level messages:

StoreStatus
NodeStatus

Index

Package Files

recorder.go runtime.go runtime_jemalloc.go status.pb.go

Variables

var (
    ErrInvalidLengthStatus = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowStatus   = fmt.Errorf("proto: integer overflow")
)

type MetricsRecorder Uses

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

MetricsRecorder is used to periodically record the information in a number of metric registries.

Two types of registries are maintained: "node-level" registries, provided by node-level systems, and "store-level" registries which are provided by each store hosted by the node. There are slight differences in the way these are recorded, and they are thus kept separate.

func NewMetricsRecorder Uses

func NewMetricsRecorder(clock *hlc.Clock) *MetricsRecorder

NewMetricsRecorder initializes a new MetricsRecorder object that uses the given clock.

func (*MetricsRecorder) AddNodeRegistry Uses

func (mr *MetricsRecorder) AddNodeRegistry(prefixFmt string, registry *metric.Registry)

AddNodeRegistry adds a node-level registry to this recorder. Each node-level registry has a 'prefix format' which is used to add a prefix to the name of all metrics in that registry while recording (see the metric.Registry object for more information on prefix format strings).

func (*MetricsRecorder) AddStore Uses

func (mr *MetricsRecorder) AddStore(store storeMetrics)

AddStore adds the Registry from the provided store as a store-level registry in this recoder. A reference to the store is kept for the purpose of gathering some additional information which is present in store status summaries. Stores should only be added to the registry after they have been started.

func (*MetricsRecorder) GetStatusSummary Uses

func (mr *MetricsRecorder) GetStatusSummary() *NodeStatus

GetStatusSummary returns a status summary messages for the node. The summary includes the recent values of metrics for both the node and all of its component stores.

func (*MetricsRecorder) GetTimeSeriesData Uses

func (mr *MetricsRecorder) GetTimeSeriesData() []tspb.TimeSeriesData

GetTimeSeriesData serializes registered metrics for consumption by CockroachDB's time series system.

func (*MetricsRecorder) MarshalJSON Uses

func (mr *MetricsRecorder) MarshalJSON() ([]byte, error)

MarshalJSON returns an appropriate JSON representation of the current values of the metrics being tracked by this recorder.

func (*MetricsRecorder) NodeStarted Uses

func (mr *MetricsRecorder) NodeStarted(desc roachpb.NodeDescriptor, startedAt int64)

NodeStarted should be called on the recorder once the associated node has received its Node ID; this indicates that it is appropriate to begin recording statistics for this node.

type NodeStatus Uses

type NodeStatus struct {
    Desc          cockroach_roachpb.NodeDescriptor `protobuf:"bytes,1,opt,name=desc" json:"desc"`
    BuildInfo     cockroach_build.Info             `protobuf:"bytes,2,opt,name=build_info,json=buildInfo" json:"build_info"`
    StartedAt     int64                            `protobuf:"varint,3,opt,name=started_at,json=startedAt" json:"started_at"`
    UpdatedAt     int64                            `protobuf:"varint,4,opt,name=updated_at,json=updatedAt" json:"updated_at"`
    Metrics       map[string]float64               `protobuf:"bytes,5,rep,name=metrics" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"`
    StoreStatuses []StoreStatus                    `protobuf:"bytes,6,rep,name=store_statuses,json=storeStatuses" json:"store_statuses"`
}

NodeStatus records the most recent values of metrics for a node.

func (*NodeStatus) Descriptor Uses

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

func (*NodeStatus) Marshal Uses

func (m *NodeStatus) Marshal() (data []byte, err error)

func (*NodeStatus) MarshalTo Uses

func (m *NodeStatus) MarshalTo(data []byte) (int, error)

func (*NodeStatus) ProtoMessage Uses

func (*NodeStatus) ProtoMessage()

func (*NodeStatus) Reset Uses

func (m *NodeStatus) Reset()

func (*NodeStatus) Size Uses

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

func (*NodeStatus) String Uses

func (m *NodeStatus) String() string

func (*NodeStatus) Unmarshal Uses

func (m *NodeStatus) Unmarshal(data []byte) error

type RuntimeStatSampler Uses

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

RuntimeStatSampler is used to periodically sample the runtime environment for useful statistics, performing some rudimentary calculations and storing the resulting information in a format that can be easily consumed by status logging systems.

func MakeRuntimeStatSampler Uses

func MakeRuntimeStatSampler(clock *hlc.Clock) RuntimeStatSampler

MakeRuntimeStatSampler constructs a new RuntimeStatSampler object.

func (RuntimeStatSampler) Registry Uses

func (rsr RuntimeStatSampler) Registry() *metric.Registry

Registry returns the metric.Registry object in which the runtime recorder stores its metric gauges.

func (*RuntimeStatSampler) SampleEnvironment Uses

func (rsr *RuntimeStatSampler) SampleEnvironment()

SampleEnvironment queries the runtime system for various interesting metrics, storing the resulting values in the set of metric gauges maintained by RuntimeStatSampler. This makes runtime statistics more convenient for consumption by the time series and status systems.

This method should be called periodically by a higher level system in order to keep runtime statistics current.

type StoreStatus Uses

type StoreStatus struct {
    Desc    cockroach_roachpb.StoreDescriptor `protobuf:"bytes,1,opt,name=desc" json:"desc"`
    Metrics map[string]float64                `protobuf:"bytes,2,rep,name=metrics" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"`
}

StoreStatus records the most recent values of metrics for a store.

func (*StoreStatus) Descriptor Uses

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

func (*StoreStatus) Marshal Uses

func (m *StoreStatus) Marshal() (data []byte, err error)

func (*StoreStatus) MarshalTo Uses

func (m *StoreStatus) MarshalTo(data []byte) (int, error)

func (*StoreStatus) ProtoMessage Uses

func (*StoreStatus) ProtoMessage()

func (*StoreStatus) Reset Uses

func (m *StoreStatus) Reset()

func (*StoreStatus) Size Uses

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

func (*StoreStatus) String Uses

func (m *StoreStatus) String() string

func (*StoreStatus) Unmarshal Uses

func (m *StoreStatus) Unmarshal(data []byte) error

Package status imports 23 packages (graph). Updated 2017-07-06. Refresh now. Tools for package owners. This is a dead-end fork (no commits since the fork).