types

package
v1.34.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const UsageDiskVersion int = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupUsage

type BackupUsage struct {
	// The ID of the backup
	ID string `json:"id,omitempty"`

	// The completion time of the backup
	CompletionTime string `json:"completion_time,omitempty"`

	// The size of the backup in GiB
	SizeInGib float64 `json:"size_in_gib,omitempty"`

	// The type of backup
	Type string `json:"type,omitempty"`

	// The list of collections included in the backup
	Collections []string `json:"collections,omitempty"`
}

BackupUsage represents metrics for a single backup

type CollectionUsage

type CollectionUsage struct {
	// The name of the collection
	Name string `json:"name,omitempty"`

	// The replication factor of the collection
	ReplicationFactor int `json:"replication_factor,omitempty"`

	// The number of unique shards in the collection
	UniqueShardCount int `json:"unique_shard_count,omitempty"`

	// List of shards and their metrics
	Shards ShardsUsage `json:"shards,omitempty"`
}

CollectionUsage represents metrics for a single collection

type CollectionsUsage added in v1.32.11

type CollectionsUsage []*CollectionUsage

ByCollectionName implements sort.Interface for []*CollectionUsage based on the Name field.

func (CollectionsUsage) Len added in v1.32.11

func (a CollectionsUsage) Len() int

func (CollectionsUsage) Less added in v1.32.11

func (a CollectionsUsage) Less(i, j int) bool

func (CollectionsUsage) Swap added in v1.32.11

func (a CollectionsUsage) Swap(i, j int)

type Dimensionality

type Dimensionality struct {
	// The dimensionality of the vectors
	Dimensions int `json:"dimensionality,omitempty"`

	// The number of objects with this dimensionality
	Count int `json:"count,omitempty"`
}

Dimensionality represents metrics for a specific dimensionality

type MultiVectorConfig added in v1.32.11

type MultiVectorConfig struct {
	Enabled      bool          `json:"enabled"`
	MuveraConfig *MuveraConfig `json:"muvera_config,omitempty"`
}

type MuveraConfig added in v1.32.11

type MuveraConfig struct {
	Enabled      bool `json:"enabled"`
	KSim         int  `json:"ksim"`
	DProjections int  `json:"dprojections"`
	Repetitions  int  `json:"repetitions"`
}

type ObjectUsage

type ObjectUsage struct {
	Count        int64
	StorageBytes int64
}

type Report

type Report struct {
	// The version of usage policy, current weaviate version
	// e.g. 1.32.0, otherwise it will default to a date based versioning
	Version string `json:"version,omitempty"`

	// The name of the node
	Node string `json:"node,omitempty"`

	// List of collections and their metrics
	Collections CollectionsUsage `json:"collections,omitempty"`

	// List of backups and their metrics
	Backups []*BackupUsage `json:"backups,omitempty"`

	// CollectingTime The time of the collection of the metric
	CollectingTime string `json:"-"`

	// The local node's view of the schema
	Schema *models.Schema `json:"schema,omitempty"`

	GoMemLimit int64 `json:"go_mem_limit,omitempty"`
}

Report represents the usage metrics report from the metrics endpoint

type ShardUsage

type ShardUsage struct {
	// The name of the shard
	Name string `json:"name,omitempty"`

	// The status of the shard (ACTIVE, INACTIVE)
	Status string `json:"status,omitempty"`

	// The number of objects in the shard
	ObjectsCount int64 `json:"objects_count"`

	// The disk storage used by objects in bytes
	ObjectsStorageBytes uint64 `json:"objects_storage_bytes"`

	// The disk storage used by vectors in bytes
	VectorStorageBytes uint64 `json:"vector_storage_bytes"`

	// The disk storage used by indices in bytes
	IndexStorageBytes uint64 `json:"index_storage_bytes"`

	// The disk storage used by the full shard in bytes (objects + vectors + indices + hnsw commitlogs)
	FullShardStorageBytes uint64 `json:"full_shard_storage_bytes"`

	// List of named vectors and their metrics
	NamedVectors VectorsUsage `json:"named_vectors,omitempty"`
}

ShardUsage represents metrics for a single shard

type ShardsUsage added in v1.32.11

type ShardsUsage []*ShardUsage

func (ShardsUsage) Len added in v1.32.11

func (a ShardsUsage) Len() int

func (ShardsUsage) Less added in v1.32.11

func (a ShardsUsage) Less(i, j int) bool

func (ShardsUsage) Swap added in v1.32.11

func (a ShardsUsage) Swap(i, j int)

type UsageDisk added in v1.32.14

type UsageDisk struct {
	// Version of the
	Version int `json:"version"`
	// ShardUsage
	ShardUsage *ShardUsage `json:"shardUsage"`
}

UsageDisk defines format of saved pre-computed shard usage data

type VectorUsage

type VectorUsage struct {
	// The name of the vector
	Name string `json:"name"`

	// The type of vector index (for dynamic indexes, this shows the underlying type: flat/hnsw)
	VectorIndexType string `json:"vector_index_type,omitempty"`

	// Indicates if this index originated from a dynamic index configuration
	IsDynamic bool `json:"is_dynamic,omitempty"`

	// The compression type used
	Compression string `json:"compression,omitempty"`

	// The compression ratio achieved
	VectorCompressionRatio float64 `json:"vector_compression_ratio,omitempty"`

	// The bits parameter for RQ compression (only set when Compression="rq")
	Bits int16 `json:"bits,omitempty"`

	// List of dimensionalities and their metrics. Note: List is not needed here, but we keep it like this for the consumer
	Dimensionalities []*Dimensionality `json:"dimensionalities,omitempty"`

	// Configuration for Multi-Vector
	MultiVectorConfig *MultiVectorConfig `json:"multi_vector_config,omitempty"`
}

VectorUsage represents metrics for a single vector index

type VectorsUsage added in v1.32.11

type VectorsUsage []*VectorUsage

func (VectorsUsage) Len added in v1.32.11

func (a VectorsUsage) Len() int

func (VectorsUsage) Less added in v1.32.11

func (a VectorsUsage) Less(i, j int) bool

func (VectorsUsage) Swap added in v1.32.11

func (a VectorsUsage) Swap(i, j int)

Jump to

Keyboard shortcuts

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