< Summary

Class:Azure.Search.Documents.Indexes.Models.SearchIndexStatistics
Assembly:Azure.Search.Documents
File(s):C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexStatistics.cs
C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexStatistics.Serialization.cs
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:62
Line coverage:0% (0 of 15)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
get_DocumentCount()-0%100%
get_StorageSize()-0%100%
DeserializeSearchIndexStatistics(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexStatistics.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8namespace Azure.Search.Documents.Indexes.Models
 9{
 10    /// <summary> Statistics for a given index. Statistics are collected periodically and are not guaranteed to always b
 11    public partial class SearchIndexStatistics
 12    {
 13        /// <summary> Initializes a new instance of SearchIndexStatistics. </summary>
 14        /// <param name="documentCount"> The number of documents in the index. </param>
 15        /// <param name="storageSize"> The amount of storage in bytes consumed by the index. </param>
 016        internal SearchIndexStatistics(long documentCount, long storageSize)
 17        {
 018            DocumentCount = documentCount;
 019            StorageSize = storageSize;
 020        }
 21
 22        /// <summary> The number of documents in the index. </summary>
 023        public long DocumentCount { get; }
 24        /// <summary> The amount of storage in bytes consumed by the index. </summary>
 025        public long StorageSize { get; }
 26    }
 27}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexStatistics.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.Search.Documents.Indexes.Models
 12{
 13    public partial class SearchIndexStatistics
 14    {
 15        internal static SearchIndexStatistics DeserializeSearchIndexStatistics(JsonElement element)
 16        {
 017            long documentCount = default;
 018            long storageSize = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("documentCount"))
 22                {
 023                    documentCount = property.Value.GetInt64();
 024                    continue;
 25                }
 026                if (property.NameEquals("storageSize"))
 27                {
 028                    storageSize = property.Value.GetInt64();
 29                    continue;
 30                }
 31            }
 032            return new SearchIndexStatistics(documentCount, storageSize);
 33        }
 34    }
 35}