func (mc *Cluster) RegionReadStats() map[uint64][]*statistics.HotPeerStat {
	return mc.HotCache.RegionStats(statistics.ReadFlow, mc.GetHotRegionCacheHitsThreshold())
}
RegionReadStats returns hot region's read stats.
The result only includes peers that are hot enough.
package mockcluster
import (
	"context"
	"fmt"
	"strconv"
	"time"
	"github.com/gogo/protobuf/proto"
	"github.com/pingcap/kvproto/pkg/metapb"
	"github.com/pingcap/kvproto/pkg/pdpb"
	"github.com/pingcap/log"
	"github.com/tikv/pd/pkg/errs"
	"github.com/tikv/pd/pkg/mock/mockid"
	"github.com/tikv/pd/server/config"
	"github.com/tikv/pd/server/core"
	"github.com/tikv/pd/server/core/storelimit"
	"github.com/tikv/pd/server/kv"
	"github.com/tikv/pd/server/schedule/labeler"
	"github.com/tikv/pd/server/schedule/placement"
	"github.com/tikv/pd/server/statistics"
	"github.com/tikv/pd/server/versioninfo"
)
const (
	defaultStoreCapacity = 100 * (1 << 30)  
	defaultRegionSize    = 96 * (1 << 20)   
	mb                   = (1 << 20)        
)
type Cluster struct {
	*core.BasicCluster
	*mockid.IDAllocator
	*placement.RuleManager
	*labeler.RegionLabeler
	*statistics.HotStat
	*config.PersistOptions
	ID               uint64
	suspectRegions   map[uint64]struct{}
	disabledFeatures map[versioninfo.Feature]struct{}
}
func NewCluster(ctx context.Context, opts *config.PersistOptions) *Cluster {
	mockQuit := make(chan struct{})
	clus := &Cluster{
		BasicCluster:     core.NewBasicCluster(),
		IDAllocator:      mockid.NewIDAllocator(),
		HotStat:          statistics.NewHotStat(ctx, mockQuit),
		PersistOptions:   opts,
		suspectRegions:   map[uint64]struct{}{},
		disabledFeatures: make(map[versioninfo.Feature]struct{}),
	}
	if clus.PersistOptions.GetReplicationConfig().EnablePlacementRules {
		clus.initRuleManager()
	}
	clus.RegionLabeler, _ = labeler.NewRegionLabeler(core.NewStorage(kv.NewMemoryKV()))
	return clus
}
func (mc *Cluster) GetOpts() *config.PersistOptions {
	return mc.PersistOptions
}
func (mc *Cluster) AllocID() (uint64, error) {
	return mc.Alloc()
}
func (mc *Cluster) ScanRegions(startKey, endKey []byte, limit int) []*core.RegionInfo {
	return mc.Regions.ScanRange(startKey, endKey, limit)
}
func (mc *Cluster) LoadRegion(regionID uint64, peerStoreIDs ...uint64) {
	r := mc.newMockRegionInfo(regionID, 0, peerStoreIDs...).Clone(core.WithLeader(nil))
	mc.PutRegion(r)
}
func (mc *Cluster) GetStoresLoads() map[uint64][]float64 {
	mc.HotStat.FilterUnhealthyStore(mc)
	return mc.HotStat.GetStoresLoads()
}
func (mc *Cluster) GetStoreRegionCount(storeID uint64) int {
	return mc.Regions.GetStoreRegionCount(storeID)
}
func (mc *Cluster) GetStore(storeID uint64) *core.StoreInfo {
	return mc.Stores.GetStore(storeID)
}
func (mc *Cluster) IsRegionHot(region *core.RegionInfo) bool {
	return mc.HotCache.IsRegionHot(region, mc.GetHotRegionCacheHitsThreshold())
}