File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
src/Nest/Cluster/NodesStats
tests/Tests/Cluster/NodesStats Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,13 @@ public class NodeStats
6262 [ DataMember ( Name = "script" ) ]
6363 public ScriptStats Script { get ; internal set ; }
6464
65+ /// <summary>
66+ /// Available in Elasticsearch 7.8.0+
67+ /// </summary>
68+ [ DataMember ( Name = "script_cache" ) ]
69+ [ JsonFormatter ( typeof ( VerbatimInterfaceReadOnlyDictionaryKeysFormatter < string , ScriptStats > ) ) ]
70+ public IReadOnlyDictionary < string , ScriptStats > ScriptCache { get ; internal set ; }
71+
6572 [ DataMember ( Name = "thread_pool" ) ]
6673 [ JsonFormatter ( typeof ( VerbatimInterfaceReadOnlyDictionaryKeysFormatter < string , ThreadCountStats > ) ) ]
6774 public IReadOnlyDictionary < string , ThreadCountStats > ThreadPool { get ; internal set ; }
@@ -85,6 +92,9 @@ public class ScriptStats
8592
8693 [ DataMember ( Name = "compilations" ) ]
8794 public long Compilations { get ; internal set ; }
95+
96+ [ DataMember ( Name = "compilation_limit_triggered" ) ]
97+ public long CompilationLimitTriggered { get ; internal set ; }
8898 }
8999
90100 [ DataContract ]
Original file line number Diff line number Diff line change @@ -73,6 +73,11 @@ protected override void ExpectResponse(NodesStatsResponse response)
7373 Assert ( node . Jvm ) ;
7474 Assert ( node . AdaptiveSelection ) ;
7575 Assert ( node . Ingest ) ;
76+
77+ if ( TestClient . Configuration . InRange ( ">=7.8.0" ) )
78+ {
79+ Assert ( node . ScriptCache ) ;
80+ }
7681 }
7782
7883 protected void Assert ( NodeIngestStats nodeIngestStats )
@@ -94,9 +99,6 @@ protected void Assert(NodeIngestStats nodeIngestStats)
9499
95100 processorStats . Type . Should ( ) . Be ( "set" ) ;
96101 processorStats . Statistics . Should ( ) . NotBeNull ( ) ;
97-
98-
99-
100102 }
101103
102104 protected void Assert ( IReadOnlyDictionary < string , AdaptiveSelectionStats > adaptiveSelectionStats ) =>
@@ -187,6 +189,9 @@ protected void Assert(ProcessStats process)
187189
188190 protected void Assert ( ScriptStats script ) => script . Should ( ) . NotBeNull ( ) ;
189191
192+ protected void Assert ( IReadOnlyDictionary < string , ScriptStats > scriptCache ) =>
193+ scriptCache . Should ( ) . NotBeNull ( ) ;
194+
190195 protected void Assert ( TransportStats transport ) => transport . Should ( ) . NotBeNull ( ) ;
191196
192197 protected void Assert ( HttpStats http ) => http . Should ( ) . NotBeNull ( ) ;
You can’t perform that action at this time.
0 commit comments