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.
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
- type BrokerStats
- type BrokerStatsRelatedStore
- type MomentStatsItem
- type MomentStatsItemSet
- type StatsItem
- func (statsItem *StatsItem) GetStatsDataInDay() *StatsSnapshot
- func (statsItem *StatsItem) GetStatsDataInHour() *StatsSnapshot
- func (statsItem *StatsItem) GetStatsDataInMinute() *StatsSnapshot
- func (statsItem *StatsItem) Init()
- func (statsItem *StatsItem) PrintAtDay()
- func (statsItem *StatsItem) PrintAtHour()
- func (statsItem *StatsItem) PrintAtMinutes()
- func (statsItem *StatsItem) SamplingInHour()
- func (statsItem *StatsItem) SamplingInMinutes()
- func (statsItem *StatsItem) SamplingInSeconds()
- type StatsItemSet
- func (stats *StatsItemSet) AddValue(statsKey string, incValue, incTimes int64)
- func (stats *StatsItemSet) GetAndCreateStatsItem(statsKey string) *StatsItem
- func (stats *StatsItemSet) GetStatsDataInDay(statsKey string) *StatsSnapshot
- func (stats *StatsItemSet) GetStatsDataInHour(statsKey string) *StatsSnapshot
- func (stats *StatsItemSet) GetStatsDataInMinute(statsKey string) *StatsSnapshot
- func (stats *StatsItemSet) GetStatsItem(statsKey string) *StatsItem
- func (stats *StatsItemSet) Init()
- type StatsSnapshot
- type StoreStats
Constants ¶
const ( TOPIC_PUT_NUMS = "TOPIC_PUT_NUMS" TOPIC_PUT_SIZE = "TOPIC_PUT_SIZE" GROUP_GET_NUMS = "GROUP_GET_NUMS" GROUP_GET_SIZE = "GROUP_GET_SIZE" SNDBCK_PUT_NUMS = "SNDBCK_PUT_NUMS" BROKER_PUT_NUMS = "BROKER_PUT_NUMS" BROKER_GET_NUMS = "BROKER_GET_NUMS" GROUP_GET_FALL = "GROUP_GET_FALL" )
const ( FrequencyOfSampling = 1000 MaxRecordsOfSampling = 60 * 10 PrintTPSInterval = 60 * 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerStats ¶
type BrokerStats interface { Start() Shutdown() GetStatsItem(statsName, statsKey string) *StatsItem IncTopicPutNums(topic string) IncTopicPutSize(topic string, size int64) IncGroupGetNums(group, topic string, incValue int) IncGroupGetSize(group, topic string, incValue int) IncBrokerPutNums() IncBrokerGetNums(incValue int) IncSendBackNums(group, topic string) TpsGroupGetNums(group, topic string) float64 RecordDiskFallBehind(group, topic string, queueId int32, fallBehind int64) }
func NewBrokerStats ¶
func NewBrokerStats(clusterName string) BrokerStats
type BrokerStatsRelatedStore ¶
type BrokerStatsRelatedStore interface { Record() GetMsgPutTotalTodayNow() int64 GetMsgGetTotalTodayNow() int64 GetMsgGetTotalTodayMorning() int64 GetMsgGetTotalYesterdayMorning() int64 GetMsgPutTotalTodayMorning() int64 GetMsgPutTotalYesterdayMorning() int64 }
BrokerStatsRelatedStore 统计store相关的数据
type MomentStatsItem ¶
type MomentStatsItem struct { ValueCounter int64 `json:"valueCounter"` StatsName string `json:"statsName"` StatsKey string `json:"statsKey"` }
MomentStatsItem MomentStatsItem Author rongzhihong Since 2017/9/19
func NewMomentStatsItem ¶
func NewMomentStatsItem() *MomentStatsItem
NewMomentStatsItem 初始化结构体 Author rongzhihong Since 2017/9/19
func (*MomentStatsItem) Init ¶
func (item *MomentStatsItem) Init()
Init 初始化 Author rongzhihong Since 2017/9/19
type MomentStatsItemSet ¶
type MomentStatsItemSet struct { StatsName string `json:"statsName"` sync.RWMutex // contains filtered or unexported fields }
MomentStatsItemSet QueueId@Topic@Group的offset落后数量的记录集合 Author rongzhihong Since 2017/9/17
func NewMomentStatsItemSet ¶
func NewMomentStatsItemSet(statsName string) *MomentStatsItemSet
NewMomentStatsItemSet 初始化 Author rongzhihong Since 2017/9/17
func (*MomentStatsItemSet) GetAndCreateStatsItem ¶
func (moment *MomentStatsItemSet) GetAndCreateStatsItem(statsKey string) *MomentStatsItem
GetAndCreateStatsItem GetAndCreateStatsItem Author rongzhihong Since 2017/9/19
func (*MomentStatsItemSet) SetValue ¶
func (moment *MomentStatsItemSet) SetValue(statsKey string, value int64)
SetValue statsKey的数值加value Author rongzhihong Since 2017/9/19
type StatsItem ¶
type StatsItem struct { ValueCounter int64 `json:"valueCounter"` // 具体的统计值 TimesCounter int64 `json:"timesCounter"` // 统计次数 CSListMinute *callSnapshotPlus `json:"csListMinute"` // 最近一分钟内的镜像,数量6,10秒钟采样一次 CSListHour *callSnapshotPlus `json:"csListHour"` // 最近一小时内的镜像,数量6,10分钟采样一次 CSListDay *callSnapshotPlus `json:"csListDay"` // 最近一天内的镜像,数量24,1小时采样一次 StatsName string `json:"statsName"` StatsKey string `json:"statsKey"` }
StatsItem 统计单元 Author rongzhihong Since 2017/9/19
func NewStatsItem ¶
func NewStatsItem() *StatsItem
NewStatsItem 统计单元初始化 Author rongzhihong Since 2017/9/19
func (*StatsItem) GetStatsDataInDay ¶
func (statsItem *StatsItem) GetStatsDataInDay() *StatsSnapshot
GetStatsDataInDay 获得天统计数据 Author rongzhihong Since 2017/9/19
func (*StatsItem) GetStatsDataInHour ¶
func (statsItem *StatsItem) GetStatsDataInHour() *StatsSnapshot
GetStatsDataInDay 获得小时统计数据 Author rongzhihong Since 2017/9/19
func (*StatsItem) GetStatsDataInMinute ¶
func (statsItem *StatsItem) GetStatsDataInMinute() *StatsSnapshot
GetStatsDataInDay 获得分钟统计数据 Author rongzhihong Since 2017/9/19
func (*StatsItem) Init ¶
func (statsItem *StatsItem) Init()
Init 统计单元初始化 Author rongzhihong Since 2017/9/19
func (*StatsItem) PrintAtDay ¶
func (statsItem *StatsItem) PrintAtDay()
PrintAtDay 输出天统计 Author rongzhihong Since 2017/9/19
func (*StatsItem) PrintAtHour ¶
func (statsItem *StatsItem) PrintAtHour()
PrintAtHour 输出小时统计 Author rongzhihong Since 2017/9/19
func (*StatsItem) PrintAtMinutes ¶
func (statsItem *StatsItem) PrintAtMinutes()
PrintAtMinutes 输出分钟统计 Author rongzhihong Since 2017/9/19
func (*StatsItem) SamplingInHour ¶
func (statsItem *StatsItem) SamplingInHour()
SamplingInHour 小时统计单元 Author rongzhihong Since 2017/9/19
func (*StatsItem) SamplingInMinutes ¶
func (statsItem *StatsItem) SamplingInMinutes()
SamplingInMinutes 分钟统计单元 Author rongzhihong Since 2017/9/19
func (*StatsItem) SamplingInSeconds ¶
func (statsItem *StatsItem) SamplingInSeconds()
SamplingInSeconds 秒统计单元 Author rongzhihong Since 2017/9/19
type StatsItemSet ¶
type StatsItemSet struct { StatsName string sync.RWMutex // contains filtered or unexported fields }
StatsItemSet 统计单元集合 Author rongzhihong Since 2017/9/19
func NewStatsItemSet ¶
func NewStatsItemSet(statsName string) *StatsItemSet
NewStatsItemSet 初始化某个统计维度的统计单元集合 Author rongzhihong Since 2017/9/19
func (*StatsItemSet) AddValue ¶
func (stats *StatsItemSet) AddValue(statsKey string, incValue, incTimes int64)
AddValue statsKey的统计单元数量增加 Author rongzhihong Since 2017/9/19
func (*StatsItemSet) GetAndCreateStatsItem ¶
func (stats *StatsItemSet) GetAndCreateStatsItem(statsKey string) *StatsItem
GetAndCreateStatsItem 创建、获得statsKey的统计单元 Author rongzhihong Since 2017/9/19
func (*StatsItemSet) GetStatsDataInDay ¶
func (stats *StatsItemSet) GetStatsDataInDay(statsKey string) *StatsSnapshot
GetStatsDataInDay 获得statsKey每天统计数据 Author rongzhihong Since 2017/9/19
func (*StatsItemSet) GetStatsDataInHour ¶
func (stats *StatsItemSet) GetStatsDataInHour(statsKey string) *StatsSnapshot
GetStatsDataInHour 获得statsKey每小时统计数据 Author rongzhihong Since 2017/9/19
func (*StatsItemSet) GetStatsDataInMinute ¶
func (stats *StatsItemSet) GetStatsDataInMinute(statsKey string) *StatsSnapshot
GetStatsDataInMinute 获得statsKey每分钟统计数据 Author rongzhihong Since 2017/9/19
func (*StatsItemSet) GetStatsItem ¶
func (stats *StatsItemSet) GetStatsItem(statsKey string) *StatsItem
NewStatsItemSet 获得statsKey的统计单元 Author rongzhihong Since 2017/9/19
func (*StatsItemSet) Init ¶
func (stats *StatsItemSet) Init()
Init 统计单元集合初始化 Author rongzhihong Since 2017/9/19
type StatsSnapshot ¶
type StatsSnapshot struct { Sum int64 `json:"sum"` Tps float64 `json:"tps"` Avgpt float64 `json:"avgpt"` }
StatsSnapshot Stats Snapshot Author rongzhihong Since 2017/9/19
func NewStatsSnapshot ¶
func NewStatsSnapshot() *StatsSnapshot
NewStatsSnapshot 初始化 Author rongzhihong Since 2017/9/19
type StoreStats ¶
type StoreStats interface { Start() Shutdown() GetSinglePutMessageTopicSizeTotal(topic string) int64 SetSinglePutMessageTopicSizeTotal(topic string, value int64) GetSinglePutMessageTopicTimesTotal(topic string) int64 SetSinglePutMessageTopicTimesTotal(topic string, value int64) SetPutMessageFailedTimes(value int64) SetMessageTransferedMsgCount(value int64) SetMessageTimesTotalFound(value int64) SetMessageTimesTotalMiss(value int64) SetMessageEntireTimeMax(value int64) SetPutMessageEntireTimeMax(value int64) SetDispatchMaxBuffer(value int64) GetPutMessageTimesTotal() int64 GetGetMessageTransferedMsgCount() int64 RuntimeInfo() map[string]string }
func NewStoreStats ¶
func NewStoreStats() StoreStats
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
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.
|
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. |