Skip to content

Commit 719d556

Browse files
committed
test(codegen): generalize ceiling failure message
The message renders for any fixture in the ceilings list, which spans all five protocols, but it named the JSON protocol's per-operation error-code mapper as an expected lambda. That was misleading when a query or xml fixture is the one that regressed, and it also placed the mapper under expected per-client lambdas when the mapper is per-operation. Drop the sentence; the actionable half of it, to hoist a per-operation construct into a shared helper, is kept. Correct the cost of one per-operation lambda from ~6 pool entries per operation to roughly 5, which is the measured figure.
1 parent d162949 commit 719d556

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

codegen/src/test/java/software/amazon/awssdk/codegen/poet/client/ClientLambdaCallSiteCeilingTest.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,10 @@ private static String regressionMessage(String fixture, int callSites, int ceili
7878
return String.format(
7979
Locale.ROOT,
8080
"%s contains %d lambda call sites, ceiling is %d.%n%n"
81-
+ "Per-operation lambdas are the dominant removable constant pool cost in generated clients: one per "
82-
+ "operation costs ~6 pool entries per operation. This fixture has %d operations, so a lambda added to "
83-
+ "every operation body raises this count by %d.%n%n"
84-
+ "Expected per-client lambdas are shared helpers (metric publishing) and the per-operation error-code "
85-
+ "mapper that the JSON protocol requires. If you added a construct to every operation body, hoist it into "
86-
+ "a shared helper.%n%n"
81+
+ "Per-operation lambdas are the dominant removable constant pool cost in generated clients: each one costs "
82+
+ "roughly 5 pool entries per operation. This fixture has %d operations, so a lambda added to every "
83+
+ "operation body raises this count by %d.%n%n"
84+
+ "If you added a construct to every operation body, hoist it into a shared helper.%n%n"
8785
+ "If the growth is intended and justified, raise the ceiling deliberately and record the reason "
8886
+ "alongside it.",
8987
fixture, callSites, ceiling, operations, operations);

0 commit comments

Comments
 (0)