mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
removed no-op stats tracking, fixed typos
This commit is contained in:
parent
8df329da3f
commit
59f26ce585
2 changed files with 8 additions and 14 deletions
20
cache.go
20
cache.go
|
|
@ -50,7 +50,7 @@ type Cache interface {
|
|||
// Returns an ordered list of the top ranked bitmaps.
|
||||
Top() []BitmapPair
|
||||
|
||||
// SetStats defines the stats client used in the cache
|
||||
// SetStats defines the stats client used in the cache.
|
||||
SetStats(s StatsClient)
|
||||
}
|
||||
|
||||
|
|
@ -93,17 +93,11 @@ func (c *LRUCache) Get(id uint64) uint64 {
|
|||
// Len returns the number of items in the cache.
|
||||
func (c *LRUCache) Len() int { return c.cache.Len() }
|
||||
|
||||
// Invalidate track size
|
||||
func (c *LRUCache) Invalidate() {
|
||||
c.stats.Count("cache.invalidate", 1, 1.0)
|
||||
c.stats.Gauge("LRUCache", float64(c.cache.Len()), 1.0)
|
||||
}
|
||||
// Invalidate is a no-op.
|
||||
func (c *LRUCache) Invalidate() {}
|
||||
|
||||
// Recalculate track size
|
||||
func (c *LRUCache) Recalculate() {
|
||||
c.stats.Count("cache.recalculate", 1, 1.0)
|
||||
c.stats.Gauge("LRUCache", float64(c.cache.Len()), 1.0)
|
||||
}
|
||||
// Recalculate is a no-op.
|
||||
func (c *LRUCache) Recalculate() {}
|
||||
|
||||
// IDs returns a list of all IDs in the cache.
|
||||
func (c *LRUCache) IDs() []uint64 {
|
||||
|
|
@ -128,7 +122,7 @@ func (c *LRUCache) Top() []BitmapPair {
|
|||
return a
|
||||
}
|
||||
|
||||
// SetStats passes the stats client used the the frame that owns the cache
|
||||
// SetStats defines the stats client used in the cache.
|
||||
func (c *LRUCache) SetStats(s StatsClient) {
|
||||
c.stats = s
|
||||
}
|
||||
|
|
@ -283,7 +277,7 @@ func (c *RankCache) recalculate() {
|
|||
}
|
||||
}
|
||||
|
||||
// SetStats passes the stats client used the the frame that owns the cache
|
||||
// SetStats defines the stats client used in the cache.
|
||||
func (c *RankCache) SetStats(s StatsClient) {
|
||||
c.stats = s
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import (
|
|||
|
||||
var Importer *ctl.ImportCommand
|
||||
|
||||
// NewImportCommand runs the Pilosa import subcommand for ingesting bulk data
|
||||
// NewImportCommand runs the Pilosa import subcommand for ingesting bulk data.
|
||||
func NewImportCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command {
|
||||
Importer = ctl.NewImportCommand(stdin, stdout, stderr)
|
||||
importCmd := &cobra.Command{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue