-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Violation
File: frameworks/drogon/main.cc
What happens
The compression endpoint relies on drogon's built-in gzip via:
app().enableGzip(true);Drogon's gzip implementation uses Z_DEFAULT_COMPRESSION (zlib level 6) by default. There is no configuration in main.cc or the build to set gzip level 1.
What the spec requires
Must use gzip level 1 (fastest) — check the code for compression level config
Using level 6 instead of level 1 means significantly more CPU time is spent on compression per request, making the framework look slower than it would be with the correct level, while also producing smaller output than competitors using level 1. This distorts the benchmark in both directions.
Suggested fix
Drogon v1.9.x supports app().setGzipLevel(1) (or check the drogon docs for exact API). Add before app().run():
app().enableGzip(true);
// Set gzip compression level to 1 (fastest) per benchmark spec
// Note: check drogon API - may need a custom middleware or config file approachIf drogon doesn't expose compression level configuration, this should be documented as a framework limitation.