forked from elastic/elasticsearch-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStats.ts
391 lines (368 loc) · 11.5 KB
/
Stats.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { ShardFileSizeInfo } from '@indices/stats/types'
import { Dictionary } from '@spec_utils/Dictionary'
import { ByteSize, Field, Name, VersionString } from './common'
import { ShardFailure } from './Errors'
import { double, integer, long, uint } from './Numeric'
import { Duration, DurationValue, UnitMillis } from '@_types/Time'
export class ClusterStatistics {
skipped: integer
successful: integer
total: integer
}
export class ShardStatistics {
failed: uint
/**
* Indicates how many shards have successfully run the search.
*/
successful: uint
/**
* Indicates how many shards the search will run on overall.
*/
total: uint
failures?: ShardFailure[]
skipped?: uint
}
export class BulkStats {
total_operations: long
total_time?: Duration
total_time_in_millis: DurationValue<UnitMillis>
total_size?: ByteSize
total_size_in_bytes: long
avg_time?: Duration
avg_time_in_millis: DurationValue<UnitMillis>
avg_size?: ByteSize
avg_size_in_bytes: long
}
export class CompletionStats {
/**
* Total amount, in bytes, of memory used for completion across all shards assigned to selected nodes.
*/
size_in_bytes: long
/**
* Total amount of memory used for completion across all shards assigned to selected nodes.
*/
size?: ByteSize
fields?: Dictionary<Field, FieldSizeUsage>
}
export class FieldSizeUsage {
size?: ByteSize
size_in_bytes: long
}
export class DocStats {
/**
* Total number of non-deleted documents across all primary shards assigned to selected nodes.
* This number is based on documents in Lucene segments and may include documents from nested fields.
*/
count: long
/**
* Total number of deleted documents across all primary shards assigned to selected nodes.
* This number is based on documents in Lucene segments.
* Elasticsearch reclaims the disk space of deleted Lucene documents when a segment is merged.
*/
deleted?: long
}
export class FielddataStats {
evictions?: long
memory_size?: ByteSize
memory_size_in_bytes: long
fields?: Dictionary<Field, FieldMemoryUsage>
}
export class FieldMemoryUsage {
memory_size?: ByteSize
memory_size_in_bytes: long
}
export class FlushStats {
periodic: long
total: long
total_time?: Duration
total_time_in_millis: DurationValue<UnitMillis>
}
export class GetStats {
current: long
exists_time?: Duration
exists_time_in_millis: DurationValue<UnitMillis>
exists_total: long
missing_time?: Duration
missing_time_in_millis: DurationValue<UnitMillis>
missing_total: long
time?: Duration
time_in_millis: DurationValue<UnitMillis>
total: long
}
export class IndexingStats {
index_current: long
delete_current: long
delete_time?: Duration
delete_time_in_millis: DurationValue<UnitMillis>
delete_total: long
is_throttled: boolean
noop_update_total: long
throttle_time?: Duration
throttle_time_in_millis: DurationValue<UnitMillis>
index_time?: Duration
index_time_in_millis: DurationValue<UnitMillis>
index_total: long
index_failed: long
types?: Dictionary<string, IndexingStats>
write_load?: double
}
export class MergesStats {
current: long
current_docs: long
current_size?: string
current_size_in_bytes: long
total: long
total_auto_throttle?: string
total_auto_throttle_in_bytes: long
total_docs: long
total_size?: string
total_size_in_bytes: long
total_stopped_time?: Duration
total_stopped_time_in_millis: DurationValue<UnitMillis>
total_throttled_time?: Duration
total_throttled_time_in_millis: DurationValue<UnitMillis>
total_time?: Duration
total_time_in_millis: DurationValue<UnitMillis>
}
export class PluginStats {
classname: string
description: string
elasticsearch_version: VersionString
extended_plugins: string[]
has_native_controller: boolean
java_version: VersionString
name: Name
version: VersionString
licensed: boolean
}
export class QueryCacheStats {
/**
* Total number of entries added to the query cache across all shards assigned to selected nodes.
* This number includes current and evicted entries.
*/
cache_count: integer
/**
* Total number of entries currently in the query cache across all shards assigned to selected nodes.
*/
cache_size: integer
/**
* Total number of query cache evictions across all shards assigned to selected nodes.
*/
evictions: integer
/**
* Total count of query cache hits across all shards assigned to selected nodes.
*/
hit_count: integer
/**
* Total amount of memory used for the query cache across all shards assigned to selected nodes.
*/
memory_size?: ByteSize
/**
* Total amount, in bytes, of memory used for the query cache across all shards assigned to selected nodes.
*/
memory_size_in_bytes: long
/**
* Total count of query cache misses across all shards assigned to selected nodes.
*/
miss_count: integer
/**
* Total count of hits and misses in the query cache across all shards assigned to selected nodes.
*/
total_count: integer
}
export class RecoveryStats {
current_as_source: long
current_as_target: long
throttle_time?: Duration
throttle_time_in_millis: DurationValue<UnitMillis>
}
export class RefreshStats {
external_total: long
external_total_time_in_millis: DurationValue<UnitMillis>
listeners: long
total: long
total_time?: Duration
total_time_in_millis: DurationValue<UnitMillis>
}
export class RequestCacheStats {
evictions: long
hit_count: long
memory_size?: string
memory_size_in_bytes: long
miss_count: long
}
export class SearchStats {
fetch_current: long
fetch_time?: Duration
fetch_time_in_millis: DurationValue<UnitMillis>
fetch_total: long
open_contexts?: long
query_current: long
query_time?: Duration
query_time_in_millis: DurationValue<UnitMillis>
query_total: long
scroll_current: long
scroll_time?: Duration
scroll_time_in_millis: DurationValue<UnitMillis>
scroll_total: long
suggest_current: long
suggest_time?: Duration
suggest_time_in_millis: DurationValue<UnitMillis>
suggest_total: long
groups?: Dictionary<string, SearchStats>
}
export class SegmentsStats {
/**
* Total number of segments across all shards assigned to selected nodes.
*/
count: integer
/**
* Total amount of memory used for doc values across all shards assigned to selected nodes.
*/
doc_values_memory?: ByteSize
/**
* Total amount, in bytes, of memory used for doc values across all shards assigned to selected nodes.
*/
doc_values_memory_in_bytes: long
/**
* This object is not populated by the cluster stats API.
* To get information on segment files, use the node stats API.
*/
file_sizes: Dictionary<string, ShardFileSizeInfo>
/**
* Total amount of memory used by fixed bit sets across all shards assigned to selected nodes.
* Fixed bit sets are used for nested object field types and type filters for join fields.
*/
fixed_bit_set?: ByteSize
/**
* Total amount of memory, in bytes, used by fixed bit sets across all shards assigned to selected nodes.
*/
fixed_bit_set_memory_in_bytes: long
/**
* Total amount of memory used by all index writers across all shards assigned to selected nodes.
*/
index_writer_memory?: ByteSize
index_writer_max_memory_in_bytes?: long
/**
* Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes.
*/
index_writer_memory_in_bytes: long
/**
* Unix timestamp, in milliseconds, of the most recently retried indexing request.
*/
max_unsafe_auto_id_timestamp: long
/**
* Total amount of memory used for segments across all shards assigned to selected nodes.
*/
memory?: ByteSize
/**
* Total amount, in bytes, of memory used for segments across all shards assigned to selected nodes.
*/
memory_in_bytes: long
/**
* Total amount of memory used for normalization factors across all shards assigned to selected nodes.
*/
norms_memory?: ByteSize
/**
* Total amount, in bytes, of memory used for normalization factors across all shards assigned to selected nodes.
*/
norms_memory_in_bytes: long
/**
* Total amount of memory used for points across all shards assigned to selected nodes.
*/
points_memory?: ByteSize
/**
* Total amount, in bytes, of memory used for points across all shards assigned to selected nodes.
*/
points_memory_in_bytes: long
stored_memory?: ByteSize
/**
* Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes.
*/
stored_fields_memory_in_bytes: long
/**
* Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes.
*/
terms_memory_in_bytes: long
/**
* Total amount of memory used for terms across all shards assigned to selected nodes.
*/
terms_memory?: ByteSize
/**
* Total amount of memory used for term vectors across all shards assigned to selected nodes.
*/
term_vectory_memory?: ByteSize
/**
* Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes.
*/
term_vectors_memory_in_bytes: long
/**
* Total amount of memory used by all version maps across all shards assigned to selected nodes.
*/
version_map_memory?: ByteSize
/**
* Total amount, in bytes, of memory used by all version maps across all shards assigned to selected nodes.
*/
version_map_memory_in_bytes: long
}
export class StoreStats {
/**
* Total size of all shards assigned to selected nodes.
*/
size?: ByteSize
/**
* Total size, in bytes, of all shards assigned to selected nodes.
*/
size_in_bytes: long
/**
* A prediction of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities.
*/
reserved?: ByteSize
/**
* A prediction, in bytes, of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities.
*/
reserved_in_bytes: long
/**
* Total data set size of all shards assigned to selected nodes.
* This includes the size of shards not stored fully on the nodes, such as the cache for partially mounted indices.
*/
total_data_set_size?: ByteSize
/**
* Total data set size, in bytes, of all shards assigned to selected nodes.
* This includes the size of shards not stored fully on the nodes, such as the cache for partially mounted indices.
*/
total_data_set_size_in_bytes?: long
}
export class TranslogStats {
earliest_last_modified_age: long
operations: long
size?: string
size_in_bytes: long
uncommitted_operations: integer
uncommitted_size?: string
uncommitted_size_in_bytes: long
}
export class WarmerStats {
current: long
total: long
total_time?: Duration
total_time_in_millis: DurationValue<UnitMillis>
}