loki_api/
stats.rs

1/// Result contains LogQL query statistics.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Result {
4    #[prost(message, optional, tag="1")]
5    pub summary: ::core::option::Option<Summary>,
6    #[prost(message, optional, tag="2")]
7    pub querier: ::core::option::Option<Querier>,
8    #[prost(message, optional, tag="3")]
9    pub ingester: ::core::option::Option<Ingester>,
10}
11/// Summary is the summary of a query statistics.
12#[derive(Clone, PartialEq, ::prost::Message)]
13pub struct Summary {
14    /// Total bytes processed per second.
15    #[prost(int64, tag="1")]
16    pub bytes_processed_per_second: i64,
17    /// Total lines processed per second.
18    #[prost(int64, tag="2")]
19    pub lines_processed_per_second: i64,
20    /// Total bytes processed.
21    #[prost(int64, tag="3")]
22    pub total_bytes_processed: i64,
23    /// Total lines processed.
24    #[prost(int64, tag="4")]
25    pub total_lines_processed: i64,
26    /// Execution time in seconds.
27    /// In addition to internal calculations this is also returned by the HTTP API.
28    /// Grafana expects time values to be returned in seconds as float.
29    #[prost(double, tag="5")]
30    pub exec_time: f64,
31    /// Queue time in seconds.
32    /// In addition to internal calculations this is also returned by the HTTP API.
33    /// Grafana expects time values to be returned in seconds as float.
34    #[prost(double, tag="6")]
35    pub queue_time: f64,
36    /// Total of subqueries created to fulfill this query.
37    #[prost(int64, tag="7")]
38    pub subqueries: i64,
39}
40#[derive(Clone, PartialEq, ::prost::Message)]
41pub struct Querier {
42    #[prost(message, optional, tag="1")]
43    pub store: ::core::option::Option<Store>,
44}
45#[derive(Clone, PartialEq, ::prost::Message)]
46pub struct Ingester {
47    /// Total ingester reached for this query.
48    #[prost(int32, tag="1")]
49    pub total_reached: i32,
50    /// Total of chunks matched by the query from ingesters
51    #[prost(int64, tag="2")]
52    pub total_chunks_matched: i64,
53    /// Total of batches sent from ingesters.
54    #[prost(int64, tag="3")]
55    pub total_batches: i64,
56    /// Total lines sent by ingesters.
57    #[prost(int64, tag="4")]
58    pub total_lines_sent: i64,
59    #[prost(message, optional, tag="5")]
60    pub store: ::core::option::Option<Store>,
61}
62#[derive(Clone, PartialEq, ::prost::Message)]
63pub struct Store {
64    /// The total of chunk reference fetched from index.
65    #[prost(int64, tag="1")]
66    pub total_chunks_ref: i64,
67    /// Total number of chunks fetched.
68    #[prost(int64, tag="2")]
69    pub total_chunks_downloaded: i64,
70    /// Time spent fetching chunks in nanoseconds.
71    #[prost(int64, tag="3")]
72    pub chunks_download_time: i64,
73    #[prost(message, optional, tag="4")]
74    pub chunk: ::core::option::Option<Chunk>,
75}
76#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct Chunk {
78    /// Total bytes processed but was already in memory. (found in the headchunk)
79    #[prost(int64, tag="4")]
80    pub head_chunk_bytes: i64,
81    /// Total lines processed but was already in memory. (found in the headchunk)
82    #[prost(int64, tag="5")]
83    pub head_chunk_lines: i64,
84    /// Total bytes decompressed and processed from chunks.
85    #[prost(int64, tag="6")]
86    pub decompressed_bytes: i64,
87    /// Total lines decompressed and processed from chunks.
88    #[prost(int64, tag="7")]
89    pub decompressed_lines: i64,
90    /// Total bytes of compressed chunks (blocks) processed.
91    #[prost(int64, tag="8")]
92    pub compressed_bytes: i64,
93    /// Total duplicates found while processing.
94    #[prost(int64, tag="9")]
95    pub total_duplicates: i64,
96}