stats

package
v0.9.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "stats [collection-name]",
	Short: "Show collection statistics and analytics",
	Long: `Show detailed statistics about a collection.

This command displays:
- Document count
- Metadata field distribution
- Collection size and index information
- Top metadata values

Examples:
  weave stats MyCollection
  weave stats MyDocs --output json
  weave stats MyCollection --top 10`,
	Args: cobra.ExactArgs(1),
	Run:  runStats,
}

Cmd represents the stats command

Functions

This section is empty.

Types

type CollectionStats

type CollectionStats struct {
	CollectionName string                       `json:"collection_name" yaml:"collection_name"`
	DocumentCount  int                          `json:"document_count" yaml:"document_count"`
	VectorDB       string                       `json:"vector_db" yaml:"vector_db"`
	Metadata       map[string]MetadataFieldStat `json:"metadata_fields,omitempty" yaml:"metadata_fields,omitempty"`
}

CollectionStats represents statistics about a collection

type MetadataFieldStat

type MetadataFieldStat struct {
	Type         string       `json:"type" yaml:"type"`
	UniqueValues int          `json:"unique_values" yaml:"unique_values"`
	TopValues    []ValueCount `json:"top_values,omitempty" yaml:"top_values,omitempty"`
	SampleValue  interface{}  `json:"sample_value,omitempty" yaml:"sample_value,omitempty"`
}

MetadataFieldStat represents statistics for a metadata field

type ValueCount

type ValueCount struct {
	Value string `json:"value" yaml:"value"`
	Count int    `json:"count" yaml:"count"`
}

ValueCount represents a value and its count

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL