CollectionStats
public struct CollectionStats : Codable
A structure representing statistics for a collection in the database.
CollectionStats
provides detailed information about a specific collection,
including its name, the number of shards, the total number of documents,
the total size in bytes, and metadata about each shard.
- Properties:
- collectionName: The name of the collection.
- numberOfShards: The number of shards associated with the collection.
- totalDocuments: The total number of documents stored in the collection.
- totalSizeInBytes: The total size of the collection in bytes.
- shardDetails: An array of metadata information for each shard.
-
Undocumented
Declaration
Swift
public let collectionName: String
-
Undocumented
Declaration
Swift
public let numberOfShards: Int
-
Undocumented
Declaration
Swift
public let totalDocuments: Int
-
Undocumented
Declaration
Swift
public let totalSizeInBytes: UInt64
-
Undocumented
Declaration
Swift
public let shardDetails: [ShardMetadataInfo]
-
Initializes a new instance of
StatsEngine
with the specified parameters.Declaration
Swift
public init( collectionName: String, numberOfShards: Int, totalDocuments: Int, totalSizeInBytes: UInt64, shardDetails: [ShardMetadataInfo] )
Parameters
collectionName
The name of the collection being analyzed.
numberOfShards
The total number of shards in the collection.
totalDocuments
The total number of documents in the collection.
totalSizeInBytes
The total size of the collection in bytes.
shardDetails
An array containing metadata information for each shard.