Fauna .NET Driver 0.1.0-beta
 
Loading...
Searching...
No Matches
QueryStats.cs
Go to the documentation of this file.
1using System.Text.Json.Serialization;
3
4namespace Fauna;
5
9public readonly struct QueryStats
10{
14 [JsonPropertyName(Stats_ComputeOpsFieldName)]
15 public int ComputeOps { get; init; }
16
20 [JsonPropertyName(Stats_ReadOps)]
21 public int ReadOps { get; init; }
22
23
27 [JsonPropertyName(Stats_WriteOps)]
28 public int WriteOps { get; init; }
29
33 [JsonPropertyName(Stats_QueryTimeMs)]
34 public int QueryTimeMs { get; init; }
35
39 [JsonPropertyName(Stats_ContentionRetries)]
40 public int ContentionRetries { get; init; }
41
45 [JsonPropertyName(Stats_StorageBytesRead)]
46 public int StorageBytesRead { get; init; }
47
51 [JsonPropertyName(Stats_StorageBytesWrite)]
52 public int StorageBytesWrite { get; init; }
53
57 [JsonPropertyName(Stats_RateLimitsHit)]
58 public List<string> RateLimitsHit { get; init; }
59
64 public override string ToString()
65 {
66 return $"compute: {ComputeOps}, read: {ReadOps}, write: {WriteOps}, " +
67 $"queryTime: {QueryTimeMs}, retries: {ContentionRetries}, " +
68 $"storageRead: {StorageBytesRead}, storageWrite: {StorageBytesWrite}, " +
69 $"limits: [{string.Join(',', RateLimitsHit)}]";
70 }
71}
Definition Client.cs:9
Contains statistics related to the execution of a query in the Fauna database.
Definition QueryStats.cs:10
int StorageBytesRead
The amount of data read from storage, in bytes.
Definition QueryStats.cs:46
List< string > RateLimitsHit
The types of operations that were limited or approaching rate limits.
Definition QueryStats.cs:58
int QueryTimeMs
The query processing time in milliseconds.
Definition QueryStats.cs:34
int StorageBytesWrite
The amount of data written to storage, in bytes.
Definition QueryStats.cs:52
int ComputeOps
The number of compute operations consumed by the query.
Definition QueryStats.cs:15
int WriteOps
The number of write operations consumed by the query.
Definition QueryStats.cs:28
int ContentionRetries
The write contention retry count.
Definition QueryStats.cs:40
int ReadOps
The number of read operations consumed by the query.
Definition QueryStats.cs:21
override string ToString()
Returns a string representation of the query statistics.
Definition QueryStats.cs:64