stats

package
v0.0.0-...-d86056c Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumeStats

type ConsumeStats struct {
	ConsumeTps  float64                                  `json:"consumeTps"`
	OffsetTable map[*message.MessageQueue]*OffsetWrapper `json:"offsetTable"`
}

OffsetWrapper 消费者统计 Author rongzhihong Since 2017/9/19

func NewConsumeStats

func NewConsumeStats() *ConsumeStats

NewConsumeStats 初始化 Author rongzhihong Since 2017/9/19

func (*ConsumeStats) ComputeTotalDiff

func (consumeStats *ConsumeStats) ComputeTotalDiff() int64

ComputeTotalDiff 偏移量差值 Author rongzhihong Since 2017/9/19

type ConsumeStatsPlus

type ConsumeStatsPlus struct {
	ConsumeTps  float64                   `json:"consumeTps"`
	OffsetTable map[string]*OffsetWrapper `json:"offsetTable"` // key: Topic@BrokerName@QueueId
}

OffsetWrapper 消费者统计 Author rongzhihong Since 2017/9/19

func NewConsumeStatsPlus

func NewConsumeStatsPlus() *ConsumeStatsPlus

NewConsumeStats 初始化 Author rongzhihong Since 2017/9/19

type OffsetWrapper

type OffsetWrapper struct {
	BrokerOffset   int64 `json:"brokerOffset"`
	ConsumerOffset int64 `json:"consumerOffset"`
	LastTimestamp  int64 `json:"lastTimestamp"`
}

OffsetWrapper 偏移量封装类 Author rongzhihong Since 2017/9/19

type TopicOffset

type TopicOffset struct {
	MinOffset           int64 `json:"minOffset"`
	MaxOffset           int64 `json:"maxOffset"`
	LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"`
}

func NewTopicOffset

func NewTopicOffset() *TopicOffset

func (*TopicOffset) ToString

func (to *TopicOffset) ToString() string

type TopicStatsTable

type TopicStatsTable struct {
	OffsetTable map[*message.MessageQueue]*TopicOffset `json:"offsetTable"`
}

TopicStatsTable Topic统计信息 Author rongzhihong Since 2017/9/19

func NewTopicStatsTable

func NewTopicStatsTable() *TopicStatsTable

NewTopicStatsTable 初始化Topic统计信息 Author rongzhihong Since 2017/9/19

type TopicStatsTablePlus

type TopicStatsTablePlus struct {
	OffsetTable map[string]*TopicOffset `json:"offsetTable"` // key Topic@BrokerName@QueueId
}

TopicStatsTablePlus 因key为struct,Encode报错,修改结构 Author rongzhihong Since 2017/9/19

func NewTopicStatsTablePlus

func NewTopicStatsTablePlus() *TopicStatsTablePlus

NewTopicStatsTablePlus 初始化Topic统计信息 Author rongzhihong Since 2017/9/19

func (*TopicStatsTablePlus) String

func (plus *TopicStatsTablePlus) String() string

String 格式化TopicStatsTablePlus内容 Author: tianyuliang Since: 2017/11/9

Jump to

Keyboard shortcuts

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