func (c *HLLCounter) Estimate() uint64 {
	c.mu.Lock()
	defer c.mu.Unlock()
	return c.counter.Estimate()
}
Estimate the cardinality of the inserted items.
Safe for concurrent use.
package metrics
import (
	"sync"
	hll "github.com/axiomhq/hyperloglog"
)
var (
	_ CardinalityCounter = &HLLCounter{}
)
type HLLCounter struct {
	Name    string
	lvs     []string
	mu      sync.Mutex
	counter *hll.Sketch
}
func NewHLLCounter(name string) *HLLCounter {
	return &HLLCounter{
		Name:    name,
		counter: hll.New(),
	}
}
func (c *HLLCounter) With(labelValues ...string) CardinalityCounter {
	nlv := make([]string, 0, len(c.lvs)+len(labelValues))
	nlv = append(nlv, c.lvs...)
	nlv = append(nlv, labelValues...)
	c.mu.Lock()
	defer c.mu.Unlock()
	return &HLLCounter{
		Name:    c.Name,
		lvs:     nlv,
		counter: c.counter.Clone(),
	}
}
func (c *HLLCounter) Insert(i []byte) {
	c.mu.Lock()
	defer c.mu.Unlock()
	c.counter.Insert(i)
}