Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector is used to collect hot keys.
func NewCollector ¶
NewCollector creates a hot keys collector with given parameters.
func (*Collector) AllocCounter ¶
AllocCounter allocates a general counter which is used to record the actual visits of keys.
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter is used to record the actual visits number of keys. To minimize the memory footprint, only the keys that are frequently accessed are recorded.
It's not goroutine-safe, every redis client should have its own.
func NewCounter ¶
NewCounter creates a counter with given parameters. NOTE: It's only for test, don't rely on it directly.
Click to show internal directories.
Click to hide internal directories.