p2.7: prometheus /metrics
Default GET /metrics is Prometheus text; JSON stays at /metrics.json and ?format=json. :8443 needs the metrics caller bearer; loopback stays open. Restricted callers have no per-caller series and no tavily:restricted gauge.
This commit is contained in:
@@ -217,6 +217,15 @@ func (d *DB) PutEmbed(key string, vec []float64) {
|
||||
d.evict()
|
||||
}
|
||||
|
||||
func (d *DB) Stats() (digestH, digestM, embedH, embedM, searchH, searchM, evictions uint64) {
|
||||
if d == nil {
|
||||
return 0, 0, 0, 0, 0, 0, 0
|
||||
}
|
||||
d.mu.Lock()
|
||||
defer d.mu.Unlock()
|
||||
return d.DigestH, d.DigestM, d.EmbedH, d.EmbedM, d.SearchH, d.SearchM, d.Evictions
|
||||
}
|
||||
|
||||
func (d *DB) Size() int64 {
|
||||
if d == nil {
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user