From 54ec3046b48f93f4c79731e7d6df21fae9f38d43 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 10 Oct 2024 11:23:09 -0400 Subject: [PATCH] fixup: comments Signed-off-by: Todd Baert --- .../openfeature/sdk/benchmark/AllocationBenchmark.java | 9 ++++++++- .../openfeature/sdk/benchmark/AllocationProfiler.java | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java b/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java index 8034eb6e7..2e9544d55 100644 --- a/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java +++ b/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java @@ -26,8 +26,15 @@ import dev.openfeature.sdk.OpenFeatureAPI; import dev.openfeature.sdk.Value; +/** + * Runs a large volume of flag evaluations on a VM with 1G memory and GC + * completely disabled so we can take a heap-dump. + */ public class AllocationBenchmark { + // 10K iterations works well with Xmx1024m (we don't want to run out of memory) + private static final int ITERATIONS = 10000; + @Benchmark @Warmup(iterations = 0) @Measurement(iterations = 1) @@ -44,7 +51,7 @@ public Optional before(HookContext ctx, Map