Skip to content

[java/vertx] Mark tests as stripped#10658

Closed
p8 wants to merge 1 commit intoTechEmpower:masterfrom
p8:vertx/mark-as-stripped
Closed

[java/vertx] Mark tests as stripped#10658
p8 wants to merge 1 commit intoTechEmpower:masterfrom
p8:vertx/mark-as-stripped

Conversation

@p8
Copy link
Contributor

@p8 p8 commented Feb 2, 2026

Vertx precalculates HTTP headers, so these tests should be marked as stripped:

private static final CharSequence HELLO_WORLD_LENGTH = HttpHeaders.createOptimized("" + HELLO_WORLD.length());

private MultiMap plaintextHeaders() {
return HttpHeaders
.headers()
.add(HEADER_CONTENT_TYPE, RESPONSE_TYPE_PLAIN)
.add(HEADER_SERVER, SERVER)
.add(HEADER_DATE, dateString)
.add(HEADER_CONTENT_LENGTH, HELLO_WORLD_LENGTH)
.copy(false);
}
private MultiMap jsonHeaders() {
return HttpHeaders
.headers()
.add(HEADER_CONTENT_TYPE, RESPONSE_TYPE_JSON)
.add(HEADER_SERVER, SERVER)
.add(HEADER_DATE, dateString)
.add(HEADER_CONTENT_LENGTH, JSON_LENGTH)
.copy(false);

@joanhey
Copy link
Contributor

joanhey commented Feb 3, 2026

Ping @vietj

@joanhey
Copy link
Contributor

joanhey commented Feb 3, 2026

vertx-web-kotlin-dsljson do the same #10661

private val PLAINTEXT_CONTENT_LENGTH: CharSequence= HttpHeaders.createOptimized(DefaultHandler.MESSAGE.length.toString())
private val JSON_CONTENT_LENGTH: CharSequence = HttpHeaders.createOptimized(MessageHandler.DEFAULT_MESSAGE.serialize().length().toString())

private fun nextPlaintext(): MultiMap = HttpHeaders
.headers()
.add(HttpHeaders.SERVER, SERVER)
.add(HttpHeaders.DATE, current)
.add(HttpHeaders.CONTENT_TYPE, CONTENT_TYPE_TEXT_PLAIN)
.add(HttpHeaders.CONTENT_LENGTH, PLAINTEXT_CONTENT_LENGTH)
.copy(false)
private fun nextJson(): MultiMap = HttpHeaders
.headers()
.add(HttpHeaders.SERVER, SERVER)
.add(HttpHeaders.DATE, current)
.add(HttpHeaders.CONTENT_TYPE, CONTENT_TYPE_APPLICATION_JSON)
.add(HttpHeaders.CONTENT_LENGTH, JSON_CONTENT_LENGTH)
.copy(false)

@vietj
Copy link
Contributor

vietj commented Feb 3, 2026

what is all of that about ? can somebody elaborate about this ?

@vietj
Copy link
Contributor

vietj commented Feb 3, 2026

which document is defining the semantic of "Realistic" / "Stripped" for the benchmark ?

@joanhey
Copy link
Contributor

joanhey commented Feb 3, 2026

JSON Serialization
The JSON Serialization test exercises the framework fundamentals including keep-alive support, request routing, request header parsing, object instantiation, JSON serialization, response header generation, and request count throughput.

We need to generate the headers, not hard coded or with constants.

#10611 (comment)

@p8 p8 closed this Feb 4, 2026
@p8 p8 deleted the vertx/mark-as-stripped branch February 10, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments