1using System.Text.Json.Serialization;
9public readonly
struct QueryStats
14 [JsonPropertyName(Stats_ComputeOpsFieldName)]
15 public int ComputeOps {
get; init; }
20 [JsonPropertyName(Stats_ReadOps)]
21 public int ReadOps {
get; init; }
26 [JsonPropertyName(Stats_WriteOps)]
27 public int WriteOps {
get; init; }
32 [JsonPropertyName(Stats_QueryTimeMs)]
33 public int QueryTimeMs {
get; init; }
38 [JsonPropertyName(Stats_ContentionRetries)]
39 public int ContentionRetries {
get; init; }
44 [JsonPropertyName(Stats_StorageBytesRead)]
45 public int StorageBytesRead {
get; init; }
50 [JsonPropertyName(Stats_StorageBytesWrite)]
51 public int StorageBytesWrite {
get; init; }
56 [JsonPropertyName(Stats_RateLimitsHit)]
57 public List<string> RateLimitsHit {
get; init; }
62 [JsonPropertyName(Stats_ProcessingTimeMs)]
63 public int? ProcessingTimeMs {
get; init; }
69 public override string ToString()
71 return $
"compute: {ComputeOps}, read: {ReadOps}, write: {WriteOps}, " +
72 $
"queryTime: {QueryTimeMs}, retries: {ContentionRetries}, " +
73 $
"storageRead: {StorageBytesRead}, storageWrite: {StorageBytesWrite}, " +
74 $
"{(ProcessingTimeMs.HasValue ? $"processingTime: {ProcessingTimeMs},
" : "")}" +
75 $
"limits: [{string.Join(',', RateLimitsHit)}]";