File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/WeihanLi.Common/Helpers Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 2
2
// Licensed under the Apache license.
3
3
4
4
using System . Reflection ;
5
+ using System . Runtime ;
5
6
using System . Runtime . InteropServices ;
6
7
using WeihanLi . Extensions ;
7
8
@@ -158,6 +159,8 @@ private static RuntimeInfo GetRuntimeInfo()
158
159
MachineName = Environment . MachineName ,
159
160
UserName = Environment . UserName ,
160
161
162
+ IsServerGC = GCSettings . IsServerGC ,
163
+
161
164
IsInContainer = IsInContainer ( ) ,
162
165
IsInKubernetes = IsInKubernetesCluster ( ) ,
163
166
KubernetesNamespace = GetKubernetesNamespace ( ) ,
@@ -250,6 +253,12 @@ public class RuntimeInfo : LibraryInfo
250
253
public required string RuntimeIdentifier { get ; init ; }
251
254
#endif
252
255
256
+ // GC
257
+ /// <summary>Gets a value that indicates whether server garbage collection is enabled.</summary>
258
+ /// <returns>
259
+ /// <see langword="true" /> if server garbage collection is enabled; otherwise, <see langword="false" />.</returns>
260
+ public required bool IsServerGC { get ; init ; }
261
+
253
262
public required string WorkingDirectory { get ; init ; }
254
263
public required int ProcessId { get ; init ; }
255
264
public required string ProcessPath { get ; init ; }
You can’t perform that action at this time.
0 commit comments