Skip to content

Commit 46e4f8b

Browse files
committed
Fix process into documentation to include virtual threads
See gh-45631
1 parent b267293 commit 46e4f8b

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoEndpointDocumentationTests.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,27 @@ private ResponseFieldsSnippet processInfo() {
114114
fieldWithPath("memory.garbageCollectors").description("Details for garbage collectors."),
115115
fieldWithPath("memory.garbageCollectors[].name").description("Name of of the garbage collector."),
116116
fieldWithPath("memory.garbageCollectors[].collectionCount")
117-
.description("Total number of collections that have occurred."));
117+
.description("Total number of collections that have occurred."),
118+
fieldWithPath("virtualThreads")
119+
.description("Virtual thread information (if VirtualThreadSchedulerMXBean is available)")
120+
.type(JsonFieldType.OBJECT)
121+
.optional(),
122+
fieldWithPath("virtualThreads.mounted")
123+
.description("Estimate of the number of virtual threads currently mounted by the scheduler.")
124+
.type(JsonFieldType.NUMBER)
125+
.optional(),
126+
fieldWithPath("virtualThreads.queued").description(
127+
"Estimate of the number of virtual threads queued to the scheduler to start or continue execution.")
128+
.type(JsonFieldType.NUMBER)
129+
.optional(),
130+
fieldWithPath("virtualThreads.parallelism").description("Scheduler's target parallelism.")
131+
.type(JsonFieldType.NUMBER)
132+
.optional(),
133+
fieldWithPath("virtualThreads.poolSize")
134+
.description(
135+
"Current number of platform threads that the scheduler has started but have not terminated")
136+
.type(JsonFieldType.NUMBER)
137+
.optional());
118138
}
119139

120140
private ResponseFieldsSnippet javaInfo() {

0 commit comments

Comments
 (0)