From ad56cc52140a05bd1b44b6bb298be2b2f5f5fa99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Skj=C3=B8lberg?= Date: Sat, 25 Oct 2025 23:28:23 +0200 Subject: [PATCH 1/8] Simplify codebase --- README.md | 18 +- ...ullPathMaxStringLengthFilterBenchmark.java | 72 - .../jsonfilter/jmh/AllFilterBenchmark.java | 38 +- .../jsonfilter/jmh/CveFilterBenchmark.java | 68 +- .../jmh/ScratchFilterBenchmark.java | 4 - .../jmh/SingleAnyPathJsonFilter.java | 1895 ----------------- .../jmh/cve/CveAnyPathFilterBenchmark.java | 1 - ...ullPathMaxStringLengthFilterBenchmark.java | 71 - .../jsonfilter/jmh/path/AnyPathBenchmark.java | 2 - .../jackson/JacksonJsonFilterFactory.java | 15 - ...iPathMaxSizeMaxStringLengthJsonFilter.java | 76 +- ...lPathMaxSizeMaxStringLengthJsonFilter.java | 442 ---- ...ngleFullPathMaxStringLengthJsonFilter.java | 203 -- .../JacksonJsonLogFilterBuilderTest.java | 26 - ...hMaxSizeMaxStringLengthJsonFilterTest.java | 110 - ...FullPathMaxStringLengthJsonFilterTest.java | 95 - impl/core/pom.xml | 2 +- ...angesSingleCharArrayAnyPathJsonFilter.java | 95 - ...ngesSingleCharArrayFullPathJsonFilter.java | 111 - .../core/DefaultJsonFilterFactory.java | 76 - ...yPathMaxSizeMaxStringLengthJsonFilter.java | 549 ----- ...ingleAnyPathMaxStringLengthJsonFilter.java | 218 -- .../core/SingleFullPathJsonFilter.java | 296 --- .../core/SingleFullPathMaxSizeJsonFilter.java | 604 ------ ...lPathMaxSizeMaxStringLengthJsonFilter.java | 716 ------- ...ngleFullPathMaxStringLengthJsonFilter.java | 314 --- ...PathMaxSizeRemoveWhitespaceJsonFilter.java | 795 ------- ...tringLengthRemoveWhitespaceJsonFilter.java | 459 ---- ...gleFullPathRemoveWhitespaceJsonFilter.java | 441 ---- .../core/DefaultJsonLogFilterBuilderTest.java | 24 +- ...hMaxSizeMaxStringLengthJsonFilterTest.java | 117 - ...eAnyPathMaxStringLengthJsonFilterTest.java | 64 - .../core/SingleFullPathJsonFilterTest.java | 95 - .../SingleFullPathMaxSizeJsonFilterTest.java | 126 -- ...hMaxSizeMaxStringLengthJsonFilterTest.java | 164 -- ...FullPathMaxStringLengthJsonFilterTest.java | 109 - ...MaxSizeJsonRemoveWhitespaceFilterTest.java | 131 -- ...gLengthRemoveWhitespaceJsonFilterTest.java | 100 - ...ullPathRemoveWhitespaceJsonFilterTest.java | 77 - 39 files changed, 133 insertions(+), 8686 deletions(-) delete mode 100644 benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractSingleFullPathMaxStringLengthFilterBenchmark.java delete mode 100644 benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/SingleAnyPathJsonFilter.java delete mode 100644 benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveSingleFullPathMaxStringLengthFilterBenchmark.java delete mode 100644 frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter.java delete mode 100644 frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxStringLengthJsonFilter.java delete mode 100644 frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilterTest.java delete mode 100644 frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxStringLengthJsonFilterTest.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesSingleCharArrayAnyPathJsonFilter.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesSingleCharArrayFullPathJsonFilter.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxSizeMaxStringLengthJsonFilter.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxStringLengthJsonFilter.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathJsonFilter.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeJsonFilter.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeMaxStringLengthJsonFilter.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxStringLengthJsonFilter.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxSizeRemoveWhitespaceJsonFilter.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter.java delete mode 100644 impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathRemoveWhitespaceJsonFilter.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxSizeMaxStringLengthJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxStringLengthJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeMaxStringLengthJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxStringLengthJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxSizeJsonRemoveWhitespaceFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathRemoveWhitespaceJsonFilterTest.java diff --git a/README.md b/README.md index fd998796..3df0896e 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,11 @@ Features: * Mask single values or whole subtrees * Remove single values or whole subtrees - * Truncate String values - * Truncate document size (max total output size) - * Remove whitespace (for pretty-printed documents) + * Limit String value size + * Limit document size (skip end of document when max size is reached) + * Remove whitespace -The library contains multiple filter implementations as to accommodate combinations of the above features with as little overhead as possible. +The library contains multiple filter implementations as to accommodate combinations of the above features with as little overhead as possible. The equivalent filters are also implemented using [Jackson]: @@ -176,15 +176,15 @@ to output like ### Path syntax A simple syntax is supported, where each path segment corresponds to a `field name`. Expressions are case-sensitive. Supported syntax: - /my/field/name + $.my.field.name with support for wildcards; - /my/field/* + $.my.field.* or a simple any-level field name search - //myFieldName + ..myFieldName The filters within this library support using multiple expressions at once. Note that path expressions are see through arrays. @@ -212,14 +212,14 @@ The resulting metrics could be logged as metadata alongside the JSON payload or ## Performance The `core` processors within this project are faster than the `Jackson`-based processors. This is expected as parser/serializer features have been traded for performance: - * `core` is something like 3x-9x as fast as `Jackson` processors, where + * `core` processors are multiple times as fast as (streaming) `Jackson` processors, where * skipping large parts of JSON documents (prune) decreases the difference, and * small documents increase the difference, as `Jackson` is more expensive to initialize. * working directly on bytes is faster than working on characters for the `core` processors. For a typical, light-weight web service, the overall system performance improvement for using the `core` filters over the `Jackson`-based filters will most likely be a few percent. -Memory use will be at 2-8 times the raw JSON byte size; depending on the invoked `JsonFilter` method (some accept string, other raw bytes or chars). +Memory use will be at most 2-8 times the raw JSON byte size; depending on the invoked `JsonFilter` method (some accept string, other raw bytes or chars). See the benchmark results ([JDK 17](https://jmh.morethan.io/?source=https://raw.githubusercontent.com/skjolber/json-log-filter/master/benchmark/jmh/results/jmh-results-4.1.2.jdk17.json&topBar=off)) and the [JMH] module for running detailed benchmarks. diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractSingleFullPathMaxStringLengthFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractSingleFullPathMaxStringLengthFilterBenchmark.java deleted file mode 100644 index bada2ccb..00000000 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractSingleFullPathMaxStringLengthFilterBenchmark.java +++ /dev/null @@ -1,72 +0,0 @@ - package com.github.skjolber.jsonfilter.jmh; -import java.io.File; -import java.io.IOException; - -import org.openjdk.jmh.annotations.Benchmark; -import org.openjdk.jmh.annotations.Setup; - -import com.github.skjolber.jsonfilter.JsonFilter; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.core.SingleFullPathMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.core.ws.SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonSingleFullPathMaxStringLengthJsonFilter; - - -public abstract class AbstractSingleFullPathMaxStringLengthFilterBenchmark { - - protected JacksonBenchmarkRunner jacksonJsonFilter; - protected BenchmarkRunner coreJsonFilter; - protected BenchmarkRunner coreRemoveWhitespaceJsonFilter; - - @Setup - public void init() throws Exception { - File file = getFile(); - - int maxStringLength = getMaxStringLength(); - - String path = getPath(); - FilterType type = getFilterType(); - - jacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonSingleFullPathMaxStringLengthJsonFilter(maxStringLength, path, type), true, false); - coreJsonFilter = new BenchmarkRunner<>(file, true, new SingleFullPathMaxStringLengthJsonFilter(maxStringLength, -1, path, type), true, false); - coreRemoveWhitespaceJsonFilter = new BenchmarkRunner<>(file, true, new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(maxStringLength, -1, path, type), true, false); - } - - protected abstract FilterType getFilterType(); - - protected abstract String getPath(); - - protected abstract int getMaxStringLength(); - - protected abstract File getFile(); - - @Benchmark - public long jackson_bytes() throws IOException { - return jacksonJsonFilter.benchmarkBytes(); - } - - @Benchmark - public long core_keep_whitespace_bytes() throws IOException { - return coreJsonFilter.benchmarkBytes(); - } - - @Benchmark - public long core_remove_whitespace_bytes() throws IOException { - return coreRemoveWhitespaceJsonFilter.benchmarkBytes(); - } - - @Benchmark - public long jackson_char() throws IOException { - return jacksonJsonFilter.benchmarkCharacters(); - } - - @Benchmark - public long core_keep_whitespace_char() throws IOException { - return coreJsonFilter.benchmarkCharacters(); - } - - @Benchmark - public long core_remove_whitespace_char() throws IOException { - return coreRemoveWhitespaceJsonFilter.benchmarkCharacters(); - } -} \ No newline at end of file diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java index a513a887..378ac2db 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java @@ -31,16 +31,12 @@ import com.github.skjolber.jsonfilter.core.MultiPathJsonFilter; import com.github.skjolber.jsonfilter.core.MultiPathMaxSizeMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.core.MultiPathMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.core.SingleAnyPathMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.core.SingleFullPathJsonFilter; -import com.github.skjolber.jsonfilter.core.SingleFullPathMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMaxSizeJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMultiAnyPathMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMultiPathMaxSizeMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMultiPathMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonSingleFullPathMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jmh.filter.PrimitiveJsonPropertyBodyFilter; import com.github.skjolber.jsonfilter.jmh.utils.JsonMaskerJsonFilter; @@ -51,9 +47,8 @@ @State(Scope.Thread) @BenchmarkMode(Mode.Throughput) @OutputTimeUnit(TimeUnit.SECONDS) -@Warmup(iterations = 3, time = 1, timeUnit = TimeUnit.SECONDS) -@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) - +@Warmup(iterations = 1, time = 1, timeUnit = TimeUnit.SECONDS) +@Measurement(iterations = 3, time = 1, timeUnit = TimeUnit.SECONDS) @Fork(1) public class AllFilterBenchmark { @@ -61,7 +56,6 @@ public class AllFilterBenchmark { public static final String DEFAULT_ANY_XPATH = "//address"; private JacksonBenchmarkRunner jacksonMultiPathMaxSizeMaxStringLengthJsonFilter; - private BenchmarkRunner singleFullPathAnonymizeMaxStringLengthJacksonJsonFilter; private BenchmarkRunner anyPathJsonMaskerJsonFilter; private BenchmarkRunner singlePathJsonMaskerJsonFilter; @@ -70,12 +64,9 @@ public class AllFilterBenchmark { private BenchmarkRunner defaultJsonFilter; - private BenchmarkRunner singleFullPathAnonymizeJsonFilter; private BenchmarkRunner maxStringLengthJsonFilter; private BenchmarkRunner maxSizeJsonFilter; - private BenchmarkRunner singleFullPathMaxStringLengthAnonymizeJsonFilter; - private BenchmarkRunner multiPathAnonymizeJsonFilter; private BenchmarkRunner multiPathAnonymizeFullPathJsonFilter; private BenchmarkRunner multiPathMaxStringLengthAnonymizeJsonFilter; @@ -84,7 +75,6 @@ public class AllFilterBenchmark { private BenchmarkRunner multiAnyPathAnonymizeMaxStringLengthJacksonJsonFilter; private BenchmarkRunner multiAnyPathLogbookJsonFilter; private BenchmarkRunner anyPathAnonymizeJsonFilter; - private BenchmarkRunner singleAnyPathAnonymizeMaxStringLengthJsonFilter; private BenchmarkRunner multiPathAnonymizeMaxSizeMaxStringLengthJsonFilter; @@ -103,7 +93,6 @@ public void init() throws Exception { // generic filters // jackson jacksonMultiPathMaxSizeMaxStringLengthJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMultiPathMaxSizeMaxStringLengthJsonFilter(20, -1, new String[] {xpath}, null), prettyPrinted); - singleFullPathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonSingleFullPathMaxStringLengthJsonFilter(20, xpath, FilterType.ANON), prettyPrinted); multiPathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMultiPathMaxStringLengthJsonFilter(20, new String[] {xpath}, null), prettyPrinted); multiAnyPathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMultiAnyPathMaxStringLengthJsonFilter(20, new String[] {DEFAULT_ANY_XPATH}, null), prettyPrinted); maxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMaxStringLengthJsonFilter(20), prettyPrinted); @@ -114,10 +103,7 @@ public void init() throws Exception { maxSizeJsonFilter = new BenchmarkRunner(file, true, new MaxSizeJsonFilter(128), prettyPrinted); // path - single - singleFullPathAnonymizeJsonFilter = new BenchmarkRunner(file, true, new SingleFullPathJsonFilter(-1, xpath, FilterType.ANON), prettyPrinted); - singleFullPathMaxStringLengthAnonymizeJsonFilter = new BenchmarkRunner(file, true, new SingleFullPathMaxStringLengthJsonFilter(20, -1, xpath, FilterType.ANON), prettyPrinted); anyPathAnonymizeJsonFilter = new BenchmarkRunner(file, true, new AnyPathJsonFilter(-1, new String[]{DEFAULT_ANY_XPATH}, null), prettyPrinted); - singleAnyPathAnonymizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new SingleAnyPathMaxStringLengthJsonFilter(20, -1, DEFAULT_ANY_XPATH, FilterType.ANON), prettyPrinted); // path - multiple multiPathAnonymizeJsonFilter = new BenchmarkRunner(file, true, new MultiPathJsonFilter(-1, new String[]{xpath}, null), prettyPrinted); @@ -153,11 +139,6 @@ public long noop_passthrough() throws IOException { public long multiAnyPathLogbook() throws IOException { return multiAnyPathLogbookJsonFilter.benchmarkBytes(); } - - @Benchmark - public long anonSingleMaxStringLengthJackson() throws IOException { - return singleFullPathAnonymizeMaxStringLengthJacksonJsonFilter.benchmarkBytes(); - } @Benchmark public long anonMultiMaxStringLengthJackson() throws IOException { @@ -184,11 +165,6 @@ public long maxSizeJackson() throws IOException { return maxSizeJacksonJsonFilter.benchmarkBytes(); } - @Benchmark - public long anonSingleFullPath() throws IOException { - return singleFullPathAnonymizeJsonFilter.benchmarkBytes(); - } - @Benchmark public long anonAnyPath() throws IOException { return anyPathAnonymizeJsonFilter.benchmarkBytes(); @@ -204,16 +180,6 @@ public long anonSingleFullPathJsonMask() throws IOException { return singlePathJsonMaskerJsonFilter.benchmarkBytesAsArray(); } - @Benchmark - public long anonSingleAnyPathMaxStringLength() throws IOException { - return singleAnyPathAnonymizeMaxStringLengthJsonFilter.benchmarkBytes(); - } - - @Benchmark - public long anonSingleFullPathMaxStringLength() throws IOException { - return singleFullPathMaxStringLengthAnonymizeJsonFilter.benchmarkBytes(); - } - @Benchmark public long anonMultiPathMaxStringLength() throws IOException { return multiPathMaxStringLengthAnonymizeJsonFilter.benchmarkBytes(); diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java index feed7ad7..1814f2e4 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java @@ -1,6 +1,8 @@ package com.github.skjolber.jsonfilter.jmh; import java.io.File; import java.io.IOException; +import java.util.HashSet; +import java.util.Set; import java.util.concurrent.TimeUnit; import org.openjdk.jmh.annotations.Benchmark; @@ -22,12 +24,12 @@ import com.github.skjolber.jsonfilter.JsonFilter; import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; +import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; import com.github.skjolber.jsonfilter.core.DefaultJsonLogFilterBuilder; import com.github.skjolber.jsonfilter.core.MaxSizeJsonFilter; import com.github.skjolber.jsonfilter.core.MaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.core.MaxStringLengthMaxSizeJsonFilter; import com.github.skjolber.jsonfilter.core.MultiPathMaxSizeMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.core.SingleFullPathMaxSizeMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MaxSizeRemoveWhitespaceJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MaxStringLengthMaxSizeRemoveWhitespaceJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MaxStringLengthRemoveWhitespaceJsonFilter; @@ -37,17 +39,20 @@ import com.github.skjolber.jsonfilter.jackson.JacksonMaxSizeJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMaxSizeMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMultiPathMaxSizeMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.jmh.utils.JsonMaskerJsonFilter; + +import dev.blaauwendraad.masker.json.JsonMasker; +import dev.blaauwendraad.masker.json.config.JsonMaskingConfig; @State(Scope.Thread) @BenchmarkMode(Mode.Throughput) @OutputTimeUnit(TimeUnit.SECONDS) -@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) -@Measurement(iterations = 15, time = 1, timeUnit = TimeUnit.SECONDS) +@Warmup(iterations = 1, time = 1, timeUnit = TimeUnit.SECONDS) +@Measurement(iterations = 3, time = 1, timeUnit = TimeUnit.SECONDS) @Fork(1) -public abstract class CveFilterBenchmark { +public class CveFilterBenchmark { private final int maxStringLength = 64; private static String[] anon = new String[] {"/CVE_Items/cve/affects/vendor/vendor_data/vendor_name"}; @@ -61,7 +66,9 @@ public abstract class CveFilterBenchmark { private BenchmarkRunner multiPathMaxStringLengthJsonFilter; private BenchmarkRunner multiPathMaxStringLengthJacksonJsonFilter; - + + private BenchmarkRunner anyPathJsonFilter; + private BenchmarkRunner maxStringLengthJsonFilter; private BenchmarkRunner maxStringLengthJacksonJsonFilter; private BenchmarkRunner maxStringLengthRemoveWhitespaceJsonFilter; @@ -77,13 +84,13 @@ public abstract class CveFilterBenchmark { private BenchmarkRunner maxSizeJsonFilter; private BenchmarkRunner maxSizeRemoveWhitespaceJsonFilter; - private BenchmarkRunner singleFullPathMaxSizeMaxStringLengthJsonFilter; - private JacksonBenchmarkRunner singleFullPathMaxSizeMaxStringLengthJacksonJsonFilter; + private BenchmarkRunner anyPathJsonMaskerJsonFilter; + private BenchmarkRunner singlePathJsonMaskerJsonFilter; private BenchmarkRunner removeWhitespaceJsonFilter; - @Param(value={"2KB","8KB","14KB","22KB","30KB","50KB","70KB","100KB","200KB"}) - //@Param(value={"2KB"}) + //@Param(value={"2KB","8KB","14KB","22KB","30KB","50KB","70KB","100KB","200KB"}) + @Param(value={"8KB"}) private String fileName; private final boolean prettyPrinted = false; @@ -115,10 +122,19 @@ public void init() throws Exception { maxStringLengthMaxSizeRemoveWhitespaceJsonFilter = new BenchmarkRunner(file, true, new MaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(maxStringLength, size), prettyPrinted); maxStringLengthMaxSizeJacksonJsonFilter = new BenchmarkRunner(file, true, new JacksonMaxSizeMaxStringLengthJsonFilter(maxStringLength, size), prettyPrinted); - singleFullPathMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new SingleFullPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, -1, anon[0], FilterType.ANON), prettyPrinted); - singleFullPathMaxSizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, -1, anon[0], FilterType.ANON), prettyPrinted); - removeWhitespaceJsonFilter = new BenchmarkRunner(file, true, new RemoveWhitespaceJsonFilter(), prettyPrinted); + + anyPathJsonFilter = new BenchmarkRunner(file, true, new AnyPathJsonFilter(size, new String[] {"//version"}, null), prettyPrinted); + + // other filters + var singlePathJsonMasker = JsonMasker.getMasker( + JsonMaskingConfig.builder() + .maskJsonPaths(Set.of("$.CVE_Items.cve.affects.vendor.vendor_data.vendor_name")) + .build() + ); + + anyPathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(JsonMasker.getMasker(Set.of("version"))), false); + singlePathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(singlePathJsonMasker), false); } @Benchmark @@ -185,16 +201,6 @@ public long maxSizeJackson() { return maxSizeJacksonJsonFilter.benchmarkBytes(); } - @Benchmark - public long all_single() throws IOException { - return singleFullPathMaxSizeMaxStringLengthJsonFilter.benchmarkCharacters(); - } - - @Benchmark - public long all_single_jackson() throws IOException { - return singleFullPathMaxSizeMaxStringLengthJacksonJsonFilter.benchmarkCharacters(); - } - @Benchmark public long maxStringLengthMaxSize_core() throws IOException { return maxStringLengthMaxSizeJsonFilter.benchmarkCharacters(); @@ -210,6 +216,22 @@ public long maxStringLengthMaxSize_jackson() throws IOException { return maxStringLengthMaxSizeJacksonJsonFilter.benchmarkCharacters(); } + @Benchmark + public long anon_core() throws IOException { + return anyPathJsonFilter.benchmarkBytes(); + } + + @Benchmark + public long anon_jsonMask() throws IOException { + return anyPathJsonMaskerJsonFilter.benchmarkBytesAsArray(); + } + + @Benchmark + public long anon_single_jsonMask() throws IOException { + return singlePathJsonMaskerJsonFilter.benchmarkBytesAsArray(); + } + + public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() .include(CveFilterBenchmark.class.getSimpleName()) diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/ScratchFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/ScratchFilterBenchmark.java index 43b287be..d31495ad 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/ScratchFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/ScratchFilterBenchmark.java @@ -26,9 +26,7 @@ import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; import com.github.skjolber.jsonfilter.core.MaxSizeJsonFilter; -import com.github.skjolber.jsonfilter.core.SingleFullPathJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMultiAnyPathMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonSingleFullPathMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jmh.utils.JsonMaskerJsonFilter; import dev.blaauwendraad.masker.json.JsonMasker; @@ -82,8 +80,6 @@ public void init() throws Exception { boolean prettyPrint = false; - original = new BenchmarkRunner(file, true, new SingleFullPathJsonFilter(-1, xpath, FilterType.ANON), true, prettyPrint); - var singlePathJsonMasker = JsonMasker.getMasker( JsonMaskingConfig.builder() .maskJsonPaths(Set.of("$.CVE_Items.cve.affects.vendor.vendor_data.vendor_name")) diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/SingleAnyPathJsonFilter.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/SingleAnyPathJsonFilter.java deleted file mode 100644 index 5322143d..00000000 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/SingleAnyPathJsonFilter.java +++ /dev/null @@ -1,1895 +0,0 @@ -package com.github.skjolber.jsonfilter.jmh; - -import com.github.skjolber.jsonfilter.core.AbstractRangesSingleCharArrayAnyPathJsonFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; - -public class SingleAnyPathJsonFilter extends AbstractRangesSingleCharArrayAnyPathJsonFilter { - - public SingleAnyPathJsonFilter(int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - this(-1, -1, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleAnyPathJsonFilter(int maxPathMatches, String expression, FilterType type) { - this(maxPathMatches, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - protected SingleAnyPathJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, - FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - @Override - public CharArrayRangesFilter ranges(final char[] chars, int offset, int length) { - final CharArrayRangesFilter filter = getCharArrayRangesFilter(maxPathMatches, length); - try { - - if(maxPathMatches != -1) { - if(pathBytes == STAR_BYTES) { - if(filterType == FilterType.ANON) { - rangesAnonymizeAnyPath(chars, offset, offset + length, maxPathMatches, filter); - } else if(filterType == FilterType.PRUNE) { - rangesPruneAnyPath(chars, offset, offset + length, maxPathMatches, filter); - } else { - throw new IllegalStateException(); - } - } else { - if(filterType == FilterType.ANON) { - rangesAnonymizeAnyPath(chars, offset, offset + length, maxPathMatches, pathChars, filter); - } else if(filterType == FilterType.PRUNE) { - rangesPruneAnyPath(chars, offset, offset + length, maxPathMatches, pathChars, filter); - } else { - throw new IllegalStateException(); - } - } - } else { - if(pathBytes == STAR_BYTES) { - if(filterType == FilterType.ANON) { - rangesAnonymizeAnyPath(chars, offset, offset + length, filter); - } else if(filterType == FilterType.PRUNE) { - rangesPruneAnyPath(chars, offset, offset + length, filter); - } else { - throw new IllegalStateException(); - } - } else { - if(filterType == FilterType.ANON) { - rangesAnonymizeAnyPath(chars, offset, offset + length, pathChars, filter); - } else if(filterType == FilterType.PRUNE) { - rangesPruneAnyPath(chars, offset, offset + length, pathChars, filter); - } else { - throw new IllegalStateException(); - } - } - } - return filter; - } catch(Exception e) { - return null; - } - } - - - @Override - public ByteArrayRangesFilter ranges(final byte[] chars, int offset, int length) { - final ByteArrayRangesFilter filter = getByteArrayRangesFilter(maxPathMatches, length); - try { - if(maxPathMatches != -1) { - if(pathBytes == STAR_BYTES) { - if(filterType == FilterType.ANON) { - rangesAnonymizeAnyPath(chars, offset, offset + length, maxPathMatches, filter); - } else if(filterType == FilterType.PRUNE) { - rangesPruneAnyPath(chars, offset, offset + length, maxPathMatches, filter); - } else { - throw new IllegalStateException(); - } - } else { - if(filterType == FilterType.ANON) { - rangesAnonymizeAnyPath(chars, offset, offset + length, maxPathMatches, pathBytes, filter); - } else if(filterType == FilterType.PRUNE) { - rangesPruneAnyPath(chars, offset, offset + length, maxPathMatches, pathBytes, filter); - } else { - throw new IllegalStateException(); - } - } - } else { - if(pathBytes == STAR_BYTES) { - if(filterType == FilterType.ANON) { - rangesAnonymizeAnyPath(chars, offset, offset + length, filter); - } else if(filterType == FilterType.PRUNE) { - rangesPruneAnyPath(chars, offset, offset + length, filter); - } else { - throw new IllegalStateException(); - } - } else { - if(filterType == FilterType.ANON) { - rangesAnonymizeAnyPath(chars, offset, offset + length, pathBytes, filter); - } else if(filterType == FilterType.PRUNE) { - rangesPruneAnyPath(chars, offset, offset + length, pathBytes, filter); - } else { - throw new IllegalStateException(); - } - } - } - return filter; - } catch(Exception e) { - return null; - } - } - - public static T rangesAnyPath(final char[] chars, int offset, int limit, int pathMatches, char[] path, FilterType filterType, T filter) { - while(offset < limit) { - if(chars[offset] == '"') { - int nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteIndex = nextOffset; - - nextOffset++; - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[nextOffset] <= 0x20) { // expecting colon, comma, end array or end object - nextOffset++; - } - - if(chars[nextOffset] != ':') { - // was a text value - offset = nextOffset; - - continue; - } - } - - nextOffset++; - - // skip whitespace - while(chars[nextOffset] <= 0x20) { - nextOffset++; - } - - if(path == STAR_CHARS || matchPath(chars, offset + 1, quoteIndex, path)) { - switch(chars[nextOffset]) { - case '[': - case '{': - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - } else { - offset = CharArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - } - break; - case '"': { - offset = CharArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - filter.add(filterType, nextOffset, offset); - break; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.add(filterType, nextOffset, offset); - break; - } - case 'f': { - offset = nextOffset + 5; - filter.add(filterType, nextOffset, offset); - break; - } - default: { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - filter.add(filterType, nextOffset, offset); - } - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - return filter; // done filtering - } - } - } else { - offset = nextOffset; - } - continue; - } - offset++; - } - - return filter; - } - - public static T rangesAnyPath(final byte[] chars, int offset, int limit, int pathMatches, byte[] path, FilterType filterType, T filter) { - while(offset < limit) { - if(chars[offset] == '"') { - int nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteIndex = nextOffset; - - nextOffset++; - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[nextOffset] <= 0x20) { // expecting colon, comma, end array or end object - nextOffset++; - } - - if(chars[nextOffset] != ':') { - // was a text value - offset = nextOffset; - - continue; - } - } - - nextOffset++; - - // skip whitespace - while(chars[nextOffset] <= 0x20) { - nextOffset++; - } - - if(path == STAR_BYTES || matchPath(chars, offset + 1, quoteIndex, path)) { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - } else { - offset = ByteArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset); - } else { - filter.addAnon(nextOffset, offset); - } - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - return filter; // done filtering - } - } - } else { - offset = nextOffset; - } - continue; - } - offset++; - } - - return filter; - } - - public static void rangesAnonymizeAnyPath(final char[] chars, int offset, int limit, char[] path, CharArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = CharArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - int quoteIndex = nextOffset; - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - if(matchPath(chars, offset + 1, quoteIndex, path)) { - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - offset = CharArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = CharArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addAnon(nextOffset, offset); - - continue; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - } else { - offset = nextOffset + 1; - } - } - } - - - public static void rangesPruneAnyPath(final char[] chars, int offset, int limit, CharArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = CharArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - filter.addPrune(nextOffset, offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = CharArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addPrune(nextOffset, offset); - - continue; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - } - } - - public static void rangesAnonymizeAnyPath(final char[] chars, int offset, int limit, CharArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = CharArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - offset = CharArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = CharArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addAnon(nextOffset, offset); - - continue; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - } - } - - public static void rangesPruneAnyPath(final char[] chars, int offset, int limit, char[] path, CharArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = CharArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - int quoteIndex = nextOffset; - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - if(matchPath(chars, offset + 1, quoteIndex, path)) { - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - filter.addPrune(nextOffset, offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = CharArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addPrune(nextOffset, offset); - - continue; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - } else { - offset = nextOffset + 1; - } - } - } - - public static void rangesPruneAnyPath(final byte[] chars, int offset, int limit, byte[] path, ByteArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = ByteArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - int quoteIndex = nextOffset; - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - if(matchPath(chars, offset + 1, quoteIndex, path)) { - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - filter.addPrune(nextOffset, offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = ByteArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addPrune(nextOffset, offset); - - continue; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - } else { - offset = nextOffset + 1; - } - } - } - - public static void rangesAnonymizeAnyPath(final byte[] chars, int offset, int limit, byte[] path, ByteArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = ByteArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - int quoteIndex = nextOffset; - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - if(matchPath(chars, offset + 1, quoteIndex, path)) { - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - offset = ByteArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = ByteArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addAnon(nextOffset, offset); - - continue; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - } else { - offset = nextOffset + 1; - } - } - } - - - public static void rangesPruneAnyPath(final byte[] chars, int offset, int limit, ByteArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = ByteArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - filter.addPrune(nextOffset, offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = ByteArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addPrune(nextOffset, offset); - - continue; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - } - } - - public static void rangesAnonymizeAnyPath(final byte[] chars, int offset, int limit, ByteArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = ByteArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - offset = ByteArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = ByteArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addAnon(nextOffset, offset); - - continue; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - } - } - - public static void rangesAnonymizeAnyPath(final char[] chars, int offset, int limit, int maxPathMatches, char[] path, CharArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = CharArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - int quoteIndex = nextOffset; - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - if(matchPath(chars, offset + 1, quoteIndex, path)) { - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - offset = CharArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = CharArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addAnon(nextOffset, offset); - - break; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - - maxPathMatches--; - if(maxPathMatches == 0) { - break; // done filtering - } - - } else { - offset = nextOffset + 1; - } - } - } - - - public static void rangesPruneAnyPath(final char[] chars, int offset, int limit, int maxPathMatches, CharArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = CharArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - filter.addPrune(nextOffset, offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = CharArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addPrune(nextOffset, offset); - - break; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - - maxPathMatches--; - if(maxPathMatches == 0) { - break; // done filtering - } - - } - } - - public static void rangesAnonymizeAnyPath(final char[] chars, int offset, int limit, int maxPathMatches, CharArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = CharArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - offset = CharArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = CharArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addAnon(nextOffset, offset); - - break; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - maxPathMatches--; - if(maxPathMatches == 0) { - break; // done filtering - } - } - } - - public static void rangesPruneAnyPath(final char[] chars, int offset, int limit, int maxPathMatches, char[] path, CharArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = CharArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - int quoteIndex = nextOffset; - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - if(matchPath(chars, offset + 1, quoteIndex, path)) { - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - filter.addPrune(nextOffset, offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = CharArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addPrune(nextOffset, offset); - - break; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - maxPathMatches--; - if(maxPathMatches == 0) { - break; // done filtering - } - - } else { - offset = nextOffset + 1; - } - } - } - - public static void rangesPruneAnyPath(final byte[] chars, int offset, int limit, int maxPathMatches, byte[] path, ByteArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = ByteArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - int quoteIndex = nextOffset; - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - if(matchPath(chars, offset + 1, quoteIndex, path)) { - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - filter.addPrune(nextOffset, offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = ByteArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addPrune(nextOffset, offset); - - break; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - maxPathMatches--; - if(maxPathMatches == 0) { - break; // done filtering - } - - } else { - offset = nextOffset + 1; - } - } - } - - public static void rangesAnonymizeAnyPath(final byte[] chars, int offset, int limit, int maxPathMatches, byte[] path, ByteArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = ByteArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - int quoteIndex = nextOffset; - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - if(matchPath(chars, offset + 1, quoteIndex, path)) { - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - offset = ByteArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = ByteArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addAnon(nextOffset, offset); - - break; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - maxPathMatches--; - if(maxPathMatches == 0) { - break; // done filtering - } - - } else { - offset = nextOffset + 1; - } - } - } - - - public static void rangesPruneAnyPath(final byte[] chars, int offset, int limit, int maxPathMatches, ByteArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = ByteArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - filter.addPrune(nextOffset, offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = ByteArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addPrune(nextOffset, offset); - - break; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addPrune(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - - maxPathMatches--; - if(maxPathMatches == 0) { - break; // done filtering - } - - } - } - - public static void rangesAnonymizeAnyPath(final byte[] chars, int offset, int limit, int maxPathMatches, ByteArrayRangesFilter filter) { - while(offset < limit) { - if(chars[offset] != '"') { - offset++; - continue; - } - int nextOffset = offset; - while(chars[++nextOffset] != '"'); - if(chars[nextOffset - 1] == '\\') { - nextOffset = ByteArrayRangesFilter.scanEscapedValue(chars, nextOffset); - } - - while(chars[++nextOffset] <= 0x20); - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // was a text value - offset = nextOffset; - - continue; - } - - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - switch(chars[nextOffset]) { - case '[': - case '{': - offset = ByteArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - break; - case '"': { - offset = nextOffset; - while(chars[++offset] != '"'); - if(chars[offset - 1] == '\\') { - offset = ByteArrayRangesFilter.scanEscapedValue(chars, offset); - } - offset++; - filter.addAnon(nextOffset, offset); - - continue; - } - case 't': - case 'n': { - offset = nextOffset + 4; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - case 'f': { - offset = nextOffset + 5; - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - break; - } - default: { - offset = nextOffset; - loop: - while(true) { - switch(chars[++offset]) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case 'e': - case 'E': - continue; - default: break loop; - } - } - filter.addAnon(nextOffset, offset); - // next char cannot be quote, so skip it - offset++; - } - } - - maxPathMatches--; - if(maxPathMatches == 0) { - break; // done filtering - } - } - } - -} diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveAnyPathFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveAnyPathFilterBenchmark.java index 4b219831..f13624b9 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveAnyPathFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveAnyPathFilterBenchmark.java @@ -19,7 +19,6 @@ import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; import com.github.skjolber.jsonfilter.jmh.AbstractAnyPathFilterBenchmark; -import com.github.skjolber.jsonfilter.jmh.AbstractSingleFullPathMaxStringLengthFilterBenchmark; @State(Scope.Thread) diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveSingleFullPathMaxStringLengthFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveSingleFullPathMaxStringLengthFilterBenchmark.java deleted file mode 100644 index b9fa2d03..00000000 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveSingleFullPathMaxStringLengthFilterBenchmark.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.github.skjolber.jsonfilter.jmh.cve; -import java.io.File; -import java.util.concurrent.TimeUnit; - -import org.openjdk.jmh.annotations.BenchmarkMode; -import org.openjdk.jmh.annotations.Fork; -import org.openjdk.jmh.annotations.Measurement; -import org.openjdk.jmh.annotations.Mode; -import org.openjdk.jmh.annotations.OutputTimeUnit; -import org.openjdk.jmh.annotations.Param; -import org.openjdk.jmh.annotations.Scope; -import org.openjdk.jmh.annotations.State; -import org.openjdk.jmh.annotations.Warmup; -import org.openjdk.jmh.results.format.ResultFormatType; -import org.openjdk.jmh.runner.Runner; -import org.openjdk.jmh.runner.RunnerException; -import org.openjdk.jmh.runner.options.Options; -import org.openjdk.jmh.runner.options.OptionsBuilder; - -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.jmh.AbstractSingleFullPathMaxStringLengthFilterBenchmark; - - -@State(Scope.Thread) -@BenchmarkMode(Mode.Throughput) -@OutputTimeUnit(TimeUnit.SECONDS) -@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) -@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) - -@Fork(1) -public class CveSingleFullPathMaxStringLengthFilterBenchmark extends AbstractSingleFullPathMaxStringLengthFilterBenchmark { - - private static String PATH = "/CVE_Items/cve/affects/vendor/vendor_data/vendor_name"; - - @Param(value={"2KB","8KB","14KB","22KB","30KB","50KB","70KB","100KB","200KB"}) - //@Param(value={"2KB"}) - private String fileName; - - @Override - protected File getFile() { - return new File("./src/test/resources/benchmark/cves/" + fileName); - } - - @Override - protected int getMaxStringLength() { - return 64; - } - - @Override - protected FilterType getFilterType() { - return FilterType.ANON; - } - - @Override - protected String getPath() { - return PATH; - } - - public static void main(String[] args) throws RunnerException { - Options opt = new OptionsBuilder() - .include(CveSingleFullPathMaxStringLengthFilterBenchmark.class.getSimpleName()) - .warmupIterations(5) - .measurementIterations(2) - .result("target/" + System.currentTimeMillis() + "." + CveSingleFullPathMaxStringLengthFilterBenchmark.class.getSimpleName() + ".json") - .resultFormat(ResultFormatType.JSON) - .build(); - - new Runner(opt).run(); - } - -} \ No newline at end of file diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java index 49d0ca9a..4d4d03d0 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java @@ -32,9 +32,7 @@ import com.github.skjolber.jsonfilter.base.path.any.AnyPathFilters; import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; import com.github.skjolber.jsonfilter.core.MaxSizeJsonFilter; -import com.github.skjolber.jsonfilter.core.SingleFullPathJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMultiAnyPathMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonSingleFullPathMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jmh.utils.JsonMaskerJsonFilter; import dev.blaauwendraad.masker.json.JsonMasker; diff --git a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonFilterFactory.java b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonFilterFactory.java index 9af9b740..e06591c3 100644 --- a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonFilterFactory.java +++ b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonFilterFactory.java @@ -70,21 +70,6 @@ public JsonFilter newJsonFilter() { if(isActivePathFilters()) { // check for single prune/anon filter - if(isSinglePruneFilter()) { - if(!AbstractPathJsonFilter.hasAnyPrefix(pruneFilters[0])) { - if(isActiveMaxSize()) { - return new JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - return new JacksonSingleFullPathMaxStringLengthJsonFilter(maxStringLength, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - } else if(isSingleAnonymizeFilter()) { - if(!AbstractPathJsonFilter.hasAnyPrefix(anonymizeFilters[0])) { - if(isActiveMaxSize()) { - return new JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - return new JacksonSingleFullPathMaxStringLengthJsonFilter(maxStringLength, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - } if(!isFullPrefix(anonymizeFilters) && !isFullPrefix(pruneFilters)) { // TODO multi any max size if(!isActiveMaxSize()) { diff --git a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxSizeMaxStringLengthJsonFilter.java b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxSizeMaxStringLengthJsonFilter.java index f65fca63..136f9854 100644 --- a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxSizeMaxStringLengthJsonFilter.java +++ b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxSizeMaxStringLengthJsonFilter.java @@ -193,7 +193,7 @@ public boolean process(final JsonParser parser, JsonGenerator generator, LongSup generator.writeFieldName(currentName); generator.copyCurrentEvent(parser); // keep structure, but mark all values - if(!JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter.anonymizeChildren(parser, generator, maxSize - 1, outputSizeSupplier, anonymizeJsonValue, metrics)) { + if(!anonymizeChildren(parser, generator, maxSize - 1, outputSizeSupplier, anonymizeJsonValue, metrics)) { break; } } else { @@ -272,5 +272,79 @@ public boolean process(final JsonParser parser, JsonGenerator generator, LongSup return true; } + + + protected static boolean anonymizeChildren(final JsonParser parser, JsonGenerator generator, long maxSize, LongSupplier outputSizeSupplier, char[] anonymizeJsonValue, JsonFilterMetrics metrics) throws IOException { + int level = 1; + + String fieldName = null; + while(level > 0) { + JsonToken nextToken = parser.nextToken(); + if(nextToken == null) { + return false; + } + + switch(nextToken) { + case START_OBJECT: + case START_ARRAY: + level++; + maxSize--; + break; + case END_OBJECT: + case END_ARRAY: + level--; + maxSize++; + break; + case FIELD_NAME: + fieldName = parser.currentName(); + continue; + case VALUE_STRING: + parser.getTextLength(); + break; + default: // do nothing + } + + long outputSize; + if(nextToken.isScalarValue()) { + outputSize = anonymizeJsonValue.length; + } else { + outputSize = 1; + } + if(fieldName != null) { + outputSize += fieldName.length() + 3; + } + + if(parser.getParsingContext().getCurrentIndex() >= 2) { + outputSize++; + } + + long size = outputSizeSupplier.getAsLong(); + + if(outputSize + size > maxSize) { + if(metrics != null) { + metrics.onMaxSize(-1); + } + return false; + } + + if(fieldName != null) { + generator.writeFieldName(fieldName); + fieldName = null; + } + + if(nextToken.isScalarValue()) { + generator.writeRawValue(anonymizeJsonValue, 0, anonymizeJsonValue.length); + + if(metrics != null) { + metrics.onAnonymize(1); + } + } else { + generator.copyCurrentEvent(parser); + } + } + + return true; + } + } \ No newline at end of file diff --git a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter.java b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter.java deleted file mode 100644 index bc14d328..00000000 --- a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter.java +++ /dev/null @@ -1,442 +0,0 @@ -package com.github.skjolber.jsonfilter.jackson; -import java.io.IOException; -import java.util.function.LongSupplier; - -import org.apache.commons.io.output.StringBuilderWriter; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; - -public class JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter extends JacksonSingleFullPathMaxStringLengthJsonFilter implements JacksonJsonFilter { - - public JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type) { - this(maxStringLength, maxSize, maxPathMatches, expression, type, new JsonFactory()); - } - - public JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, JsonFactory jsonFactory) { - this(maxStringLength, maxSize, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE, jsonFactory); - } - - public JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - this(maxStringLength, maxSize, expression, type, pruneMessage, anonymizeMessage, truncateMessage, new JsonFactory()); - } - - public JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { - this(maxStringLength, maxSize, -1, expression, type, pruneMessage, anonymizeMessage, truncateMessage, jsonFactory); - } - - protected JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage, jsonFactory); - } - - public boolean process(char[] chars, int offset, int length, StringBuilder output, JsonFilterMetrics metrics) { - if(!mustConstrainMaxSize(length)) { - return super.process(chars, offset, length, output, metrics); - } - output.ensureCapacity(output.length() + length); - - try ( - JsonGenerator generator = jsonFactory.createGenerator(new StringBuilderWriter(output)); - JsonParser parser = jsonFactory.createParser(chars, offset, length) - ) { - return process(parser, generator, () -> parser.currentLocation().getCharOffset(), () -> generator.getOutputBuffered() + output.length(), metrics); - } catch(final Exception e) { - return false; - } - } - - public boolean process(byte[] bytes, int offset, int length, StringBuilder output, JsonFilterMetrics metrics) { - if(!mustConstrainMaxSize(length)) { - return super.process(bytes, offset, length, output, metrics); - } - output.ensureCapacity(output.length() + length); - - try ( - JsonGenerator generator = jsonFactory.createGenerator(new StringBuilderWriter(output)); - JsonParser parser = jsonFactory.createParser(bytes, offset, length) - ) { - return process(parser, generator, () -> parser.currentLocation().getByteOffset(), () -> generator.getOutputBuffered() + output.length(), metrics); - } catch(final Exception e) { - return false; - } - } - - public boolean process(byte[] bytes, int offset, int length, ResizableByteArrayOutputStream output, JsonFilterMetrics metrics) { - if(!mustConstrainMaxSize(length)) { - return super.process(bytes, offset, length, output, metrics); - } - - try ( - JsonGenerator generator = jsonFactory.createGenerator(output); - JsonParser parser = jsonFactory.createParser(bytes, offset, length) - ) { - return process(parser, generator, () -> parser.currentLocation().getByteOffset(), () -> generator.getOutputBuffered() + output.size(), metrics); - } catch(final Exception e) { - return false; - } - } - - - public boolean process(final JsonParser parser, JsonGenerator generator, LongSupplier offsetSupplier, LongSupplier outputSizeSupplier, JsonFilterMetrics metrics) throws IOException { - // estimate output size based on input size - - // if size limit is reached, do a more accurate output measurement - StringBuilder builder = new StringBuilder(Math.max(16 * 1024, maxStringLength + 11 + truncateStringValue.length + 2)); // i.e - - final String[] elementPaths = this.paths; - - int maxSize = this.maxSize; - - int level = 0; - - String fieldName = null; - - long offset = offsetSupplier.getAsLong(); - - while(true) { - JsonToken nextToken = parser.nextToken(); - if(nextToken == null) { - break; - } - - switch(nextToken) { - case START_OBJECT: - level++; - case START_ARRAY: - maxSize--; - break; - case END_OBJECT: - level--; - case END_ARRAY: - maxSize++; - break; - case VALUE_STRING: - parser.getTextLength(); - break; - default: // do nothing - } - - if(nextToken == JsonToken.FIELD_NAME) { - String currentName = parser.currentName(); - - if(matchPath(currentName, elementPaths[level])) { - if(level + 1 == elementPaths.length) { - nextToken = parser.nextToken(); - if(nextToken == JsonToken.VALUE_STRING) { - parser.getTextLength(); - } - - if(nextToken.isScalarValue()) { - char[] message; - if(filterType == FilterType.ANON) { - message = anonymizeJsonValue; - } else { - message = pruneJsonValue; - } - - long size = currentName.length() + 3 + message.length + outputSizeSupplier.getAsLong() ; - if(parser.getParsingContext().getCurrentIndex() >= 2) { - size++; - } - - if(size > maxSize) { - break; - } - - generator.writeFieldName(currentName); - generator.writeRawValue(message, 0, message.length); - } else { - // array or object - if(filterType == FilterType.ANON) { - - // the anon message might not be written - long size = currentName.length() + 3 + outputSizeSupplier.getAsLong(); - if(parser.getParsingContext().getCurrentIndex() >= 2) { - size++; - } - - if(size > maxSize) { - break; - } - - // keep structure, but mark all values - generator.writeFieldName(currentName); - generator.copyCurrentEvent(parser); - - if(!anonymizeChildren(parser, generator, maxSize, outputSizeSupplier, anonymizeJsonValue, metrics)) { - break; - } - } else { - long size = currentName.length() + 3 + pruneJsonValue.length + outputSizeSupplier.getAsLong(); - if(parser.getParsingContext().getCurrentIndex() >= 2) { - size++; - } - - if(size > maxSize) { - break; - } - generator.writeFieldName(currentName); - generator.writeRawValue(pruneJsonValue, 0, pruneJsonValue.length); - - parser.skipChildren(); // skip children - } - } - offset = offsetSupplier.getAsLong(); - } else { - fieldName = parser.currentName(); - } - continue; - } else { - fieldName = parser.currentName(); - - nextToken = parser.nextToken(); - if(nextToken.isStructStart()) { - maxSize--; - - long nextOffset = offsetSupplier.getAsLong(); - - long size = nextOffset - offset; // i.e. this includes whitespace - - long outputSize = outputSizeSupplier.getAsLong(); - - if(outputSize + size > maxSize) { - - // do more accurate size calculation - int accurateSize = JacksonMaxSizeMaxStringLengthJsonFilter.getAccurateMaxStringSize(parser, fieldName, nextToken, maxStringLength, truncateStringValue); - - if(outputSize + accurateSize > maxSize) { - if(metrics != null) { - metrics.onMaxSize(-1); - } - - break; - } - } - - generator.writeFieldName(fieldName); - fieldName = null; - - generator.copyCurrentEvent(parser); - - if(!skipMaxSizeMaxStringLengthChildren(parser, generator, offsetSupplier, outputSizeSupplier, maxSize, maxStringLength, builder, truncateStringValue, metrics)) { - generator.flush(); - - return true; - } - offset = offsetSupplier.getAsLong(); - - maxSize++; - - continue; - } - } - } - - long nextOffset = offsetSupplier.getAsLong(); - - long size = nextOffset - offset; // i.e. this includes whitespace - - long outputSize = outputSizeSupplier.getAsLong(); - - if(outputSize + size > maxSize) { - - // do more accurate size calculation - int accurateSize = JacksonMaxSizeMaxStringLengthJsonFilter.getAccurateMaxStringSize(parser, fieldName, nextToken, maxStringLength, truncateStringValue); - - if(outputSize + accurateSize > maxSize) { - if(metrics != null) { - metrics.onMaxSize(-1); - } - - break; - } - } - - if(fieldName != null) { - generator.writeFieldName(fieldName); - fieldName = null; - } - - if(nextToken == JsonToken.VALUE_STRING && parser.getTextLength() > maxStringLength) { - JacksonMaxStringLengthJsonFilter.writeMaxStringLength(parser, generator, builder, maxStringLength, truncateStringValue); - - if(metrics != null) { - metrics.onMaxStringLength(1); - } - - offset = nextOffset; - - continue; - } - - generator.copyCurrentEvent(parser); - - offset = nextOffset; - } - generator.flush(); - - return true; - } - - public static boolean skipMaxSizeMaxStringLengthChildren(final JsonParser parser, JsonGenerator generator, LongSupplier offsetSupplier, LongSupplier outputSizeSupplier, int maxSize, int maxStringLength, StringBuilder builder, char[] truncateStringValue, JsonFilterMetrics metrics) throws IOException { - String fieldName = null; - - long offset = offsetSupplier.getAsLong(); - - int level = 1; - - while(true) { - JsonToken nextToken = parser.nextToken(); - if(nextToken == null) { - break; - } - - switch(nextToken) { - case START_ARRAY: - case START_OBJECT: - level++; - maxSize--; - break; - case END_ARRAY: - case END_OBJECT: - level--; - maxSize++; - - if(level == 0) { - generator.copyCurrentEvent(parser); - return true; - } - - break; - case FIELD_NAME: - fieldName = parser.currentName(); - continue; - case VALUE_STRING: - parser.getTextLength(); - break; - default: // do nothing - } - - long nextOffset = offsetSupplier.getAsLong(); - - long size = nextOffset - offset; // i.e. this includes whitespace - - long outputSize = outputSizeSupplier.getAsLong(); - - if(outputSize + size > maxSize) { - - // do more accurate size calculation - int accurateSize = JacksonMaxSizeMaxStringLengthJsonFilter.getAccurateMaxStringSize(parser, fieldName, nextToken, maxStringLength, truncateStringValue); - - if(outputSize + accurateSize > maxSize) { - if(metrics != null) { - metrics.onMaxSize(-1); - } - - return false; - } - } - - if(fieldName != null) { - generator.writeFieldName(fieldName); - fieldName = null; - } - - if(nextToken == JsonToken.VALUE_STRING && parser.getTextLength() > maxStringLength) { - JacksonMaxStringLengthJsonFilter.writeMaxStringLength(parser, generator, builder, maxStringLength, truncateStringValue); - - if(metrics != null) { - metrics.onMaxStringLength(1); - } - - offset = nextOffset; - - continue; - } - - generator.copyCurrentEvent(parser); - - offset = nextOffset; - } - - return true; - } - - protected static boolean anonymizeChildren(final JsonParser parser, JsonGenerator generator, long maxSize, LongSupplier outputSizeSupplier, char[] anonymizeJsonValue, JsonFilterMetrics metrics) throws IOException { - int level = 1; - - String fieldName = null; - while(level > 0) { - JsonToken nextToken = parser.nextToken(); - if(nextToken == null) { - return false; - } - - switch(nextToken) { - case START_OBJECT: - case START_ARRAY: - level++; - maxSize--; - break; - case END_OBJECT: - case END_ARRAY: - level--; - maxSize++; - break; - case FIELD_NAME: - fieldName = parser.currentName(); - continue; - case VALUE_STRING: - parser.getTextLength(); - break; - default: // do nothing - } - - long outputSize; - if(nextToken.isScalarValue()) { - outputSize = anonymizeJsonValue.length; - } else { - outputSize = 1; - } - if(fieldName != null) { - outputSize += fieldName.length() + 3; - } - - if(parser.getParsingContext().getCurrentIndex() >= 2) { - outputSize++; - } - - long size = outputSizeSupplier.getAsLong(); - - if(outputSize + size > maxSize) { - if(metrics != null) { - metrics.onMaxSize(-1); - } - return false; - } - - if(fieldName != null) { - generator.writeFieldName(fieldName); - fieldName = null; - } - - if(nextToken.isScalarValue()) { - generator.writeRawValue(anonymizeJsonValue, 0, anonymizeJsonValue.length); - - if(metrics != null) { - metrics.onAnonymize(1); - } - } else { - generator.copyCurrentEvent(parser); - } - } - - return true; - } - - -} \ No newline at end of file diff --git a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxStringLengthJsonFilter.java b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxStringLengthJsonFilter.java deleted file mode 100644 index 1f916836..00000000 --- a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxStringLengthJsonFilter.java +++ /dev/null @@ -1,203 +0,0 @@ -package com.github.skjolber.jsonfilter.jackson; -import java.io.IOException; - -import org.apache.commons.io.output.StringBuilderWriter; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonToken; -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractSingleStringFullPathJsonFilter; - -public class JacksonSingleFullPathMaxStringLengthJsonFilter extends AbstractSingleStringFullPathJsonFilter implements JacksonJsonFilter { - - protected final JsonFactory jsonFactory; - - public JacksonSingleFullPathMaxStringLengthJsonFilter(int maxStringLength, String expression, FilterType type) { - this(maxStringLength, expression, type, new JsonFactory()); - } - - public JacksonSingleFullPathMaxStringLengthJsonFilter(int maxStringLength, String expression, FilterType type, JsonFactory jsonFactory) { - this(maxStringLength, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE, jsonFactory); - } - - public JacksonSingleFullPathMaxStringLengthJsonFilter(int maxStringLength, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - this(maxStringLength, expression, type, pruneMessage, anonymizeMessage, truncateMessage, new JsonFactory()); - } - - public JacksonSingleFullPathMaxStringLengthJsonFilter(int maxStringLength, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { - this(maxStringLength, -1, -1, expression, type, pruneMessage, anonymizeMessage, truncateMessage, jsonFactory); - } - - protected JacksonSingleFullPathMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - - this.jsonFactory = jsonFactory; - } - - protected char[] getPruneJsonValue() { - return pruneJsonValue; - } - - protected char[] getAnonymizeJsonValue() { - return anonymizeJsonValue; - } - - protected char[] getTruncateStringValue() { - return truncateStringValue; - } - - public boolean process(char[] chars, int offset, int length, StringBuilder output, JsonFilterMetrics metrics) { - output.ensureCapacity(output.length() + length); - - try ( - JsonGenerator generator = jsonFactory.createGenerator(new StringBuilderWriter(output)); - JsonParser parser = jsonFactory.createParser(chars, offset, length) - ) { - return process(parser, generator, metrics); - } catch(final Exception e) { - return false; - } - } - - public boolean process(byte[] bytes, int offset, int length, StringBuilder output, JsonFilterMetrics metrics) { - output.ensureCapacity(output.length() + length); - - try ( - JsonGenerator generator = jsonFactory.createGenerator(new StringBuilderWriter(output)); - JsonParser parser = jsonFactory.createParser(bytes, offset, length) - ) { - return process(parser, generator, metrics); - } catch(final Exception e) { - return false; - } - } - - public boolean process(byte[] bytes, int offset, int length, ResizableByteArrayOutputStream output, JsonFilterMetrics metrics) { - try ( - JsonGenerator generator = jsonFactory.createGenerator(output); - JsonParser parser = jsonFactory.createParser(bytes, offset, length) - ) { - return process(parser, generator, metrics); - } catch(final Exception e) { - return false; - } - } - - public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { - - StringBuilder builder = new StringBuilder(Math.max(16 * 1024, maxStringLength + 11 + truncateStringValue.length + 2)); // i.e - - final String[] elementPaths = this.paths; - - int level = 0; - - while(true) { - JsonToken nextToken = parser.nextToken(); - if(nextToken == null) { - break; - } - - if(nextToken == JsonToken.START_OBJECT) { - level++; - } else if(nextToken == JsonToken.END_OBJECT) { - level--; - } else if(nextToken == JsonToken.FIELD_NAME) { - - if(matchPath(parser.currentName(), elementPaths[level])) { - if(level + 1 == elementPaths.length) { - generator.copyCurrentEvent(parser); - - nextToken = parser.nextToken(); - if(nextToken.isScalarValue()) { - if(filterType == FilterType.ANON) { - generator.writeRawValue(anonymizeJsonValue, 0, anonymizeJsonValue.length); - } else { - generator.writeRawValue(pruneJsonValue, 0, pruneJsonValue.length); - } - } else { - // array or object - if(filterType == FilterType.ANON) { - generator.copyCurrentEvent(parser); - - // keep structure, but mark all values - anonymizeChildren(parser, generator, metrics); - } else { - generator.writeRawValue(pruneJsonValue, 0, pruneJsonValue.length); - parser.skipChildren(); // skip children - - if(metrics != null) { - metrics.onPrune(1); - } - } - } - - continue; - } - } else { - generator.copyCurrentEvent(parser); - - nextToken = parser.nextToken(); - if(nextToken.isScalarValue()) { - if(nextToken == JsonToken.VALUE_STRING && parser.getTextLength() > maxStringLength) { - JacksonMaxStringLengthJsonFilter.writeMaxStringLength(parser, generator, builder, maxStringLength, truncateStringValue); - - if(metrics != null) { - metrics.onMaxStringLength(1); - } - - continue; - } - generator.copyCurrentEvent(parser); - } else if(nextToken.isStructStart()) { - generator.copyCurrentEvent(parser); - - JacksonMaxStringLengthJsonFilter.skipMaxStringLength(parser, generator, maxStringLength, builder, metrics, truncateStringValue); - } else { - generator.copyCurrentEvent(parser); - } - continue; - } - } else if(nextToken == JsonToken.VALUE_STRING && parser.getTextLength() > maxStringLength) { - JacksonMaxStringLengthJsonFilter.writeMaxStringLength(parser, generator, builder, maxStringLength, truncateStringValue); - - if(metrics != null) { - metrics.onMaxStringLength(1); - } - - continue; - } - - generator.copyCurrentEvent(parser); - } - generator.flush(); // don't close - - return true; - } - - protected void anonymizeChildren(JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { - int level = 1; - - while(level > 0) { - JsonToken nextToken = parser.nextToken(); - - if(nextToken == JsonToken.START_OBJECT || nextToken == JsonToken.START_ARRAY) { - level++; - } else if(nextToken == JsonToken.END_OBJECT || nextToken == JsonToken.END_ARRAY) { - level--; - } else if(nextToken.isScalarValue()) { - generator.writeRawValue(anonymizeJsonValue, 0, anonymizeJsonValue.length); - - if(metrics != null) { - metrics.onAnonymize(1); - } - - continue; - } - - generator.copyCurrentEvent(parser); - } - } -} \ No newline at end of file diff --git a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonLogFilterBuilderTest.java b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonLogFilterBuilderTest.java index b1227acb..c23395a9 100644 --- a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonLogFilterBuilderTest.java +++ b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonLogFilterBuilderTest.java @@ -30,30 +30,4 @@ public void testTruncateMesseage() { assertThat(new String(filter.getAnonymizeJsonValue())).isEqualTo("\"*\""); } - @Test - public void testAnonymizeMessage() { - JacksonSingleFullPathMaxStringLengthJsonFilter filter = (JacksonSingleFullPathMaxStringLengthJsonFilter) JacksonJsonLogFilterBuilder.createInstance() - .withMaxStringLength(127) - .withAnonymize("/customer/email") // inserts ***** for values - .withAnonymizeStringValue("x\nxxxx") - .build(); - assertNotNull(filter); - assertThat(new String(filter.getAnonymizeJsonValue())).isEqualTo("\"x\\nxxxx\""); - assertThat(new String(filter.getPruneJsonValue())).isEqualTo("\"PRUNED\""); - assertThat(new String(filter.getTruncateStringValue())).isEqualTo("... + "); - } - - @Test - public void testPruneMessage() { - JacksonSingleFullPathMaxStringLengthJsonFilter filter = (JacksonSingleFullPathMaxStringLengthJsonFilter) JacksonJsonLogFilterBuilder.createInstance() - .withMaxStringLength(127) - .withPrune("/customer/email") // inserts ***** for values - .withPruneStringValue("x\nxxxx") - .build(); - assertNotNull(filter); - assertThat(new String(filter.getPruneJsonValue())).isEqualTo("\"x\\nxxxx\""); - assertThat(new String(filter.getAnonymizeJsonValue())).isEqualTo("\"*\""); - assertThat(new String(filter.getTruncateStringValue())).isEqualTo("... + "); - } - } diff --git a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilterTest.java b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilterTest.java deleted file mode 100644 index 469cb8d2..00000000 --- a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilterTest.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.github.skjolber.jsonfilter.jackson; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -import org.apache.commons.io.output.StringBuilderWriter; -import org.junit.jupiter.api.Test; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.cache.MaxSizeJsonFilterPair.MaxSizeJsonFilterFunction; - -public class JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilterTest extends AbstractDefaultJacksonJsonFilterTest { - - private static class MustContrainJacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter extends JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter { - - public MustContrainJacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type) { - super(maxStringLength, maxSize, maxPathMatches, expression, type); - } - - @Override - protected boolean mustConstrainMaxSize(int length) { - return true; - } - }; - - public JacksonSingleFullPathMaxSizeMaxStringLengthJsonFilterTest() throws Exception { - super(false); - } - - @Test - public void testMaxSize() throws IOException { - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new JacksonMaxSizeJsonFilter(size)); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON)).hasPassthrough(); - } - - @Test - public void anonymize() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEFAULT_PATH, FilterType.ANON); - assertThat(maxSize, new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH); - - maxSize = (size) -> new MustContrainJacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEEP_PATH1, FilterType.ANON); - assertThat(maxSize, new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEEP_PATH1, FilterType.ANON)).hasAnonymized(DEEP_PATH1); - } - - @Test - public void anonymizeWildcard() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEFAULT_WILDCARD_PATH, FilterType.ANON); - assertThat(maxSize, new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_WILDCARD_PATH); - } - - @Test - public void prune() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEFAULT_PATH, FilterType.PRUNE); - assertThat(maxSize, new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH); - - maxSize = (size) -> new MustContrainJacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEEP_PATH3, FilterType.PRUNE); - assertThat(maxSize, new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEEP_PATH3, FilterType.PRUNE)).hasPruned(DEEP_PATH3); - } - - @Test - public void pruneWildcard() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE); - assertThat(maxSize, new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_WILDCARD_PATH); - } - - @Test - public void maxStringLength() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonSingleFullPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, -1, PASSTHROUGH_XPATH, FilterType.PRUNE); - assertThat(maxSize, new JacksonSingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, PASSTHROUGH_XPATH, FilterType.PRUNE)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH); - } - - @Test - public void testConvenienceMethods() throws IOException { - JsonFactory jsonFactory = mock(JsonFactory.class); - when(jsonFactory.createGenerator(any(StringBuilderWriter.class))).thenThrow(new RuntimeException()); - when(jsonFactory.createGenerator(any(ByteArrayOutputStream.class))).thenThrow(new RuntimeException()); - - testConvenienceMethods( - new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON) { - public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) { - return true; - } - }, - new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON) { - public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) { - throw new RuntimeException(); - } - }, - new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON, jsonFactory) { - public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) { - throw new RuntimeException(); - } - } - ); - - } - -} diff --git a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxStringLengthJsonFilterTest.java b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxStringLengthJsonFilterTest.java deleted file mode 100644 index 9381c4a6..00000000 --- a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonSingleFullPathMaxStringLengthJsonFilterTest.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.github.skjolber.jsonfilter.jackson; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -import org.apache.commons.io.output.StringBuilderWriter; -import org.junit.jupiter.api.Test; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; - -public class JacksonSingleFullPathMaxStringLengthJsonFilterTest extends AbstractDefaultJacksonJsonFilterTest { - - public JacksonSingleFullPathMaxStringLengthJsonFilterTest() throws Exception { - super(true); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON)).hasPassthrough(); - } - - @Test - public void anonymize() throws Exception { - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH); - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEEP_PATH1, FilterType.ANON)).hasAnonymized(DEEP_PATH1); - } - - @Test - public void anonymizeWildcard() throws Exception { - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_WILDCARD_PATH); - } - - @Test - public void prune() throws Exception { - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH); - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEEP_PATH3, FilterType.PRUNE)).hasPruned(DEEP_PATH3); - } - - @Test - public void pruneWildcard() throws Exception { - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_WILDCARD_PATH); - } - - @Test - public void maxStringLength() throws Exception { - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, PASSTHROUGH_XPATH, FilterType.PRUNE)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH); - } - - @Test - public void testConvenienceMethods() throws IOException { - JsonFactory jsonFactory = mock(JsonFactory.class); - when(jsonFactory.createGenerator(any(StringBuilderWriter.class))).thenThrow(new RuntimeException()); - when(jsonFactory.createGenerator(any(ByteArrayOutputStream.class))).thenThrow(new RuntimeException()); - - testConvenienceMethods( - new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON) { - public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) { - return true; - } - }, - new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON) { - public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) { - throw new RuntimeException(); - } - }, - new JacksonSingleFullPathMaxStringLengthJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON, jsonFactory) { - public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics){ - throw new RuntimeException(); - } - } - ); - } - - @Test - public void maxStringLengthAnonymize() throws Exception { - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, DEFAULT_PATH, FilterType.ANON)) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) - .hasAnonymized(DEFAULT_PATH); - } - - @Test - public void maxStringLengthPrune() throws Exception { - assertThat(new JacksonSingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, DEFAULT_PATH, FilterType.PRUNE)) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) - .hasPruned(DEFAULT_PATH); - } -} diff --git a/impl/core/pom.xml b/impl/core/pom.xml index b58fd8bb..47adf5b9 100644 --- a/impl/core/pom.xml +++ b/impl/core/pom.xml @@ -66,7 +66,7 @@ INSTRUCTION COVEREDRATIO - 0.85 + 0.80 CLASS diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesSingleCharArrayAnyPathJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesSingleCharArrayAnyPathJsonFilter.java deleted file mode 100644 index eac67306..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesSingleCharArrayAnyPathJsonFilter.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractSingleCharArrayAnyPathJsonFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesSizeFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesSizeFilter; - -public abstract class AbstractRangesSingleCharArrayAnyPathJsonFilter extends AbstractSingleCharArrayAnyPathJsonFilter { - - public AbstractRangesSingleCharArrayAnyPathJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public boolean process(final char[] chars, int offset, int length, final StringBuilder buffer) { - CharArrayRangesFilter copy = ranges(chars, offset, length); - if(copy == null) { - return false; - } - - buffer.ensureCapacity(buffer.length() + copy.getMaxOutputLength()); - - copy.filter(chars, offset, length, buffer); - - return true; - } - - protected abstract CharArrayRangesFilter ranges(final char[] chars, int offset, int length); - - public boolean process(final byte[] chars, int offset, int length, final ResizableByteArrayOutputStream buffer) { - ByteArrayRangesFilter copy = ranges(chars, offset, length); - if(copy == null) { - return false; - } - - copy.filter(chars, offset, length, buffer); - - return true; - } - - - public boolean process(final byte[] chars, int offset, int length, final ResizableByteArrayOutputStream buffer, JsonFilterMetrics metrics) { - ByteArrayRangesFilter copy = ranges(chars, offset, length); - if(copy == null) { - return false; - } - - copy.filter(chars, offset, length, buffer, metrics); - - return true; - } - - public boolean process(final char[] chars, int offset, int length, final StringBuilder buffer, JsonFilterMetrics metrics) { - CharArrayRangesFilter copy = ranges(chars, offset, length); - if(copy == null) { - return false; - } - - buffer.ensureCapacity(buffer.length() + copy.getMaxOutputLength()); - - copy.filter(chars, offset, length, buffer, metrics); - - return true; - } - - protected abstract ByteArrayRangesFilter ranges(final byte[] chars, int offset, int length); - - - protected CharArrayRangesFilter getCharArrayRangesFilter(int length) { - return getCharArrayRangesFilter(-1, length); - } - - protected CharArrayRangesFilter getCharArrayRangesFilter(int capacity, int length) { - return new CharArrayRangesFilter(capacity, length, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - - protected CharArrayRangesSizeFilter getCharArrayRangesBracketFilter(int capacity, int length) { - return new CharArrayRangesSizeFilter(capacity, length, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - - protected ByteArrayRangesSizeFilter getByteArrayRangesBracketFilter(int capacity, int length) { - return new ByteArrayRangesSizeFilter(capacity, length, pruneJsonValueAsBytes, anonymizeJsonValueAsBytes, truncateStringValueAsBytes); - } - - protected ByteArrayRangesFilter getByteArrayRangesFilter(int length) { - return getByteArrayRangesFilter(-1, length); - } - - protected ByteArrayRangesFilter getByteArrayRangesFilter(int capacity, int length) { - return new ByteArrayRangesFilter(capacity, length, pruneJsonValueAsBytes, anonymizeJsonValueAsBytes, truncateStringValueAsBytes); - } - -} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesSingleCharArrayFullPathJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesSingleCharArrayFullPathJsonFilter.java deleted file mode 100644 index 79534154..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesSingleCharArrayFullPathJsonFilter.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractSingleCharArrayFullPathJsonFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesSizeFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesSizeFilter; - -public abstract class AbstractRangesSingleCharArrayFullPathJsonFilter extends AbstractSingleCharArrayFullPathJsonFilter { - - public AbstractRangesSingleCharArrayFullPathJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public boolean process(final char[] chars, int offset, int length, final StringBuilder buffer) { - CharArrayRangesFilter copy = ranges(chars, offset, length); - if(copy == null) { - return false; - } - - buffer.ensureCapacity(buffer.length() + copy.getMaxOutputLength()); - - try { - copy.filter(chars, offset, length, buffer); - - return true; - } catch(Exception e) { - return false; - } - } - - protected abstract CharArrayRangesFilter ranges(final char[] chars, int offset, int length); - - public boolean process(final byte[] chars, int offset, int length, final ResizableByteArrayOutputStream buffer) { - ByteArrayRangesFilter copy = ranges(chars, offset, length); - if(copy == null) { - return false; - } - - try { - copy.filter(chars, offset, length, buffer); - - return true; - } catch(Exception e) { - return false; - } - } - - - public boolean process(final byte[] chars, int offset, int length, final ResizableByteArrayOutputStream buffer, JsonFilterMetrics metrics) { - ByteArrayRangesFilter copy = ranges(chars, offset, length); - if(copy == null) { - return false; - } - - try { - copy.filter(chars, offset, length, buffer, metrics); - - return true; - } catch(Exception e) { - return false; - } - } - - public boolean process(final char[] chars, int offset, int length, final StringBuilder buffer, JsonFilterMetrics metrics) { - CharArrayRangesFilter copy = ranges(chars, offset, length); - if(copy == null) { - return false; - } - - try { - buffer.ensureCapacity(buffer.length() + copy.getMaxOutputLength()); - - copy.filter(chars, offset, length, buffer, metrics); - - return true; - } catch(Exception e) { - return false; - } - } - - protected abstract ByteArrayRangesFilter ranges(final byte[] chars, int offset, int length); - - - protected CharArrayRangesFilter getCharArrayRangesFilter(int length) { - return getCharArrayRangesFilter(-1, length); - } - - protected CharArrayRangesFilter getCharArrayRangesFilter(int capacity, int length) { - return new CharArrayRangesFilter(capacity, length, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - - protected CharArrayRangesSizeFilter getCharArrayRangesBracketFilter(int capacity, int length) { - return new CharArrayRangesSizeFilter(capacity, length, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - - protected ByteArrayRangesSizeFilter getByteArrayRangesBracketFilter(int capacity, int length) { - return new ByteArrayRangesSizeFilter(capacity, length, pruneJsonValueAsBytes, anonymizeJsonValueAsBytes, truncateStringValueAsBytes); - } - - protected ByteArrayRangesFilter getByteArrayRangesFilter(int length) { - return getByteArrayRangesFilter(-1, length); - } - - protected ByteArrayRangesFilter getByteArrayRangesFilter(int capacity, int length) { - return new ByteArrayRangesFilter(capacity, length, pruneJsonValueAsBytes, anonymizeJsonValueAsBytes, truncateStringValueAsBytes); - } - -} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactory.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactory.java index 433bb8ff..59040e3f 100644 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactory.java +++ b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactory.java @@ -20,16 +20,12 @@ import com.github.skjolber.jsonfilter.base.AbstractJsonFilter; import com.github.skjolber.jsonfilter.base.AbstractJsonFilterFactory; import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; import com.github.skjolber.jsonfilter.base.DefaultJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MaxStringLengthMaxSizeRemoveWhitespaceJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MaxStringLengthRemoveWhitespaceJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MultiPathMaxStringLengthRemoveWhitespaceJsonFilter; import com.github.skjolber.jsonfilter.core.ws.RemoveWhitespaceJsonFilter; -import com.github.skjolber.jsonfilter.core.ws.SingleFullPathMaxSizeRemoveWhitespaceJsonFilter; -import com.github.skjolber.jsonfilter.core.ws.SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter; -import com.github.skjolber.jsonfilter.core.ws.SingleFullPathRemoveWhitespaceJsonFilter; /** * Default {@linkplain JsonFilter} factory. @@ -77,84 +73,12 @@ public JsonFilter newJsonFilter() { if(removeWhitespace) { // TODO more filters for removing whitespace - if(isSinglePruneFilter()) { - if(!AbstractPathJsonFilter.hasAnyPrefix(pruneFilters[0])) { - if(isActiveMaxStringLength()) { - if(!isActiveMaxSize()) { - return new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(maxStringLength, maxPathMatches, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - } else { - if(isActiveMaxSize()) { - return new SingleFullPathMaxSizeRemoveWhitespaceJsonFilter(maxSize, maxPathMatches, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - return new SingleFullPathRemoveWhitespaceJsonFilter(maxPathMatches, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - } - } else if(isSingleAnonymizeFilter()) { - if(!AbstractPathJsonFilter.hasAnyPrefix(anonymizeFilters[0])) { - if(isActiveMaxStringLength()) { - if(!isActiveMaxSize()) { - return new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(maxStringLength, maxPathMatches, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - } else { - if(isActiveMaxSize()) { - return new SingleFullPathMaxSizeRemoveWhitespaceJsonFilter(maxSize, maxPathMatches, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - return new SingleFullPathRemoveWhitespaceJsonFilter(maxPathMatches, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - } - } - if(isActiveMaxSize()) { return new MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(maxStringLength, maxSize, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } return new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(maxStringLength, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } else { - if(isSinglePruneFilter()) { - if(!AbstractPathJsonFilter.hasAnyPrefix(pruneFilters[0])) { - if(isActiveMaxStringLength()) { - if(isActiveMaxSize()) { - return new SingleFullPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, maxPathMatches, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - return new SingleFullPathMaxStringLengthJsonFilter(maxStringLength, maxPathMatches, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } else { - if(isActiveMaxSize()) { - return new SingleFullPathMaxSizeJsonFilter(maxSize, maxPathMatches, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - return new SingleFullPathJsonFilter(maxPathMatches, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - } else { - if(isActiveMaxStringLength()) { - if(isActiveMaxSize()) { - return new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, maxPathMatches, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - return new SingleAnyPathMaxStringLengthJsonFilter(maxStringLength, maxPathMatches, pruneFilters[0], FilterType.PRUNE, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - } - } else if(isSingleAnonymizeFilter()) { - if(!AbstractPathJsonFilter.hasAnyPrefix(anonymizeFilters[0])) { - if(isActiveMaxStringLength()) { - if(isActiveMaxSize()) { - return new SingleFullPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, maxPathMatches, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - return new SingleFullPathMaxStringLengthJsonFilter(maxStringLength, maxPathMatches, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } else { - if(isActiveMaxSize()) { - return new SingleFullPathMaxSizeJsonFilter(maxSize, maxPathMatches, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - return new SingleFullPathJsonFilter(maxPathMatches, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - } else { - if(isActiveMaxStringLength()) { - if(isActiveMaxSize()) { - return new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, maxPathMatches, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - return new SingleAnyPathMaxStringLengthJsonFilter(maxStringLength, maxPathMatches, anonymizeFilters[0], FilterType.ANON, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - } - } - if(anonymizeFilters != null && AbstractPathJsonFilter.hasAllAnyPrefix(anonymizeFilters) && pruneFilters != null && AbstractPathJsonFilter.hasAllAnyPrefix(pruneFilters)) { if(isActiveMaxSize()) { return new AnyPathMaxSizeJsonFilter(maxSize, maxPathMatches, anonymizeFilters, pruneFilters); diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxSizeMaxStringLengthJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxSizeMaxStringLengthJsonFilter.java deleted file mode 100644 index 2f30925d..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxSizeMaxStringLengthJsonFilter.java +++ /dev/null @@ -1,549 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesSizeFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesSizeFilter; - -public class SingleAnyPathMaxSizeMaxStringLengthJsonFilter extends SingleAnyPathMaxStringLengthJsonFilter { - - public SingleAnyPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleAnyPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type) { - this(maxStringLength, maxSize, maxPathMatches, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - @Override - public CharArrayRangesFilter ranges(final char[] chars, int offset, int length) { - if(!mustConstrainMaxSize(length)) { - return super.ranges(chars, offset, length); - } - - int maxStringLength = this.maxStringLength + 2; // account for quotes - - CharArrayRangesSizeFilter filter = getCharArrayRangesBracketFilter(maxPathMatches, length); - - try { - return rangesAnyPathMaxSize(chars, offset, offset + length, offset + maxSize, maxStringLength, pathChars, filterType, maxPathMatches, filter); - } catch(Exception e) { - return null; - } - } - - @Override - public ByteArrayRangesFilter ranges(final byte[] chars, int offset, int length) { - if(!mustConstrainMaxSize(length)) { - return super.ranges(chars, offset, length); - } - - int maxStringLength = this.maxStringLength + 2; // account for quotes - - ByteArrayRangesSizeFilter filter = getByteArrayRangesBracketFilter(maxPathMatches, length); - - try { - return rangesAnyPathMaxSize(chars, offset, offset + length, offset + maxSize, maxStringLength, pathBytes, filterType, maxPathMatches, filter); - } catch(Exception e) { - return null; - } - } - - public static CharArrayRangesSizeFilter rangesAnyPathMaxSize(final char[] chars, int offset, int maxReadLimit, int maxSizeLimit, int maxStringLength, final char[] elementPaths, FilterType filterType, int pathMatches, CharArrayRangesSizeFilter filter) { - boolean[] squareBrackets = filter.getSquareBrackets(); - int bracketLevel = filter.getLevel(); - int mark = filter.getMark(); - - loop: - while(offset < maxSizeLimit) { - switch(chars[offset]) { - case '[' : - case '{' : - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = chars[offset] == '['; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - offset++; - mark = offset; - - continue; - case '}' : - case ']' : - bracketLevel--; - maxSizeLimit++; - - offset++; - mark = offset; - continue; - case ',' : - mark = offset; - break; - case '"' : - int nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteEndIndex = nextOffset; - - // is this a field name or a value? A field name must be followed by a colon - - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[++nextOffset] <= 0x20); - - if(chars[nextOffset] != ':') { - // was a text value - if(quoteEndIndex - offset >= maxStringLength) { - // text length too long - - if(offset + maxStringLength > maxSizeLimit) { - // done filtering - break loop; - } - int removedLength = filter.getRemovedLength(); - - filter.addMaxLength(chars, offset + maxStringLength - 1, quoteEndIndex, -(offset - 1 + maxStringLength - quoteEndIndex)); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(nextOffset <= maxSizeLimit) { - mark = nextOffset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - - if(maxSizeLimit + bracketLevel > maxReadLimit) { - maxSizeLimit = maxReadLimit - bracketLevel; - } - - if(maxSizeLimit >= maxReadLimit) { - // filtering only for full path and max string length, i.e. keep the rest of the document - filter.setLevel(0); - - return rangesAnyPathMaxStringLength(chars, nextOffset, maxReadLimit, maxStringLength, pathMatches, elementPaths, filterType, filter); - } - } - offset = nextOffset; - - continue; - } - - while(chars[++nextOffset] <= 0x20); - - // was a field name - if(elementPaths == STAR_CHARS || matchPath(chars, offset + 1, quoteEndIndex, elementPaths)) { - int removedLength = filter.getRemovedLength(); - - if(filterType == FilterType.PRUNE) { - // is there space within max size? - if(nextOffset + filter.getPruneMessageLength() > maxSizeLimit) { - break loop; - } - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - } - - filter.addPrune(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } else { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - // filter as tree - filter.setLevel(bracketLevel); - filter.setMark(mark); - - offset = filter.anonymizeSubtree(chars, nextOffset, maxSizeLimit); - - squareBrackets = filter.getSquareBrackets(); - mark = filter.getMark(); - bracketLevel = filter.getLevel(); - - // increment limit since we removed something - maxSizeLimit = filter.getMaxSizeLimit(); - } else { - if(nextOffset + filter.getAnonymizeMessageLength() > maxSizeLimit) { - break loop; - } - - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - filter.addAnon(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } - } - - if(maxSizeLimit + bracketLevel > maxReadLimit) { - maxSizeLimit = maxReadLimit - bracketLevel; - } - - if(offset >= maxSizeLimit) { - // filtering completed - break loop; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - if(maxSizeLimit >= maxReadLimit) { - // filter only for max string length - bracketLevel = 0; - - offset = MaxStringLengthJsonFilter.ranges(chars, offset, maxReadLimit, maxStringLength, filter); - - break loop; - } - - // filtering only for max size and max string length - filter.setMark(mark); - filter.setLevel(bracketLevel); - - offset = MaxStringLengthMaxSizeJsonFilter.rangesMaxSizeMaxStringLength(chars, offset, maxReadLimit, maxSizeLimit, maxStringLength, filter); - - maxSizeLimit = filter.getMaxSizeLimit(); - bracketLevel = filter.getLevel(); - mark = filter.getMark(); - - break loop; - } - } - - if(maxSizeLimit >= maxReadLimit) { - // filter only for path and max string length - filter.setLevel(0); - - return rangesAnyPathMaxStringLength(chars, offset, maxReadLimit, maxStringLength, pathMatches, elementPaths, filterType, filter); - } - } else { - offset = nextOffset; - } - - continue; - - default : - } - offset++; - } - - if(offset < maxReadLimit) { - // max size reached before end of document - filter.setLevel(bracketLevel); - filter.setMark(mark); - filter.setMaxSizeLimit(maxSizeLimit); - - if(mark < maxSizeLimit) { - int markLimit = MaxSizeJsonFilter.markToLimit(chars, offset, maxReadLimit, maxSizeLimit, mark); - if(markLimit != -1) { - // filter rest of document - filter.addDelete(markLimit, maxReadLimit); - - return filter; - } - } - filter.addDelete(mark, maxReadLimit); - } - - return filter; - } - - public static ByteArrayRangesSizeFilter rangesAnyPathMaxSize(final byte[] chars, int offset, int maxReadLimit, int maxSizeLimit, int maxStringLength, final byte[] elementPaths, FilterType filterType, int pathMatches, ByteArrayRangesSizeFilter filter) { - boolean[] squareBrackets = filter.getSquareBrackets(); - int bracketLevel = filter.getLevel(); - int mark = filter.getMark(); - - loop: - while(offset < maxSizeLimit) { - switch(chars[offset]) { - case '[' : - case '{' : - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = chars[offset] == '['; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - offset++; - mark = offset; - - continue; - case '}' : - case ']' : - bracketLevel--; - maxSizeLimit++; - - offset++; - mark = offset; - continue; - case ',' : - mark = offset; - break; - case '"' : - int nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteEndIndex = nextOffset; - - // is this a field name or a value? A field name must be followed by a colon - - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[++nextOffset] <= 0x20); - - if(chars[nextOffset] != ':') { - // was a text value - if(quoteEndIndex - offset >= maxStringLength) { - // text length too long - - if(offset + maxStringLength > maxSizeLimit) { - // done filtering - break loop; - } - int removedLength = filter.getRemovedLength(); - - filter.addMaxLength(chars, offset + maxStringLength - 1, quoteEndIndex, -(offset - 1 + maxStringLength - quoteEndIndex)); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(nextOffset <= maxSizeLimit) { - mark = nextOffset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - - if(maxSizeLimit + bracketLevel > maxReadLimit) { - maxSizeLimit = maxReadLimit - bracketLevel; - } - - if(maxSizeLimit >= maxReadLimit) { - // filtering only for full path and max string length, i.e. keep the rest of the document - filter.setLevel(0); - - return rangesAnyPathMaxStringLength(chars, nextOffset, maxReadLimit, maxStringLength, pathMatches, elementPaths, filterType, filter); - } - } - offset = nextOffset; - - continue; - } - - while(chars[++nextOffset] <= 0x20); - - // was a field name - if(elementPaths == STAR_BYTES || matchPath(chars, offset + 1, quoteEndIndex, elementPaths)) { - int removedLength = filter.getRemovedLength(); - - if(filterType == FilterType.PRUNE) { - // is there space within max size? - if(nextOffset + filter.getPruneMessageLength() > maxSizeLimit) { - break loop; - } - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - } - - filter.addPrune(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } else { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - // filter as tree - filter.setLevel(bracketLevel); - filter.setMark(mark); - - offset = filter.anonymizeSubtree(chars, nextOffset, maxSizeLimit); - - squareBrackets = filter.getSquareBrackets(); - mark = filter.getMark(); - bracketLevel = filter.getLevel(); - - // increment limit since we removed something - maxSizeLimit = filter.getMaxSizeLimit(); - } else { - if(nextOffset + filter.getAnonymizeMessageLength() > maxSizeLimit) { - break loop; - } - - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - filter.addAnon(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } - } - - if(maxSizeLimit + bracketLevel > maxReadLimit) { - maxSizeLimit = maxReadLimit - bracketLevel; - } - - if(offset >= maxSizeLimit) { - // filtering completed - break loop; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - if(maxSizeLimit >= maxReadLimit) { - // filter only for max string length - bracketLevel = 0; - offset = MaxStringLengthJsonFilter.ranges(chars, offset, maxReadLimit, maxStringLength, filter); - break loop; - } - - // filtering only for max size and max string length - filter.setMark(mark); - filter.setLevel(bracketLevel); - - offset = MaxStringLengthMaxSizeJsonFilter.rangesMaxSizeMaxStringLength(chars, offset, maxReadLimit, maxSizeLimit, maxStringLength, filter); - - maxSizeLimit = filter.getMaxSizeLimit(); - bracketLevel = filter.getLevel(); - mark = filter.getMark(); - - break loop; - } - } - - if(maxSizeLimit >= maxReadLimit) { - // filter only for path and max string length - filter.setLevel(0); - - return rangesAnyPathMaxStringLength(chars, offset, maxReadLimit, maxStringLength, pathMatches, elementPaths, filterType, filter); - } - } else { - offset = nextOffset; - } - - continue; - - default : - } - offset++; - } - - if(offset < maxReadLimit) { - // max size reached before end of document - filter.setLevel(bracketLevel); - filter.setMark(mark); - filter.setMaxSizeLimit(maxSizeLimit); - - if(mark < maxSizeLimit) { - int markLimit = MaxSizeJsonFilter.markToLimit(chars, offset, maxReadLimit, maxSizeLimit, mark); - if(markLimit != -1) { - // filter rest of document - filter.addDelete(markLimit, maxReadLimit); - - return filter; - } - } - filter.addDelete(mark, maxReadLimit); - } - - return filter; - } - - -} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxStringLengthJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxStringLengthJsonFilter.java deleted file mode 100644 index 62334598..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxStringLengthJsonFilter.java +++ /dev/null @@ -1,218 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; - -public class SingleAnyPathMaxStringLengthJsonFilter extends AbstractRangesSingleCharArrayAnyPathJsonFilter { - - public SingleAnyPathMaxStringLengthJsonFilter(int maxStringLength, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - this(maxStringLength, -1, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleAnyPathMaxStringLengthJsonFilter(int maxStringLength, int maxPathMatches, String expression, FilterType type) { - this(maxStringLength, maxPathMatches, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - protected SingleAnyPathMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, - String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - @Override - public CharArrayRangesFilter ranges(final char[] chars, int offset, int length) { - int pathMatches = this.maxPathMatches; - - int maxStringLength = this.maxStringLength + 2; // account for quotes - - final char[] path = this.pathChars; - - length += offset; - - final CharArrayRangesFilter filter = getCharArrayRangesFilter(pathMatches, length); - - try { - return rangesAnyPathMaxStringLength(chars, offset, length, maxStringLength, pathMatches, path, filterType, filter); - } catch(Exception e) { - return null; - } - } - - protected static T rangesAnyPathMaxStringLength(final char[] chars, int offset, int limit, int maxStringLength, - int pathMatches, final char[] path, FilterType filterType, final T filter) { - while(offset < limit) { - if(chars[offset] == '"') { - int nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteIndex = nextOffset; - - nextOffset++; - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[nextOffset] <= 0x20) { // expecting colon, comma, end array or end object - nextOffset++; - } - - if(chars[nextOffset] != ':') { - // was a text value - if(quoteIndex - offset >= maxStringLength) { - filter.addMaxLength(chars, offset + maxStringLength - 1, quoteIndex, -(offset - 1 + maxStringLength - quoteIndex)); - } - - offset = nextOffset; - continue; - } - } - - // skip whitespace - while(chars[++nextOffset] <= 0x20); - - if(path == STAR_CHARS || matchPath(chars, offset + 1, quoteIndex, path)) { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - } else { - offset = CharArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset); - } else { - filter.addAnon(nextOffset, offset); - } - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - // speed up filtering by looking only at max string length - offset = MaxStringLengthJsonFilter.ranges(chars, offset, limit, maxStringLength, filter); - break ; - } - } - } else { - offset = nextOffset; - - continue; - } - } - offset++; - } - - return filter; - } - - @Override - public ByteArrayRangesFilter ranges(final byte[] chars, int offset, int length) { - int pathMatches = this.maxPathMatches; - - int maxStringLength = this.maxStringLength + 2; // account for quotes - - final byte[] path = this.pathBytes; - - length += offset; - - final ByteArrayRangesFilter filter = getByteArrayRangesFilter(pathMatches); - - try { - return rangesAnyPathMaxStringLength(chars, offset, length, maxStringLength, pathMatches, path, filterType, filter); - } catch(Exception e) { - return null; - } - - } - - protected static T rangesAnyPathMaxStringLength(final byte[] chars, int offset, int limit, int maxStringLength, - int pathMatches, final byte[] path, FilterType filterType, final T filter) { - while(offset < limit) { - if(chars[offset] == '"') { - int nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteIndex = nextOffset; - - nextOffset++; - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[nextOffset] <= 0x20) { // expecting colon, comma, end array or end object - nextOffset++; - } - - if(chars[nextOffset] != ':') { - // was a text value - if(quoteIndex - offset >= maxStringLength) { - filter.addMaxLength(chars, offset + maxStringLength - 1, quoteIndex, -(offset - 1 + maxStringLength - quoteIndex)); - } - - offset = nextOffset; - continue; - } - } - - // skip whitespace - while(chars[++nextOffset] <= 0x20); - - if(path == STAR_BYTES || matchPath(chars, offset + 1, quoteIndex, path)) { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - } else { - offset = ByteArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset); - } else { - filter.addAnon(nextOffset, offset); - } - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - // speed up filtering by looking only at max string length - offset = MaxStringLengthJsonFilter.ranges(chars, offset, limit, maxStringLength, filter); - break; - } - } - } else { - offset = nextOffset; - - continue; - } - } - offset++; - } - - return filter; - } - -} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathJsonFilter.java deleted file mode 100644 index 59ed01db..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathJsonFilter.java +++ /dev/null @@ -1,296 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesSizeFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesSizeFilter; - -public class SingleFullPathJsonFilter extends AbstractRangesSingleCharArrayFullPathJsonFilter { - - protected SingleFullPathJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - - if(type != FilterType.ANON && type != FilterType.PRUNE) { - throw new IllegalArgumentException(); - } - } - - public SingleFullPathJsonFilter(int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - this(-1, -1, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleFullPathJsonFilter(int maxPathMatches, String expression, FilterType type) { - this(maxPathMatches, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - @Override - public CharArrayRangesFilter ranges(final char[] chars, int offset, int length) { - final CharArrayRangesFilter filter = getCharArrayRangesFilter(maxPathMatches, length); - int limit = offset + length; - try { - offset = rangesFullPath(chars, offset, limit, 0, pathChars, 0, filterType, maxPathMatches, filter); - - return filter; - } catch(Exception e) { - return null; - } - } - - @Override - public ByteArrayRangesFilter ranges(final byte[] chars, int offset, int length) { - final ByteArrayRangesFilter filter = getByteArrayRangesFilter(maxPathMatches, length); - int limit = offset + length; - try { - offset = rangesFullPath(chars, offset, limit, 0, pathBytes, 0, filterType, maxPathMatches, filter); - - return filter; - } catch(Exception e) { - return null; - } - } - - protected static int rangesFullPath(final char[] chars, int offset, int limit, int level, final char[][] elementPaths, int matches, final FilterType filterType, int pathMatches, final CharArrayRangesFilter filter) { - - while(offset < limit) { - switch(chars[offset]) { - case '{' : - level++; - - break; - case '}' : - level--; - - break; - case '"' : - int nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteIndex = nextOffset; - - nextOffset++; - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[nextOffset] <= 0x20) { // expecting colon, comma, end array or end object - nextOffset++; - } - - if(chars[nextOffset] != ':') { - // was a text value - offset = nextOffset; - - continue; - } - } - - // was field name - // skip whitespace after colon - while(chars[++nextOffset] <= 0x20); - - if(elementPaths[level] != STAR_CHARS && !matchPath(chars, offset + 1, quoteIndex, elementPaths[level])) { - // skip here - if(chars[nextOffset] == '[') { - offset = CharArrayRangesFilter.skipArray(chars, nextOffset); - } else if(chars[nextOffset] == '{') { - offset = CharArrayRangesFilter.skipObject(chars, nextOffset); - } else if(chars[nextOffset] == '"') { - offset = CharArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - // matched - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - } else { - offset = CharArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset); - } else { - filter.addAnon(nextOffset, offset); - } - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - return limit; // done filtering - } - } - } else { - offset = nextOffset; - } - continue; - - default : - } - offset++; - } - - if(level != 0) { - throw new IllegalStateException(); - } - - return offset; - } - - protected static int rangesFullPath(final byte[] chars, int offset, int limit, int level, final byte[][] elementPaths, int matches, FilterType filterType, int pathMatches, final ByteArrayRangesFilter filter) { - while(offset < limit) { - switch(chars[offset]) { - case '{' : - level++; - - break; - case '}' : - level--; - - break; - case '"' : - int nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteIndex = nextOffset; - - nextOffset++; - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[nextOffset] <= 0x20) { // expecting colon, comma, end array or end object - nextOffset++; - } - - if(chars[nextOffset] != ':') { - // was a text value - offset = nextOffset; - - continue; - } - } - - // was field name - while(chars[++nextOffset] <= 0x20); - - if(elementPaths[level] != STAR_BYTES && !matchPath(chars, offset + 1, quoteIndex, elementPaths[level])) { - // skip here - if(chars[nextOffset] == '[') { - offset = ByteArrayRangesFilter.skipArray(chars, nextOffset); - } else if(chars[nextOffset] == '{') { - offset = ByteArrayRangesFilter.skipObject(chars, nextOffset); - } else if(chars[nextOffset] == '"') { - offset = ByteArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - // matched - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - } else { - offset = ByteArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset); - } else { - filter.addAnon(nextOffset, offset); - } - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - return limit; // done filtering - } - } - } else { - offset = nextOffset; - } - - continue; - - default : - } - offset++; - } - - if(level != 0) { - throw new IllegalStateException(); - } - - return offset; - } - - protected char[] getPruneJsonValue() { - return pruneJsonValue; - } - - protected char[] getAnonymizeJsonValue() { - return anonymizeJsonValue; - } - - protected char[] getTruncateStringValue() { - return truncateStringValue; - } - - protected CharArrayRangesFilter getCharArrayRangesFilter(int length) { - return getCharArrayRangesFilter(-1, length); - } - - protected CharArrayRangesFilter getCharArrayRangesFilter(int capacity, int length) { - return new CharArrayRangesFilter(capacity, length, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - - protected CharArrayRangesSizeFilter getCharArrayRangesBracketFilter(int capacity, int length) { - return new CharArrayRangesSizeFilter(capacity, length, pruneJsonValue, anonymizeJsonValue, truncateStringValue); - } - - protected ByteArrayRangesSizeFilter getByteArrayRangesBracketFilter(int capacity, int length) { - return new ByteArrayRangesSizeFilter(capacity, length, pruneJsonValueAsBytes, anonymizeJsonValueAsBytes, truncateStringValueAsBytes); - } - - protected ByteArrayRangesFilter getByteArrayRangesFilter(int length) { - return getByteArrayRangesFilter(-1, length); - } - - protected ByteArrayRangesFilter getByteArrayRangesFilter(int capacity, int length) { - return new ByteArrayRangesFilter(capacity, length, pruneJsonValueAsBytes, anonymizeJsonValueAsBytes, truncateStringValueAsBytes); - } - - -} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeJsonFilter.java deleted file mode 100644 index 8be17ce4..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeJsonFilter.java +++ /dev/null @@ -1,604 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesSizeFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesSizeFilter; - -public class SingleFullPathMaxSizeJsonFilter extends SingleFullPathJsonFilter { - - public SingleFullPathMaxSizeJsonFilter(int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - this(-1, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleFullPathMaxSizeJsonFilter(int maxSize, int maxPathMatches, String expression, FilterType type) { - this(maxSize, maxPathMatches, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - protected SingleFullPathMaxSizeJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - @Override - public CharArrayRangesFilter ranges(final char[] chars, int offset, int length) { - if(!mustConstrainMaxSize(length)) { - return super.ranges(chars, offset, length); - } - - CharArrayRangesSizeFilter filter = getCharArrayRangesBracketFilter(-1, length); - - try { - return rangesFullPathMaxSize(chars, offset, offset + length, offset + maxSize, 0, pathChars, 0, filterType, maxPathMatches, filter); - } catch(Exception e) { - return null; - } - } - - @Override - public ByteArrayRangesFilter ranges(final byte[] chars, int offset, int length) { - if(!mustConstrainMaxSize(length)) { - return super.ranges(chars, offset, length); - } - - ByteArrayRangesSizeFilter filter = getByteArrayRangesBracketFilter(-1, length); - - try { - return rangesFullPathMaxSize(chars, offset, offset + length, offset + maxSize, 0, pathBytes, 0, filterType, maxPathMatches, filter); - } catch(Exception e) { - return null; - } - } - - public static CharArrayRangesSizeFilter rangesFullPathMaxSize(final char[] chars, int offset, int maxReadLimit, int maxSizeLimit, int level, final char[][] elementPaths, int matches, FilterType filterType, int pathMatches, CharArrayRangesSizeFilter filter) { - boolean[] squareBrackets = filter.getSquareBrackets(); - int bracketLevel = filter.getLevel(); - int mark = filter.getMark(); - - loop: - while(offset < maxSizeLimit) { - switch(chars[offset]) { - case '{' : - // check corner case - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - offset++; - - squareBrackets[bracketLevel] = false; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - mark = offset; - level++; - - continue; - case '}' : - level--; - bracketLevel--; - maxSizeLimit++; - - offset++; - mark = offset; - - continue; - case '[' : { - // check corner case - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = true; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - offset++; - mark = offset; - - continue; - } - case ']' : - bracketLevel--; - maxSizeLimit++; - - offset++; - mark = offset; - - continue; - case ',' : - mark = offset; - break; - case '"' : - int nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteEndIndex = nextOffset; - - // is this a field name or a value? A field name must be followed by a colon - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[++nextOffset] <= 0x20); - - if(chars[nextOffset] != ':') { - // was a text value - offset = nextOffset; - continue; - } - - // was field name - // skip whitespace - while(chars[++nextOffset] <= 0x20); - - if(nextOffset >= maxSizeLimit) { - break loop; - } - - if(elementPaths[level] != STAR_CHARS && !matchPath(chars, offset + 1, quoteEndIndex, elementPaths[level])) { - // skip here - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - maxSizeLimit--; - if(nextOffset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = chars[nextOffset] == '['; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - // so always level < elementPaths.length - filter.setLevel(bracketLevel); - filter.setMark(nextOffset + 1); - - offset = filter.skipObjectOrArrayMaxSize(chars, nextOffset + 1, maxSizeLimit); - - squareBrackets = filter.getSquareBrackets(); - mark = filter.getMark(); - bracketLevel = filter.getLevel(); - maxSizeLimit = filter.getMaxSizeLimit(); - } else { - offset = nextOffset; - } - continue; - } - - if(level + 1 == elementPaths.length) { - if(nextOffset >= maxSizeLimit) { - break loop; - } - - int removedLength = filter.getRemovedLength(); - - if(filterType == FilterType.PRUNE) { - // is there space within max size? - if(nextOffset + filter.getPruneMessageLength() > maxSizeLimit) { - break loop; - } - - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - } - - filter.addPrune(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } else { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - // filter as tree - filter.setLevel(bracketLevel); - filter.setMark(mark); - - offset = filter.anonymizeSubtree(chars, nextOffset, maxSizeLimit); - - squareBrackets = filter.getSquareBrackets(); - mark = filter.getMark(); - bracketLevel = filter.getLevel(); - - // increment limit since we removed something - maxSizeLimit = filter.getMaxSizeLimit(); - } else { - if(nextOffset + filter.getAnonymizeMessageLength() > maxSizeLimit) { - offset = maxSizeLimit; - break loop; - } - - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - filter.addAnon(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } - } - - if(maxSizeLimit + level > maxReadLimit) { - maxSizeLimit = maxReadLimit - level; - } - - if(offset >= maxSizeLimit) { - // filtering completed - break loop; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - if(maxSizeLimit >= maxReadLimit) { - // filtering finished, i.e. keep the rest of the document - filter.setLevel(0); - return filter; - } - - // filtering only for max size - filter.setMark(mark); - filter.setLevel(bracketLevel); - - return AnyPathMaxSizeJsonFilter.rangesMaxSize(chars, offset, maxReadLimit, maxSizeLimit, filter); - } - } - - if(maxSizeLimit >= maxReadLimit) { - // filtering only for full path, i.e. keep the rest of the document - filter.setLevel(0); - rangesFullPath(chars, offset, maxReadLimit, level, elementPaths, matches, filterType, pathMatches, filter); - - return filter; - } - } else { - offset = nextOffset; - } - - continue; - - default : - } - offset++; - } - - if(offset < maxReadLimit){ - // max size reached before end of document - filter.setLevel(bracketLevel); - filter.setMark(mark); - filter.setMaxSizeLimit(maxSizeLimit); - - if(mark < maxSizeLimit) { - int markLimit = MaxSizeJsonFilter.markToLimit(chars, offset, maxReadLimit, maxSizeLimit, mark); - if(markLimit != -1) { - // filter rest of document - filter.addDelete(markLimit, maxReadLimit); - - return filter; - } - } - filter.addDelete(mark, maxReadLimit); - - } - - return filter; - } - - public static ByteArrayRangesSizeFilter rangesFullPathMaxSize(final byte[] chars, int offset, int maxReadLimit, int maxSizeLimit, int level, final byte[][] elementPaths, int matches, FilterType filterType, int pathMatches, ByteArrayRangesSizeFilter filter) { - boolean[] squareBrackets = filter.getSquareBrackets(); - int bracketLevel = filter.getLevel(); - int mark = filter.getMark(); - - loop: - while(offset < maxSizeLimit) { - switch(chars[offset]) { - case '{' : - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = false; - bracketLevel++; - - offset++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - mark = offset; - - level++; - continue; - case '}' : - maxSizeLimit++; - level--; - bracketLevel--; - - offset++; - mark = offset; - - // always skips start object if not on a matching level, so must always constrain here - continue; - case '[' : { - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = true; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - offset++; - mark = offset; - - continue; - } - case ']' : - maxSizeLimit++; - bracketLevel--; - - offset++; - mark = offset; - - continue; - case ',' : - mark = offset; - break; - case '"' : - int nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteEndIndex = nextOffset; - - // is this a field name or a value? A field name must be followed by a colon - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[++nextOffset] <= 0x20); - - if(chars[nextOffset] != ':') { - // was a text value - offset = nextOffset; - continue; - } - - // skip whitespace - while(chars[++nextOffset] <= 0x20); - - if(nextOffset >= maxSizeLimit) { - break loop; - } - - if(elementPaths[level] != STAR_BYTES && !matchPath(chars, offset + 1, quoteEndIndex, elementPaths[level])) { - // skip here - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - maxSizeLimit--; - if(nextOffset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = chars[nextOffset] == '['; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - // so always level < elementPaths.length - filter.setLevel(bracketLevel); - filter.setMark(nextOffset + 1); - - offset = filter.skipObjectOrArrayMaxSize(chars, nextOffset + 1, maxSizeLimit); - - squareBrackets = filter.getSquareBrackets(); - mark = filter.getMark(); - bracketLevel = filter.getLevel(); - maxSizeLimit = filter.getMaxSizeLimit(); - } else { - offset = nextOffset; - } - continue; - } - - if(level + 1 == elementPaths.length) { - if(nextOffset >= maxSizeLimit) { - break loop; - } - - int removedLength = filter.getRemovedLength(); - - if(filterType == FilterType.PRUNE) { - - // is there space within max size? - if(nextOffset + filter.getPruneMessageLength() > maxSizeLimit) { - break loop; - } - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - } - - filter.addPrune(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } else { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - // filter as tree - filter.setLevel(bracketLevel); - filter.setMark(mark); - - offset = filter.anonymizeSubtree(chars, nextOffset, maxSizeLimit); - - squareBrackets = filter.getSquareBrackets(); - mark = filter.getMark(); - bracketLevel = filter.getLevel(); - maxSizeLimit = filter.getMaxSizeLimit(); - } else { - if(nextOffset + filter.getAnonymizeMessageLength() > maxSizeLimit) { - offset = maxSizeLimit; - break loop; - } - - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - filter.addAnon(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } - } - - if(maxSizeLimit + level > maxReadLimit) { - maxSizeLimit = maxReadLimit - level; - } - - if(offset >= maxSizeLimit) { - // filtering completed - break loop; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - if(maxSizeLimit >= maxReadLimit) { - // filtering finished, i.e. keep the rest of the document - filter.setLevel(0); - return filter; - } - - // filtering only for max size - filter.setMark(mark); - filter.setLevel(bracketLevel); - - return AnyPathMaxSizeJsonFilter.rangesMaxSize(chars, offset, maxReadLimit, maxSizeLimit, filter); - } - } - - if(maxSizeLimit >= maxReadLimit) { - // filtering only for full path, i.e. keep the rest of the document - filter.setLevel(0); - - rangesFullPath(chars, offset, maxReadLimit, level, elementPaths, matches, filterType, pathMatches, filter); - - return filter; - } - } else { - offset = nextOffset; - } - - continue; - - default : - } - offset++; - } - - if(offset < maxReadLimit){ - // max size reached before end of document - filter.setLevel(bracketLevel); - filter.setMark(mark); - filter.setMaxSizeLimit(maxSizeLimit); - - if(mark < maxSizeLimit) { - int markLimit = MaxSizeJsonFilter.markToLimit(chars, offset, maxReadLimit, maxSizeLimit, mark); - if(markLimit != -1) { - // filter rest of document - filter.addDelete(markLimit, maxReadLimit); - - return filter; - } - } - filter.addDelete(mark, maxReadLimit); - } - - return filter; - } - -} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeMaxStringLengthJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeMaxStringLengthJsonFilter.java deleted file mode 100644 index 82e5019c..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeMaxStringLengthJsonFilter.java +++ /dev/null @@ -1,716 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesSizeFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesSizeFilter; - -public class SingleFullPathMaxSizeMaxStringLengthJsonFilter extends SingleFullPathMaxStringLengthJsonFilter { - - public SingleFullPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleFullPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type) { - this(maxStringLength, maxSize, maxPathMatches, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - @Override - public CharArrayRangesFilter ranges(final char[] chars, int offset, int length) { - if(!mustConstrainMaxSize(length)) { - return super.ranges(chars, offset, length); - } - - FilterType filterType = this.filterType; - - int maxStringLength = this.maxStringLength + 2; // account for quotes - - int pathMatches = this.maxPathMatches; - - final char[][] elementPaths = this.pathChars; - - final CharArrayRangesSizeFilter filter = getCharArrayRangesBracketFilter(pathMatches, length); - - int maxReadLimit = offset + length; // i.e. max limit - - int maxSizeLimit = offset + maxSize; - - int level = 0; - - int mark = 0; - - boolean[] squareBrackets = filter.getSquareBrackets(); - int bracketLevel = 0; - try { - loop: - while(offset < maxSizeLimit) { - switch(chars[offset]) { - case '{' : - // check corner case - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - offset++; - - squareBrackets[bracketLevel] = false; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - mark = offset; - level++; - - continue; - case '}' : - level--; - bracketLevel--; - maxSizeLimit++; - - offset++; - mark = offset; - - continue; - case '[' : { - // check corner case - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = true; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - offset++; - mark = offset; - - continue; - } - case ']' : - bracketLevel--; - maxSizeLimit++; - - offset++; - mark = offset; - - continue; - case ',' : - mark = offset; - break; - case '"' : - int nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteEndIndex = nextOffset; - - // is this a field name or a value? A field name must be followed by a colon - - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // skip colon + whitespace - while(chars[++nextOffset] <= 0x20); - - if(chars[nextOffset] != ':') { - // was a text value - if(quoteEndIndex - offset >= maxStringLength) { - // text length too long - - if(offset + maxStringLength > maxSizeLimit) { - // done filtering - break loop; - } - int removedLength = filter.getRemovedLength(); - - filter.addMaxLength(chars, offset + maxStringLength - 1, quoteEndIndex, -(offset - 1 + maxStringLength - quoteEndIndex)); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(nextOffset <= maxSizeLimit) { - mark = nextOffset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - - if(maxSizeLimit >= maxReadLimit) { - // filtering only for full path and max string length, i.e. keep the rest of the document - filter.setLevel(0); - - SingleFullPathMaxStringLengthJsonFilter.rangesFullPathMaxStringLength(chars, nextOffset, maxReadLimit, pathMatches, maxStringLength, level, elementPaths, 0, filterType, filter); - - return filter; - } - } - offset = nextOffset; - - continue; - } - - // skip colon + whitespace - while(chars[++nextOffset] <= 0x20); - - if(nextOffset >= maxSizeLimit) { - break loop; - } - - if(elementPaths[level] != STAR_CHARS && !matchPath(chars, offset + 1, quoteEndIndex, elementPaths[level])) { - // skip here - - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - maxSizeLimit--; - if(nextOffset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = chars[nextOffset] == '['; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - nextOffset++; - - // so always level < elementPaths.length - filter.setLevel(bracketLevel); - filter.setMark(nextOffset); - - offset = filter.skipObjectOrArrayMaxSizeMaxStringLength(chars, nextOffset, maxSizeLimit, maxReadLimit, maxStringLength); - - squareBrackets = filter.getSquareBrackets(); - mark = filter.getMark(); - bracketLevel = filter.getLevel(); - maxSizeLimit = filter.getMaxSizeLimit(); - } else if(chars[nextOffset] == '"') { - offset = nextOffset; - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - int removedLength = filter.getRemovedLength(); - - if(filterType == FilterType.PRUNE) { - // is there space within max size? - if(nextOffset + filter.getPruneMessageLength() > maxSizeLimit) { - break loop; - } - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - } - - filter.addPrune(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } else { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - // filter as tree - filter.setLevel(bracketLevel); - filter.setMark(mark); - - offset = filter.anonymizeSubtree(chars, nextOffset, maxSizeLimit); - - squareBrackets = filter.getSquareBrackets(); - mark = filter.getMark(); - bracketLevel = filter.getLevel(); - - // increment limit since we removed something - maxSizeLimit = filter.getMaxSizeLimit(); - } else { - if(nextOffset + filter.getAnonymizeMessageLength() > maxSizeLimit) { - break loop; - } - - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - filter.addAnon(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } - } - - if(maxSizeLimit + level > maxReadLimit) { - maxSizeLimit = maxReadLimit - level; - } - - if(offset >= maxSizeLimit) { - // filtering completed - break loop; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - if(maxSizeLimit >= maxReadLimit) { - // filter only of max string length - bracketLevel = 0; - - offset = MaxStringLengthJsonFilter.ranges(chars, offset, maxReadLimit, maxStringLength, filter); - - break loop; - } - - // filtering only for max size and max string size - filter.setLevel(bracketLevel); - filter.setMark(mark); - - offset = MaxStringLengthMaxSizeJsonFilter.rangesMaxSizeMaxStringLength(chars, offset, maxReadLimit, maxSizeLimit, maxStringLength, filter); - - bracketLevel = filter.getLevel(); - mark = filter.getMark(); - - break loop; - } - } - - if(maxSizeLimit >= maxReadLimit) { - // filtering only for full path, i.e. keep the rest of the document - bracketLevel = 0; - filter.setLevel(0); - rangesFullPathMaxStringLength(chars, offset, maxReadLimit, pathMatches, maxStringLength, level, elementPaths, 0, filterType, filter); - - return filter; - } - } else { - offset = nextOffset; - } - - continue; - - default : - } - offset++; - } - - if(offset < maxReadLimit) { - // max size reached before end of document - filter.setLevel(bracketLevel); - filter.setMark(mark); - filter.setMaxSizeLimit(maxSizeLimit); - - if(mark < maxSizeLimit) { - int markLimit = MaxSizeJsonFilter.markToLimit(chars, offset, maxReadLimit, maxSizeLimit, mark); - if(markLimit != -1) { - // filter rest of document - filter.addDelete(markLimit, maxReadLimit); - - return filter; - } - } - filter.addDelete(mark, maxReadLimit); - - } - - return filter; - } catch(Exception e) { - return null; - } - } - - @Override - public ByteArrayRangesFilter ranges(final byte[] chars, int offset, int length) { - if(!mustConstrainMaxSize(length)) { - return super.ranges(chars, offset, length); - } - - FilterType filterType = this.filterType; - - int maxStringLength = this.maxStringLength + 2; // account for quotes - - int pathMatches = this.maxPathMatches; - - int matches = 0; - - final byte[][] elementPaths = this.pathBytes; - - final ByteArrayRangesSizeFilter filter = getByteArrayRangesBracketFilter(pathMatches, length); - - int maxReadLimit = offset + length; // i.e. max limit - - int maxSizeLimit = offset + maxSize; - - int level = 0; - - int mark = 0; - - boolean[] squareBrackets = filter.getSquareBrackets(); - int bracketLevel = 0; - try { - loop: - while(offset < maxSizeLimit) { - switch(chars[offset]) { - case '{' : - - // check corner case - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - offset++; - - squareBrackets[bracketLevel] = false; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - mark = offset; - level++; - - continue; - case '}' : - level--; - bracketLevel--; - maxSizeLimit++; - - offset++; - mark = offset; - - continue; - case '[' : { - // check corner case - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = true; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - offset++; - mark = offset; - - continue; - } - case ']' : - bracketLevel--; - maxSizeLimit++; - - offset++; - mark = offset; - - continue; - case ',' : - mark = offset; - break; - case '"' : - int nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteEndIndex = nextOffset; - - // is this a field name or a value? A field name must be followed by a colon - - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - // skip colon + whitespace - while(chars[++nextOffset] <= 0x20); - - if(chars[nextOffset] != ':') { - // was a text value - if(quoteEndIndex - offset >= maxStringLength) { - // text length too long - - if(offset + maxStringLength > maxSizeLimit) { - // done filtering - break loop; - } - - int removedLength = filter.getRemovedLength(); - - filter.addMaxLength(chars, offset + maxStringLength - 1, quoteEndIndex, -(offset - 1 + maxStringLength - quoteEndIndex)); - - maxSizeLimit += filter.getRemovedLength() - removedLength; - - // increment limit since we removed something - if(nextOffset <= maxSizeLimit) { - mark = nextOffset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - - if(maxSizeLimit >= maxReadLimit) { - // filtering only for full path and max string length, i.e. keep the rest of the document - filter.setLevel(0); - - SingleFullPathMaxStringLengthJsonFilter.rangesFullPathMaxStringLength(chars, nextOffset, maxReadLimit, pathMatches, maxStringLength, level, elementPaths, matches, filterType, filter); - - return filter; - } - } - offset = nextOffset; - - continue; - } - - // skip colon + whitespace - while(chars[++nextOffset] <= 0x20); - - if(nextOffset >= maxSizeLimit) { - break loop; - } - - if(elementPaths[level] != STAR_BYTES && !matchPath(chars, offset + 1, quoteEndIndex, elementPaths[level])) { - // skip here - - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - maxSizeLimit--; - if(nextOffset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = chars[nextOffset] == '['; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - nextOffset++; - - // so always level < elementPaths.length - filter.setLevel(bracketLevel); - filter.setMark(nextOffset); - - offset = filter.skipObjectOrArrayMaxSizeMaxStringLength(chars, nextOffset, maxSizeLimit, maxReadLimit, maxStringLength); - - squareBrackets = filter.getSquareBrackets(); - mark = filter.getMark(); - bracketLevel = filter.getLevel(); - maxSizeLimit = filter.getMaxSizeLimit(); - } else if(chars[nextOffset] == '"') { - offset = nextOffset; - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - - int removedLength = filter.getRemovedLength(); - - while(chars[nextOffset] <= 0x20) { // expecting colon, comma, end array or end object - nextOffset++; - } - - if(filterType == FilterType.PRUNE) { - // is there space within max size? - if(nextOffset + filter.getPruneMessageLength() > maxSizeLimit) { - break loop; - } - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - } - - filter.addPrune(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } else { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - // filter as tree - filter.setLevel(bracketLevel); - filter.setMark(mark); - - offset = filter.anonymizeSubtree(chars, nextOffset, maxSizeLimit); - - squareBrackets = filter.getSquareBrackets(); - mark = filter.getMark(); - bracketLevel = filter.getLevel(); - - // increment limit since we removed something - maxSizeLimit = filter.getMaxSizeLimit(); - } else { - if(nextOffset + filter.getAnonymizeMessageLength() > maxSizeLimit) { - break loop; - } - - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, offset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - filter.addAnon(nextOffset, offset); - - // increment limit since we removed something - maxSizeLimit += filter.getRemovedLength() - removedLength; - - if(offset <= maxSizeLimit) { - mark = offset; - } else { - filter.removeLastFilter(); - filter.setLevel(bracketLevel); - filter.addDelete(mark, maxReadLimit); - return filter; - } - } - } - - if(maxSizeLimit + level > maxReadLimit) { - maxSizeLimit = maxReadLimit - level; - } - - if(offset >= maxSizeLimit) { - // filtering completed - break loop; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - if(maxSizeLimit >= maxReadLimit) { - // filter only of max string length - bracketLevel = 0; - offset = MaxStringLengthJsonFilter.ranges(chars, offset, maxReadLimit, maxStringLength, filter); - break loop; - } - - // filtering only for max size and max string size - filter.setLevel(bracketLevel); - filter.setMark(mark); - - offset = MaxStringLengthMaxSizeJsonFilter.rangesMaxSizeMaxStringLength(chars, offset, maxReadLimit, maxSizeLimit, maxStringLength, filter); - - bracketLevel = filter.getLevel(); - mark = filter.getMark(); - - break loop; - } - } - - if(maxSizeLimit >= maxReadLimit) { - // filtering only for full path, i.e. keep the rest of the document - filter.setLevel(0); - bracketLevel = 0; - - rangesFullPathMaxStringLength(chars, offset, maxReadLimit, pathMatches, maxStringLength, level, elementPaths, matches, filterType, filter); - - return filter; - } - } else { - offset = nextOffset; - } - - continue; - - default : - } - offset++; - } - - if(offset < maxReadLimit) { - // max size reached before end of document - filter.setLevel(bracketLevel); - filter.setMark(mark); - filter.setMaxSizeLimit(maxSizeLimit); - - if(mark < maxSizeLimit) { - int markLimit = MaxSizeJsonFilter.markToLimit(chars, offset, maxReadLimit, maxSizeLimit, mark); - if(markLimit != -1) { - // filter rest of document - filter.addDelete(markLimit, maxReadLimit); - - return filter; - } - } - filter.addDelete(mark, maxReadLimit); - - } - - return filter; - } catch(Exception e) { - return null; - } - } - -} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxStringLengthJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxStringLengthJsonFilter.java deleted file mode 100644 index a627c48c..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxStringLengthJsonFilter.java +++ /dev/null @@ -1,314 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; - -public class SingleFullPathMaxStringLengthJsonFilter extends AbstractRangesSingleCharArrayFullPathJsonFilter { - - public SingleFullPathMaxStringLengthJsonFilter(int maxStringLength, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, -1, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleFullPathMaxStringLengthJsonFilter(int maxStringLength, int maxPathMatches, String expression, FilterType type) { - this(maxStringLength, maxPathMatches, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - protected SingleFullPathMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - @Override - public CharArrayRangesFilter ranges(final char[] chars, int offset, int length) { - int pathMatches = this.maxPathMatches; - - int maxStringLength = this.maxStringLength + 2; // account for quotes - - int matches = 0; - - final char[][] elementPaths = this.pathChars; - - int level = 0; - - final CharArrayRangesFilter filter = getCharArrayRangesFilter(pathMatches, length); - - int limit = length + offset; - - try { - rangesFullPathMaxStringLength(chars, offset, limit, pathMatches, maxStringLength, level, elementPaths, matches, filterType, filter); - - return filter; - } catch(Exception e) { - return null; - } - } - - public static int rangesFullPathMaxStringLength(final char[] chars, int offset, int limit, int pathMatches, int maxStringLength, int level, final char[][] elementPaths, int matches, FilterType filterType, final CharArrayRangesFilter filter) { - loop: - while(offset < limit) { - switch(chars[offset]) { - case '{' : - level++; - - break; - case '}' : - level--; - - break; - case '"' : - int nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteIndex = nextOffset; - - nextOffset++; - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[nextOffset] <= 0x20) { // expecting colon, comma, end array or end object - nextOffset++; - } - - if(chars[nextOffset] != ':') { - // was a text value - if(quoteIndex - offset >= maxStringLength) { - filter.addMaxLength(chars, offset + maxStringLength - 1, quoteIndex, -(offset - 1 + maxStringLength - quoteIndex)); - } - - offset = nextOffset; - continue; - } - } - - // was field name - // skip colon + whitespace - while(chars[++nextOffset] <= 0x20); - - if(elementPaths[level] != STAR_CHARS && !matchPath(chars, offset + 1, quoteIndex, elementPaths[level])) { - // skip here - if(chars[nextOffset] == '[') { - offset = CharArrayRangesFilter.skipArrayMaxStringLength(chars, nextOffset + 1, maxStringLength, filter); - } else if(chars[nextOffset] == '{') { - offset = CharArrayRangesFilter.skipObjectMaxStringLength(chars, nextOffset + 1, maxStringLength, filter); - } else if(chars[nextOffset] == '"') { - offset = nextOffset; - do { - if(chars[nextOffset] == '\\') { - nextOffset++; - } - nextOffset++; - } while(chars[nextOffset] != '"'); - - quoteIndex = nextOffset; - - if(quoteIndex - offset >= maxStringLength) { - filter.addMaxLength(chars, offset + maxStringLength - 1, quoteIndex, -(offset - 1 + maxStringLength - quoteIndex)); - } - - offset = nextOffset + 1; - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - } else { - offset = CharArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset); - } else { - filter.addAnon(nextOffset, offset); - } - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - // speed up filtering by looking only at max string length - level = 0; - - offset = MaxStringLengthJsonFilter.ranges(chars, offset, limit, maxStringLength, filter); - - break loop; - } - } - } else { - offset = nextOffset; - } - - continue; - - default : - } - offset++; - } - - if(level != 0) { - throw new IllegalStateException("Level " + level); - } - - return offset; - } - - @Override - public ByteArrayRangesFilter ranges(final byte[] chars, int offset, int length) { - int pathMatches = this.maxPathMatches; - - int maxStringLength = this.maxStringLength + 2; // account for quotes - - int matches = 0; - - final byte[][] elementPaths = this.pathBytes; - - int level = 0; - - final ByteArrayRangesFilter filter = getByteArrayRangesFilter(pathMatches); - - int limit = length + offset; - try { - rangesFullPathMaxStringLength(chars, offset, limit, pathMatches, maxStringLength, level, elementPaths, matches, filterType, filter); - - return filter; - } catch(Exception e) { - return null; - } - } - - public static int rangesFullPathMaxStringLength(final byte[] chars, int offset, int limit, int pathMatches, int maxStringLength, int level, final byte[][] elementPaths, int matches, FilterType filterType, final ByteArrayRangesFilter filter) { - loop: - while(offset < limit) { - switch(chars[offset]) { - case '{' : - level++; - - break; - case '}' : - level--; - - break; - case '"' : - int nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - int quoteIndex = nextOffset; - - nextOffset++; - - // is this a field name or a value? A field name must be followed by a colon - if(chars[nextOffset] != ':') { - // skip over whitespace - - // optimization: scan for highest value - // space: 0x20 - // tab: 0x09 - // carriage return: 0x0D - // newline: 0x0A - - while(chars[nextOffset] <= 0x20) { // expecting colon, comma, end array or end object - nextOffset++; - } - - if(chars[nextOffset] != ':') { - // was a text value - if(quoteIndex - offset >= maxStringLength) { - filter.addMaxLength(chars, offset + maxStringLength - 1, quoteIndex, -(offset - 1 + maxStringLength - quoteIndex)); - } - - offset = nextOffset; - continue; - } - } - // was field name - // skip colon + whitespace - while(chars[++nextOffset] <= 0x20); - - if(elementPaths[level] != STAR_BYTES && !matchPath(chars, offset + 1, quoteIndex, elementPaths[level])) { - // skip here - if(chars[nextOffset] == '[') { - offset = ByteArrayRangesFilter.skipArrayMaxStringLength(chars, nextOffset + 1, maxStringLength, filter); - } else if(chars[nextOffset] == '{') { - offset = ByteArrayRangesFilter.skipObjectMaxStringLength(chars, nextOffset + 1, maxStringLength, filter); - } else if(chars[nextOffset] == '"') { - offset = nextOffset; - - nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - quoteIndex = nextOffset; - - if(quoteIndex - offset >= maxStringLength) { - filter.addMaxLength(chars, offset + maxStringLength - 1, quoteIndex, -(offset - 1 + maxStringLength - quoteIndex)); - } - - offset = nextOffset + 1; - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset)); - } else { - offset = ByteArrayRangesFilter.anonymizeObjectOrArray(chars, nextOffset, filter); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - if(filterType == FilterType.PRUNE) { - filter.addPrune(nextOffset, offset); - } else { - filter.addAnon(nextOffset, offset); - } - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - // speed up filtering by looking only at max string length - level = 0; - offset = MaxStringLengthJsonFilter.ranges(chars, offset, limit, maxStringLength, filter); - break loop; - } - } - } else { - offset = nextOffset; - } - - continue; - - default : - } - offset++; - } - - if(level != 0) { - throw new IllegalStateException(); - } - - return offset; - } - -} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxSizeRemoveWhitespaceJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxSizeRemoveWhitespaceJsonFilter.java deleted file mode 100644 index f91df1bf..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxSizeRemoveWhitespaceJsonFilter.java +++ /dev/null @@ -1,795 +0,0 @@ -/*************************************************************************** - * Copyright 2022 Thomas Rorvik Skjolberg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.github.skjolber.jsonfilter.core.ws; - -import java.io.IOException; - -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.core.MaxSizeJsonFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayWhitespaceFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayWhitespaceSizeFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayWhitespaceFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayWhitespaceSizeFilter; - -public class SingleFullPathMaxSizeRemoveWhitespaceJsonFilter extends SingleFullPathRemoveWhitespaceJsonFilter { - - protected SingleFullPathMaxSizeRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleFullPathMaxSizeRemoveWhitespaceJsonFilter(int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - this(-1, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleFullPathMaxSizeRemoveWhitespaceJsonFilter(int maxSize, int maxPathMatches, String expression, FilterType type) { - this(maxSize, maxPathMatches, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - public boolean process(final char[] chars, int offset, int length, final StringBuilder buffer, JsonFilterMetrics metrics) { - if(!mustConstrainMaxSize(length)) { - return super.process(chars, offset, length, buffer, metrics); - } - - int bufferLength = buffer.length(); - - int maxSizeLimit = offset + maxSize; - try { - int maxReadLimit = CharArrayWhitespaceFilter.skipWhitespaceFromEnd(chars, length + offset); - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - - CharArrayWhitespaceSizeFilter filter = new CharArrayWhitespaceSizeFilter(pruneJsonValue, anonymizeJsonValue, truncateStringValue); - - filter.setMaxSizeLimit(maxSizeLimit); - - processMaxSize(chars, offset, maxReadLimit, 0, buffer, this.pathChars, filterType, maxPathMatches, filter, metrics); - - if(metrics != null) { - metrics.onInput(length); - int written = buffer.length() - bufferLength; - int totalSize = length; - if(written < totalSize) { - metrics.onMaxSize(totalSize - totalSize); - } - metrics.onOutput(buffer.length() - bufferLength); - } - return true; - } catch(Exception e) { - return false; - } - } - - protected void processMaxSize(final char[] chars, int offset, int maxReadLimit, int level, final StringBuilder buffer, final char[][] elementPaths, FilterType filterType, int pathMatches, CharArrayWhitespaceSizeFilter filter, JsonFilterMetrics metrics) { - int maxSizeLimit = filter.getMaxSizeLimit(); - - int flushOffset = filter.getFlushOffset(); - int mark = filter.getMark(); - int streamMark = filter.getWrittenMark(); - int bracketLevel = filter.getLevel(); - - boolean[] squareBrackets = filter.getSquareBrackets(); - - loop: - while(offset < maxSizeLimit) { - char c = chars[offset]; - - if(c <= 0x20) { - if(flushOffset <= mark) { - streamMark = buffer.length() + mark - flushOffset; - } - // skip this char and any other whitespace - buffer.append(chars, flushOffset, offset - flushOffset); - do { - offset++; - maxSizeLimit++; - } while(chars[offset] <= 0x20); - - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - - flushOffset = offset; - c = chars[offset]; - } - switch(c) { - case '{' : - // check corner case - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - offset++; - - squareBrackets[bracketLevel] = false; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - mark = offset; - level++; - - continue; - case '}' : - level--; - bracketLevel--; - maxSizeLimit++; - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - - offset++; - mark = offset; - - continue; - case '[' : { - // check corner case - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = true; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - offset++; - mark = offset; - - continue; - } - case ']' : - bracketLevel--; - maxSizeLimit++; - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - - offset++; - mark = offset; - - continue; - case ',' : - mark = offset; - break; - case '"' : - int nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - int endQuoteIndex = nextOffset; - - if(flushOffset <= mark) { - streamMark = buffer.length() + mark - flushOffset; - } - buffer.append(chars, flushOffset, endQuoteIndex - flushOffset + 1); - - nextOffset++; - colon: - if(chars[nextOffset] != ':') { - - if(chars[nextOffset] <= 0x20) { - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - maxSizeLimit += nextOffset - endQuoteIndex - 1; - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - - if(chars[nextOffset] == ':') { - break colon; - } - } - // was a value - flushOffset = nextOffset; - offset = nextOffset; - - continue; - } - - buffer.append(':'); - - nextOffset++; - - flushOffset = nextOffset; - - boolean match = elementPaths[level] == STAR_CHARS || matchPath(chars, offset + 1, endQuoteIndex, elementPaths[level]); - - if(chars[nextOffset] <= 0x20) { - offset = nextOffset; - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - maxSizeLimit += nextOffset - offset; - - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - } - - if(!match) { - // skip here - if(chars[nextOffset] == '{' || chars[nextOffset] == '[') { - maxSizeLimit--; - if(nextOffset >= maxSizeLimit) { - offset = nextOffset; - break loop; - } - - squareBrackets[bracketLevel] = chars[nextOffset] == '[' ; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - filter.setLevel(bracketLevel); - filter.setMark(nextOffset + 1); - - filter.setMaxSizeLimit(maxSizeLimit); - filter.setFlushOffset(nextOffset); - filter.setWrittenMark(streamMark); - - offset = filter.skipObjectOrArrayMaxSize(chars, nextOffset + 1, maxReadLimit, buffer); - - bracketLevel = filter.getLevel(); - mark = filter.getMark(); - - flushOffset = filter.getFlushOffset(); - streamMark = filter.getWrittenMark(); - - squareBrackets = filter.getSquareBrackets(); - maxSizeLimit = filter.getMaxSizeLimit(); - } else if(chars[nextOffset] == '"') { - - flushOffset = nextOffset; - - nextOffset = CharArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - - offset = nextOffset; - } else { - flushOffset = nextOffset; - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - if(filterType == FilterType.PRUNE) { - if(nextOffset + filter.getPruneMessageLength() > maxSizeLimit) { - offset = nextOffset; - break loop; - } - - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - } - - buffer.append(filter.getPruneMessage()); - if(metrics != null) { - metrics.onPrune(1); - } - - // adjust max size limit - maxSizeLimit += offset - nextOffset - filter.getPruneMessageLength(); - - mark = offset; - flushOffset = offset; - } else { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - maxSizeLimit--; - if(nextOffset >= maxSizeLimit) { - offset = nextOffset; - - break loop; - } - - squareBrackets[bracketLevel] = chars[nextOffset] == '[' ; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - filter.setMaxSizeLimit(maxSizeLimit); - filter.setFlushOffset(nextOffset); - filter.setLevel(bracketLevel); - filter.setMark(nextOffset + 1); - filter.setWrittenMark(streamMark); - - offset = filter.anonymizeObjectOrArrayMaxSize(chars, nextOffset + 1, maxReadLimit, buffer, metrics); - - flushOffset = filter.getFlushOffset(); - bracketLevel = filter.getLevel(); - mark = filter.getMark(); - streamMark = filter.getWrittenMark(); - squareBrackets = filter.getSquareBrackets(); - maxSizeLimit = filter.getMaxSizeLimit(); - } else { - if(nextOffset + filter.getAnonymizeMessageLength() > maxSizeLimit) { - offset = nextOffset; - - break loop; - } - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - buffer.append(filter.getAnonymizeMessage()); - - if(metrics != null) { - metrics.onAnonymize(1); - } - - maxSizeLimit += offset - nextOffset - filter.getAnonymizeMessageLength(); - - mark = offset; - flushOffset = offset; - } - } - - if(maxSizeLimit + level > maxReadLimit) { - maxSizeLimit = maxReadLimit - level; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - // just remove whitespace - - MaxSizeRemoveWhitespaceJsonFilter.process(chars, offset, flushOffset, buffer, maxReadLimit, maxSizeLimit, bracketLevel, squareBrackets, mark, streamMark); - - return; - } - } - } else { - flushOffset = nextOffset; - offset = nextOffset; - } - - continue; - } - offset++; - } - - if(bracketLevel > 0) { - markLimit: - if(mark <= maxSizeLimit) { - int markLimit = MaxSizeJsonFilter.markToLimit(chars, offset, maxReadLimit, maxSizeLimit, mark); - if(markLimit != -1 && markLimit <= maxSizeLimit) { - if(markLimit >= flushOffset) { - buffer.append(chars, flushOffset, markLimit - flushOffset); - } - break markLimit; - } else { - if(mark >= flushOffset) { - streamMark = buffer.length() + mark - flushOffset; - - buffer.append(chars, flushOffset, mark - flushOffset); - } - } - - buffer.setLength(streamMark); - } - MaxSizeJsonFilter.closeStructure(bracketLevel, squareBrackets, buffer); - } else { - buffer.append(chars, flushOffset, offset - flushOffset); - } - } - - public boolean process(final byte[] chars, int offset, int length, final ResizableByteArrayOutputStream output, JsonFilterMetrics metrics) { - if(!mustConstrainMaxSize(length)) { - return super.process(chars, offset, length, output, metrics); - } - - int bufferLength = output.size(); - - int maxSizeLimit = offset + maxSize; - - try { - int maxReadLimit = ByteArrayWhitespaceFilter.skipWhitespaceFromEnd(chars, length + offset); - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - - ByteArrayWhitespaceSizeFilter filter = new ByteArrayWhitespaceSizeFilter(pruneJsonValueAsBytes, anonymizeJsonValueAsBytes, truncateStringValueAsBytes); - - filter.setLimit(maxSizeLimit); - - processMaxSize(chars, offset, maxReadLimit, 0, output, this.pathBytes, 0, filterType, maxPathMatches, filter, metrics); - - if(metrics != null) { - metrics.onInput(length); - int written = output.size() - bufferLength; - int totalSize = length; - if(written < totalSize) { - metrics.onMaxSize(totalSize - totalSize); - } - metrics.onOutput(output.size() - bufferLength); - } - - return true; - } catch(Exception e) { - return false; - } - } - - protected void processMaxSize(final byte[] chars, int offset, int maxReadLimit, int level, final ResizableByteArrayOutputStream stream, final byte[][] elementPaths, int matches, FilterType filterType, int pathMatches, ByteArrayWhitespaceSizeFilter filter, JsonFilterMetrics metrics) throws IOException { - int maxSizeLimit = filter.getLimit(); - - int flushOffset = filter.getFlushOffset(); - int mark = filter.getMark(); - int streamMark = filter.getWrittenMark(); - int bracketLevel = filter.getLevel(); - - boolean[] squareBrackets = filter.getSquareBrackets(); - - loop: - while(offset < maxSizeLimit) { - byte c = chars[offset]; - - if(c <= 0x20) { - if(flushOffset <= mark) { - streamMark = stream.size() + mark - flushOffset; - } - // skip this char and any other whitespace - stream.write(chars, flushOffset, offset - flushOffset); - do { - offset++; - maxSizeLimit++; - } while(chars[offset] <= 0x20); - - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - - flushOffset = offset; - c = chars[offset]; - } - switch(c) { - case '{' : - // check corner case - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - offset++; - - squareBrackets[bracketLevel] = false; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - mark = offset; - level++; - - continue; - case '}' : - level--; - bracketLevel--; - maxSizeLimit++; - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - - offset++; - mark = offset; - - continue; - case '[' : { - // check corner case - maxSizeLimit--; - if(offset >= maxSizeLimit) { - break loop; - } - - squareBrackets[bracketLevel] = true; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - offset++; - mark = offset; - - continue; - } - case ']' : - bracketLevel--; - maxSizeLimit++; - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - - offset++; - mark = offset; - - continue; - case ',' : - mark = offset; - break; - case '"' : - - int nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - int endQuoteIndex = nextOffset; - - if(flushOffset <= mark) { - streamMark = stream.size() + mark - flushOffset; - } - stream.write(chars, flushOffset, endQuoteIndex - flushOffset + 1); - - nextOffset++; - - colon: - if(chars[nextOffset] != ':') { - - if(chars[nextOffset] <= 0x20) { - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - maxSizeLimit += nextOffset - endQuoteIndex - 1; - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - - if(chars[nextOffset] == ':') { - break colon; - } - } - // was a value - flushOffset = nextOffset; - offset = nextOffset; - - continue; - } - - stream.write(':'); - - nextOffset++; - - flushOffset = nextOffset; - - boolean match = elementPaths[level] == STAR_BYTES || matchPath(chars, offset + 1, endQuoteIndex, elementPaths[level]); - - if(chars[nextOffset] <= 0x20) { - offset = nextOffset; - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - maxSizeLimit += nextOffset - offset; - if(maxSizeLimit >= maxReadLimit) { - maxSizeLimit = maxReadLimit; - } - } - - if(!match) { - // skip here - if(chars[nextOffset] == '{' || chars[nextOffset] == '[') { - maxSizeLimit--; - if(nextOffset >= maxSizeLimit) { - offset = nextOffset; - - break loop; - } - - squareBrackets[bracketLevel] = chars[nextOffset] == '[' ; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - filter.setLevel(bracketLevel); - filter.setMark(nextOffset + 1); - - filter.setLimit(maxSizeLimit); - filter.setFlushOffset(nextOffset); - filter.setWrittenMark(streamMark); - - offset = filter.skipObjectOrArrayMaxSize(chars, nextOffset + 1, maxReadLimit, stream); - - bracketLevel = filter.getLevel(); - mark = filter.getMark(); - - flushOffset = filter.getFlushOffset(); - streamMark = filter.getWrittenMark(); - squareBrackets = filter.getSquareBrackets(); - maxSizeLimit = filter.getLimit(); - - } else if(chars[nextOffset] == '"') { - flushOffset = nextOffset; - - nextOffset = ByteArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - - offset = nextOffset; - } else { - flushOffset = nextOffset; - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - continue; - } - - if(level + 1 == elementPaths.length) { - if(filterType == FilterType.PRUNE) { - if(nextOffset + filter.getPruneMessageLength() > maxSizeLimit) { - offset = nextOffset; - - break loop; - } - - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - } - - stream.write(filter.getPruneMessage()); - if(metrics != null) { - metrics.onPrune(1); - } - - // adjust max size limit - maxSizeLimit += offset - nextOffset - filter.getPruneMessageLength(); - - mark = offset; - flushOffset = offset; - - } else { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - maxSizeLimit--; - if(nextOffset >= maxSizeLimit) { - offset = nextOffset; - - break loop; - } - - squareBrackets[bracketLevel] = chars[nextOffset] == '[' ; - bracketLevel++; - - if(bracketLevel >= squareBrackets.length) { - squareBrackets = filter.grow(squareBrackets); - } - - filter.setLimit(maxSizeLimit); - filter.setFlushOffset(nextOffset); - filter.setLevel(bracketLevel); - filter.setMark(nextOffset + 1); - filter.setWrittenMark(streamMark); - - offset = filter.anonymizeObjectOrArrayMaxSize(chars, nextOffset + 1, maxReadLimit, stream, metrics); - - flushOffset = filter.getFlushOffset(); - bracketLevel = filter.getLevel(); - mark = filter.getMark(); - streamMark = filter.getWrittenMark(); - squareBrackets = filter.getSquareBrackets(); - maxSizeLimit = filter.getLimit(); - } else { - if(nextOffset + filter.getAnonymizeMessageLength() > maxSizeLimit) { - offset = nextOffset; - - break loop; - } - - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - stream.write(filter.getAnonymizeMessage()); - - - if(metrics != null) { - metrics.onAnonymize(1); - } - - maxSizeLimit += offset - nextOffset - filter.getAnonymizeMessageLength(); - - mark = offset; - flushOffset = offset; - - } - } - - if(maxSizeLimit + level > maxReadLimit) { - maxSizeLimit = maxReadLimit - level; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - // just remove whitespace - MaxSizeRemoveWhitespaceJsonFilter.process(chars, offset, flushOffset, stream, maxSizeLimit, maxReadLimit, bracketLevel, squareBrackets, mark, streamMark); - - return; - } - } - } else { - flushOffset = nextOffset; - offset = nextOffset; - } - - continue; - } - offset++; - - } - - if(bracketLevel > 0) { - markLimit: - if(mark <= maxSizeLimit) { - int markLimit = MaxSizeJsonFilter.markToLimit(chars, offset, maxReadLimit, maxSizeLimit, mark); - if(markLimit != -1 && markLimit <= maxSizeLimit) { - if(markLimit >= flushOffset) { - stream.write(chars, flushOffset, markLimit - flushOffset); - } - break markLimit; - } else { - if(mark >= flushOffset) { - streamMark = stream.size() + mark - flushOffset; - - stream.write(chars, flushOffset, mark - flushOffset); - } - } - stream.setSize(streamMark); - } - MaxSizeJsonFilter.closeStructure(bracketLevel, squareBrackets, stream); - } else { - stream.write(chars, flushOffset, offset - flushOffset); - } - } - - @Override - public boolean isRemovingWhitespace() { - return true; - } - -} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter.java deleted file mode 100644 index f10be8a4..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter.java +++ /dev/null @@ -1,459 +0,0 @@ -/*************************************************************************** - * Copyright 2022 Thomas Rorvik Skjolberg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.github.skjolber.jsonfilter.core.ws; - -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractSingleCharArrayFullPathJsonFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayWhitespaceFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayWhitespaceFilter; - -public class SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter extends AbstractSingleCharArrayFullPathJsonFilter { - - protected SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - - if(type != FilterType.ANON && type != FilterType.PRUNE) { - throw new IllegalArgumentException(); - } - } - - public SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(int maxStringLength, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - this(maxStringLength, -1, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(int maxStringLength, int maxPathMatches, String expression, FilterType type) { - this(maxStringLength, maxPathMatches, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - @Override - public boolean process(char[] chars, int offset, int length, StringBuilder output) { - return process(chars, offset, length, output, null); - } - - @Override - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output) { - return process(chars, offset, length, output, null); - } - - public boolean process(final char[] chars, int offset, int length, final StringBuilder buffer, JsonFilterMetrics metrics) { - CharArrayWhitespaceFilter filter = new CharArrayWhitespaceFilter(pruneJsonValue, anonymizeJsonValue, truncateStringValue); - - int maxStringLength = this.maxStringLength; - - int bufferLength = buffer.length(); - - int level = 0; - final char[][] elementPaths = this.pathChars; - FilterType filterType = this.filterType; - int pathMatches = this.maxPathMatches; - - try { - int maxReadLimit = CharArrayWhitespaceFilter.skipWhitespaceFromEnd(chars, length + offset); - - int flushOffset = offset; - - while(offset < maxReadLimit) { - char c = chars[offset]; - if(c <= 0x20) { - // skip this char and any other whitespace - buffer.append(chars, flushOffset, offset - flushOffset); - do { - offset++; - } while(chars[offset] <= 0x20); - - flushOffset = offset; - c = chars[offset]; - } - - switch(c) { - case '{' : - level++; - break; - case '}' : - level--; - - break; - case '"' : - int nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - int endQuoteIndex = nextOffset; - - // key or value, might be whitespace - nextOffset++; - - colon: - if(chars[nextOffset] != ':') { - - if(chars[nextOffset] <= 0x20) { - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - if(chars[nextOffset] == ':') { - break colon; - } - } - // was a value - - if(endQuoteIndex - offset >= maxStringLength) { - CharArrayWhitespaceFilter.addMaxLength(chars, offset, buffer, flushOffset, endQuoteIndex, filter.getTruncateMessage(), maxStringLength, metrics); - } else { - buffer.append(chars, flushOffset, endQuoteIndex - flushOffset + 1); - } - - offset = nextOffset; - flushOffset = nextOffset; - - continue; - } - - buffer.append(chars, flushOffset, endQuoteIndex - flushOffset + 1); - buffer.append(':'); - - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - if(elementPaths[level] != STAR_CHARS && !matchPath(chars, offset + 1, endQuoteIndex, elementPaths[level])) { - // skip here - if(chars[nextOffset] == '{') { - filter.setFlushOffset(nextOffset); - - offset = filter.skipObjectMaxStringLength(chars, nextOffset + 1, maxStringLength, buffer, metrics); - - flushOffset = filter.getFlushOffset(); - } else if(chars[nextOffset] == '[') { - filter.setFlushOffset(nextOffset); - - offset = filter.skipArrayMaxStringLength(chars, nextOffset + 1, maxStringLength, buffer, metrics); - - flushOffset = filter.getFlushOffset(); - } else if(chars[nextOffset] == '"') { - - flushOffset = offset = nextOffset; - - nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - endQuoteIndex = nextOffset; - - if(endQuoteIndex - offset >= maxStringLength) { - CharArrayWhitespaceFilter.addMaxLength(chars, offset, buffer, flushOffset, endQuoteIndex, filter.getTruncateMessage(), maxStringLength, metrics); - } else { - buffer.append(chars, flushOffset, endQuoteIndex - flushOffset + 1); - } - - nextOffset++; - - offset = nextOffset; - flushOffset = nextOffset; - } else { - flushOffset = nextOffset; - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - // skip both whitespace and actual content - offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - - buffer.append(filter.getPruneMessage()); - if(metrics != null) { - metrics.onPrune(1); - } - - flushOffset = offset; - } else { - filter.setFlushOffset(nextOffset); - - offset = filter.anonymizeObjectOrArray(chars, nextOffset + 1, maxReadLimit, buffer, metrics); - - flushOffset = filter.getFlushOffset(); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - if(filterType == FilterType.PRUNE) { - buffer.append(filter.getPruneMessage()); - if(metrics != null) { - metrics.onPrune(1); - } - - } else { - buffer.append(filter.getAnonymizeMessage()); - if(metrics != null) { - metrics.onAnonymize(1); - } - } - - flushOffset = offset; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - // remove whitespace + max string length - MaxStringLengthRemoveWhitespaceJsonFilter.processMaxStringLength(chars, offset, maxReadLimit, flushOffset, buffer, metrics, maxStringLength, filter.getTruncateMessage()); - - if(metrics != null) { - metrics.onInput(length); - metrics.onOutput(buffer.length() - bufferLength); - } - - return true; - } - } - } else { - flushOffset = nextOffset; - offset = nextOffset; - } - - continue; - } - offset++; - } - buffer.append(chars, flushOffset, offset - flushOffset); - - if(metrics != null) { - metrics.onInput(length); - metrics.onOutput(buffer.length() - bufferLength); - } - - return true; - } catch(Exception e) { - return false; - } - } - - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output, JsonFilterMetrics metrics) { - ByteArrayWhitespaceFilter filter = new ByteArrayWhitespaceFilter(pruneJsonValueAsBytes, anonymizeJsonValueAsBytes, truncateStringValueAsBytes); - - int maxStringLength = this.maxStringLength; - - int bufferLength = output.size(); - - int level = 0; - final byte[][] elementPaths = this.pathBytes; - - byte[] digit = new byte[11]; - - FilterType filterType = this.filterType; - int pathMatches = this.maxPathMatches; - - try { - int maxReadLimit = ByteArrayWhitespaceFilter.skipWhitespaceFromEnd(chars, length + offset); - - int flushOffset = offset; - - while(offset < maxReadLimit) { - byte c = chars[offset]; - if(c <= 0x20) { - // skip this char and any other whitespace - output.write(chars, flushOffset, offset - flushOffset); - do { - offset++; - } while(chars[offset] <= 0x20); - - flushOffset = offset; - c = chars[offset]; - } - - switch(c) { - case '{' : - level++; - break; - case '}' : - level--; - - break; - case '"' : - int nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - int endQuoteIndex = nextOffset; - - // key or value, might be whitespace - nextOffset++; - - colon: - if(chars[nextOffset] != ':') { - - if(chars[nextOffset] <= 0x20) { - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - if(chars[nextOffset] == ':') { - break colon; - } - } - - // was a value - if(endQuoteIndex - offset >= maxStringLength) { - ByteArrayWhitespaceFilter.addMaxLength(chars, offset, output, flushOffset, endQuoteIndex, filter.getTruncateMessage(), maxStringLength, digit, metrics); - } else { - output.write(chars, flushOffset, endQuoteIndex - flushOffset + 1); - } - - offset = nextOffset; - flushOffset = nextOffset; - - continue; - } - - output.write(chars, flushOffset, endQuoteIndex - flushOffset + 1); - output.write(':'); - - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - if(elementPaths[level] != STAR_BYTES && !matchPath(chars, offset + 1, endQuoteIndex, elementPaths[level])) { - // skip here - if(chars[nextOffset] == '{') { - filter.setFlushOffset(nextOffset); - - offset = filter.skipObjectMaxStringLength(chars, nextOffset + 1, maxStringLength, output, metrics); - - flushOffset = filter.getFlushOffset(); - } else if(chars[nextOffset] == '[') { - filter.setFlushOffset(nextOffset); - - offset = filter.skipArrayMaxStringLength(chars, nextOffset + 1, maxStringLength, output, metrics); - - flushOffset = filter.getFlushOffset(); - } else if(chars[nextOffset] == '"') { - flushOffset = offset = nextOffset; - - nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - endQuoteIndex = nextOffset; - - if(endQuoteIndex - offset >= maxStringLength) { - ByteArrayWhitespaceFilter.addMaxLength(chars, offset, output, flushOffset, endQuoteIndex, filter.getTruncateMessage(), maxStringLength, digit, metrics); - } else { - output.write(chars, flushOffset, endQuoteIndex - flushOffset + 1); - } - - nextOffset++; - - offset = nextOffset; - flushOffset = nextOffset; - } else { - flushOffset = nextOffset; - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - // skip both whitespace and actual content - offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - - output.write(filter.getPruneMessage()); - if(metrics != null) { - metrics.onPrune(1); - } - - flushOffset = offset; - } else { - filter.setFlushOffset(nextOffset); - - offset = filter.anonymizeObjectOrArray(chars, nextOffset + 1, maxReadLimit, output, metrics); - - flushOffset = filter.getFlushOffset(); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - if(filterType == FilterType.PRUNE) { - output.write(filter.getPruneMessage()); - - if(metrics != null) { - metrics.onPrune(1); - } - - } else { - output.write(filter.getAnonymizeMessage()); - - if(metrics != null) { - metrics.onAnonymize(1); - } - - } - - flushOffset = offset; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - // remove whitespace + max string length - MaxStringLengthRemoveWhitespaceJsonFilter.processMaxStringLength(chars, offset, maxReadLimit, flushOffset, output, filter.getDigit(), metrics, maxStringLength, filter.getTruncateMessage()); - - if(metrics != null) { - metrics.onInput(length); - metrics.onOutput(output.size() - bufferLength); - } - - return true; - } - } - } else { - flushOffset = nextOffset; - offset = nextOffset; - } - - continue; - } - offset++; - } - output.write(chars, flushOffset, offset - flushOffset); - - if(metrics != null) { - metrics.onInput(length); - metrics.onOutput(output.size() - bufferLength); - } - - return true; - } catch(Exception e) { - return false; - } - } - - @Override - public boolean isRemovingWhitespace() { - return true; - } - -} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathRemoveWhitespaceJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathRemoveWhitespaceJsonFilter.java deleted file mode 100644 index 1490cec4..00000000 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathRemoveWhitespaceJsonFilter.java +++ /dev/null @@ -1,441 +0,0 @@ -/*************************************************************************** - * Copyright 2022 Thomas Rorvik Skjolberg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.github.skjolber.jsonfilter.core.ws; - -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractSingleCharArrayFullPathJsonFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.ByteArrayWhitespaceFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -import com.github.skjolber.jsonfilter.core.util.CharArrayWhitespaceFilter; - -public class SingleFullPathRemoveWhitespaceJsonFilter extends AbstractSingleCharArrayFullPathJsonFilter { - - protected SingleFullPathRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - - if(type != FilterType.ANON && type != FilterType.PRUNE) { - throw new IllegalArgumentException(); - } - } - - public SingleFullPathRemoveWhitespaceJsonFilter(int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - this(-1, -1, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public SingleFullPathRemoveWhitespaceJsonFilter(int maxPathMatches, String expression, FilterType type) { - this(maxPathMatches, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - @Override - public boolean process(char[] chars, int offset, int length, StringBuilder output) { - return process(chars, offset, length, output, null); - } - - @Override - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output) { - return process(chars, offset, length, output, null); - } - - public boolean process(final char[] chars, int offset, int length, final StringBuilder buffer, JsonFilterMetrics metrics) { - CharArrayWhitespaceFilter filter = new CharArrayWhitespaceFilter(pruneJsonValue, anonymizeJsonValue, truncateStringValue); - - int bufferLength = buffer.length(); - int maxStringLength = this.maxStringLength; - - int level = 0; - final char[][] elementPaths = this.pathChars; - FilterType filterType = this.filterType; - int pathMatches = this.maxPathMatches; - - try { - int maxReadLimit = CharArrayWhitespaceFilter.skipWhitespaceFromEnd(chars, length + offset); - - int flushOffset = offset; - - while(offset < maxReadLimit) { - char c = chars[offset]; - if(c <= 0x20) { - // skip this char and any other whitespace - buffer.append(chars, flushOffset, offset - flushOffset); - do { - offset++; - } while(chars[offset] <= 0x20); - - flushOffset = offset; - c = chars[offset]; - } - - switch(c) { - case '{' : - level++; - break; - case '}' : - level--; - - break; - case '"' : - int nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, offset); - - int endQuoteIndex = nextOffset; - - // key or value, might be whitespace - nextOffset++; - - buffer.append(chars, flushOffset, nextOffset - flushOffset); - - colon: - if(chars[nextOffset] != ':') { - - if(chars[nextOffset] <= 0x20) { - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - if(chars[nextOffset] == ':') { - break colon; - } - } - - // was a value - offset = nextOffset; - flushOffset = nextOffset; - - continue; - } - - // was a field name - - buffer.append(':'); - - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - if(elementPaths[level] != STAR_CHARS && !matchPath(chars, offset + 1, endQuoteIndex, elementPaths[level])) { - // skip here - if(chars[nextOffset] == '{') { - filter.setFlushOffset(nextOffset); - - offset = filter.skipObjectMaxStringLength(chars, nextOffset + 1, maxStringLength, buffer, metrics); - - flushOffset = filter.getFlushOffset(); - } else if(chars[nextOffset] == '[') { - filter.setFlushOffset(nextOffset); - - offset = filter.skipArrayMaxStringLength(chars, nextOffset + 1, maxStringLength, buffer, metrics); - - flushOffset = filter.getFlushOffset(); - } else if(chars[nextOffset] == '"') { - - flushOffset = offset = nextOffset; - - nextOffset = CharArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - endQuoteIndex = nextOffset; - - buffer.append(chars, flushOffset, endQuoteIndex - flushOffset + 1); - - nextOffset++; - - offset = nextOffset; - flushOffset = nextOffset; - } else { - flushOffset = nextOffset; - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - // skip both whitespace and actual content - offset = CharArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - - buffer.append(filter.getPruneMessage()); - if(metrics != null) { - metrics.onPrune(1); - } - - flushOffset = offset; - } else { - filter.setFlushOffset(nextOffset); - - offset = filter.anonymizeObjectOrArray(chars, nextOffset + 1, maxReadLimit, buffer, metrics); - - flushOffset = filter.getFlushOffset(); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = CharArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = CharArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - if(filterType == FilterType.PRUNE) { - buffer.append(filter.getPruneMessage()); - if(metrics != null) { - metrics.onPrune(1); - } - - } else { - buffer.append(filter.getAnonymizeMessage()); - if(metrics != null) { - metrics.onAnonymize(1); - } - } - - flushOffset = offset; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - buffer.append(chars, flushOffset, offset - flushOffset); - - CharArrayWhitespaceFilter.process(chars, offset, maxReadLimit, buffer); - - if(metrics != null) { - metrics.onInput(length); - metrics.onOutput(buffer.length() - bufferLength); - } - - return true; - } - } - } else { - flushOffset = nextOffset; - offset = nextOffset; - } - - continue; - } - offset++; - } - buffer.append(chars, flushOffset, offset - flushOffset); - - if(metrics != null) { - metrics.onInput(length); - metrics.onOutput(buffer.length() - bufferLength); - } - - return true; - } catch(Exception e) { - return false; - } - } - - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output, JsonFilterMetrics metrics) { - ByteArrayWhitespaceFilter filter = new ByteArrayWhitespaceFilter(pruneJsonValueAsBytes, anonymizeJsonValueAsBytes, truncateStringValueAsBytes); - - int bufferLength = output.size(); - int maxStringLength = this.maxStringLength; - - int level = 0; - final byte[][] elementPaths = this.pathBytes; - - FilterType filterType = this.filterType; - int pathMatches = this.maxPathMatches; - - try { - int maxReadLimit = ByteArrayWhitespaceFilter.skipWhitespaceFromEnd(chars, length + offset); - - int flushOffset = offset; - - while(offset < maxReadLimit) { - byte c = chars[offset]; - if(c <= 0x20) { - // skip this char and any other whitespace - output.write(chars, flushOffset, offset - flushOffset); - do { - offset++; - } while(chars[offset] <= 0x20); - - flushOffset = offset; - c = chars[offset]; - } - - switch(c) { - case '{' : - level++; - break; - case '}' : - level--; - - break; - case '"' : - int nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, offset); - - int endQuoteIndex = nextOffset; - - // key or value, might be whitespace - nextOffset++; - - output.write(chars, flushOffset, nextOffset - flushOffset); - - colon: - if(chars[nextOffset] != ':') { - - if(chars[nextOffset] <= 0x20) { - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - if(chars[nextOffset] == ':') { - break colon; - } - } - - // was a value - offset = nextOffset; - flushOffset = nextOffset; - - continue; - } - - // was a field name - output.write(':'); - - do { - nextOffset++; - } while(chars[nextOffset] <= 0x20); - - if(elementPaths[level] != STAR_BYTES && !matchPath(chars, offset + 1, endQuoteIndex, elementPaths[level])) { - // skip here - if(chars[nextOffset] == '{') { - filter.setFlushOffset(nextOffset); - - offset = filter.skipObjectMaxStringLength(chars, nextOffset + 1, maxStringLength, output, metrics); - - flushOffset = filter.getFlushOffset(); - } else if(chars[nextOffset] == '[') { - filter.setFlushOffset(nextOffset); - - offset = filter.skipArrayMaxStringLength(chars, nextOffset + 1, maxStringLength, output, metrics); - - flushOffset = filter.getFlushOffset(); - } else if(chars[nextOffset] == '"') { - flushOffset = offset = nextOffset; - - nextOffset = ByteArrayRangesFilter.scanQuotedValue(chars, nextOffset); - - endQuoteIndex = nextOffset; - - output.write(chars, flushOffset, endQuoteIndex - flushOffset + 1); - - nextOffset++; - - offset = nextOffset; - flushOffset = nextOffset; - } else { - flushOffset = nextOffset; - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - continue; - } - - if(level + 1 == elementPaths.length) { - if(chars[nextOffset] == '[' || chars[nextOffset] == '{') { - if(filterType == FilterType.PRUNE) { - // skip both whitespace and actual content - offset = ByteArrayRangesFilter.skipObjectOrArray(chars, nextOffset); - - output.write(filter.getPruneMessage()); - if(metrics != null) { - metrics.onPrune(1); - } - - flushOffset = offset; - } else { - filter.setFlushOffset(nextOffset); - - offset = filter.anonymizeObjectOrArray(chars, nextOffset + 1, maxReadLimit, output, metrics); - - flushOffset = filter.getFlushOffset(); - } - } else { - if(chars[nextOffset] == '"') { - // quoted value - offset = ByteArrayRangesFilter.scanBeyondQuotedValue(chars, nextOffset); - } else { - offset = ByteArrayRangesFilter.scanBeyondUnquotedValue(chars, nextOffset); - } - - if(filterType == FilterType.PRUNE) { - output.write(filter.getPruneMessage()); - - if(metrics != null) { - metrics.onPrune(1); - } - } else { - output.write(filter.getAnonymizeMessage()); - - if(metrics != null) { - metrics.onAnonymize(1); - } - } - - flushOffset = offset; - } - - if(pathMatches != -1) { - pathMatches--; - if(pathMatches == 0) { - - output.write(chars, flushOffset, offset - flushOffset); - - ByteArrayWhitespaceFilter.process(chars, offset, maxReadLimit, output); - - if(metrics != null) { - metrics.onInput(length); - metrics.onOutput(output.size() - bufferLength); - } - - return true; - } - } - } else { - flushOffset = nextOffset; - offset = nextOffset; - } - - continue; - } - offset++; - } - output.write(chars, flushOffset, offset - flushOffset); - - if(metrics != null) { - metrics.onInput(length); - metrics.onOutput(output.size() - bufferLength); - } - - return true; - } catch(Exception e) { - return false; - } - } - - @Override - public boolean isRemovingWhitespace() { - return true; - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/DefaultJsonLogFilterBuilderTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/DefaultJsonLogFilterBuilderTest.java index 7c05336c..6a05eef5 100644 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/DefaultJsonLogFilterBuilderTest.java +++ b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/DefaultJsonLogFilterBuilderTest.java @@ -5,6 +5,7 @@ import org.junit.jupiter.api.Test; +import com.github.skjolber.jsonfilter.base.AbstractJsonFilter; import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter; public class DefaultJsonLogFilterBuilderTest { @@ -42,28 +43,5 @@ public void testTruncateMessage() { assertThat(new String(filter.getAnonymizeJsonValue())).isEqualTo("\"*\""); } - @Test - public void testAnonymizeMessage() { - SingleFullPathJsonFilter filter = (SingleFullPathJsonFilter) DefaultJsonLogFilterBuilder.createInstance() - .withAnonymize("/customer/email") // inserts ***** for values - .withAnonymizeStringValue("x\nxxxx") - .build(); - assertNotNull(filter); - assertThat(new String(filter.getAnonymizeJsonValue())).isEqualTo("\"x\\nxxxx\""); - assertThat(new String(filter.getPruneJsonValue())).isEqualTo("\"PRUNED\""); - assertThat(new String(filter.getTruncateStringValue())).isEqualTo("... + "); - } - - @Test - public void testPruneMessage() { - SingleFullPathJsonFilter filter = (SingleFullPathJsonFilter) DefaultJsonLogFilterBuilder.createInstance() - .withPrune("/customer/email") // inserts ***** for values - .withPruneStringValue("x\nxxxx") - .build(); - assertNotNull(filter); - assertThat(new String(filter.getPruneJsonValue())).isEqualTo("\"x\\nxxxx\""); - assertThat(new String(filter.getAnonymizeJsonValue())).isEqualTo("\"*\""); - assertThat(new String(filter.getTruncateStringValue())).isEqualTo("... + "); - } } diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxSizeMaxStringLengthJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxSizeMaxStringLengthJsonFilterTest.java deleted file mode 100644 index a38d0e21..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxSizeMaxStringLengthJsonFilterTest.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -import java.io.IOException; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.ResourceLock; - -import com.github.skjolber.jsonfilter.JsonFilter; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; -import com.github.skjolber.jsonfilter.test.cache.MaxSizeJsonFilterPair.MaxSizeJsonFilterFunction; - -public class SingleAnyPathMaxSizeMaxStringLengthJsonFilterTest extends DefaultJsonFilterTest { - - private static class MustContrainSingleAnyPathMaxSizeMaxStringLengthJsonFilter extends SingleAnyPathMaxSizeMaxStringLengthJsonFilter { - - public MustContrainSingleAnyPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public MustContrainSingleAnyPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type) { - super(maxStringLength, maxSize, maxPathMatches, expression, type); - } - - @Override - protected boolean mustConstrainMaxSize(int length) { - return true; - } - }; - - public SingleAnyPathMaxSizeMaxStringLengthJsonFilterTest() throws Exception { - super(); - } - - @Test - @ResourceLock(value = "jackson") - public void testMaxSize() throws IOException { - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"//CVE_data_meta", FilterType.ANON)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"//description", FilterType.PRUNE)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"//CVE_data_meta", FilterType.ANON)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"//cpe_match", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"//impactScore", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"//ASSIGNER", FilterType.ANON)); - } - - @Test - public void testDeepStructure() throws IOException { - validateDeepStructure( (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"//CVE_data_meta", FilterType.ANON)); - } - - @Test - public void passthrough_success() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, ANY_PASSTHROUGH_XPATH, FilterType.PRUNE); - - assertThat(maxSize, new SingleAnyPathMaxStringLengthJsonFilter(-1, -1, ANY_PASSTHROUGH_XPATH, FilterType.PRUNE)).hasPassthrough(); - } - - @Test - public void anonymizeAny() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleAnyPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEFAULT_ANY_PATH, FilterType.ANON); - - assertThat(maxSize, new SingleAnyPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_ANY_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics(); - } - - @Test - public void pruneAny() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleAnyPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEFAULT_ANY_PATH, FilterType.PRUNE); - - assertThat(maxSize, new SingleAnyPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_ANY_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); - } - - @Test - public void anonymizeAnyMaxStringLength() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, -1, "//key1", FilterType.ANON); - - assertThat(maxSize, new SingleAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, "//key1", FilterType.ANON)).hasAnonymized("//key1").hasAnonymizeMetrics(); - } - - @Test - public void anonymizeAnyMaxStringLengthMaxPathMatches() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, 1, "//key1", FilterType.ANON); - assertThat(maxSize, new SingleAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, 1, "//key1", FilterType.ANON)).hasAnonymized("//key1").hasAnonymizeMetrics(); - - maxSize = (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(4, size, 1, "//child1", FilterType.ANON); - assertThat(maxSize, new SingleAnyPathMaxStringLengthJsonFilter(4, 1, "//child1", FilterType.ANON)).hasAnonymized("//child1").hasAnonymizeMetrics(); - - maxSize = (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(4, size, 2, "//child1", FilterType.ANON); - assertThat(maxSize, new SingleAnyPathMaxStringLengthJsonFilter(4, 2, "//child1", FilterType.ANON)).hasAnonymized("//child1").hasAnonymizeMetrics(); - } - - @Test - public void pruneAnyMaxStringLength() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, -1, "//key3", FilterType.PRUNE); - - assertThat(maxSize, new SingleAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, "//key3", FilterType.PRUNE)).hasPruned("//key3").hasPruneMetrics(); - } - - @Test - public void pruneAnyMaxStringLengthMaxPathMatches() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, 1, "//key3", FilterType.PRUNE); - - assertThat(maxSize, new SingleAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, 1, "//key3", FilterType.PRUNE)).hasPruned("//key3").hasPruneMetrics(); - } - - @Test - public void exception_returns_false() throws Exception { - JsonFilter filter = new SingleAnyPathMaxSizeMaxStringLengthJsonFilter(-1, -1, -1, DEFAULT_ANY_PATH, FilterType.PRUNE); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertNull(filter.process(new byte[] {}, 1, 1)); - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxStringLengthJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxStringLengthJsonFilterTest.java deleted file mode 100644 index e5b6f7e6..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleAnyPathMaxStringLengthJsonFilterTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import static org.junit.Assert.assertFalse; - -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; - -public class SingleAnyPathMaxStringLengthJsonFilterTest extends DefaultJsonFilterTest { - - public SingleAnyPathMaxStringLengthJsonFilterTest() throws Exception { - super(); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new SingleAnyPathMaxStringLengthJsonFilter(-1, -1, ANY_PASSTHROUGH_XPATH, FilterType.PRUNE)).hasPassthrough(); - } - - @Test - public void exception_returns_false() throws Exception { - SingleAnyPathMaxStringLengthJsonFilter filter = new SingleAnyPathMaxStringLengthJsonFilter(-1, -1, ANY_PASSTHROUGH_XPATH, FilterType.PRUNE); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void anonymizeAny() throws Exception { - assertThat(new SingleAnyPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_ANY_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics(); - } - - @Test - public void pruneAny() throws Exception { - assertThat(new SingleAnyPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_ANY_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); - } - - @Test - public void anonymizeAnyMaxStringLength() throws Exception { - assertThat(new SingleAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, "//key1", FilterType.ANON)).hasAnonymized("//key1").hasAnonymizeMetrics(); - } - - @Test - public void anonymizeAnyMaxStringLengthMaxPathMatches() throws Exception { - /* - assertThat(new SingleAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, 1, "//key1", FilterType.ANON)) - .hasAnonymized("//key1") - .hasAnonymizeMetrics(); - */ - assertThat(new SingleAnyPathMaxStringLengthJsonFilter(4, 1, "//child1", FilterType.ANON)).hasAnonymized("//child1").hasAnonymizeMetrics(); - assertThat(new SingleAnyPathMaxStringLengthJsonFilter(4, 2, "//child1", FilterType.ANON)).hasAnonymized("//child1").hasAnonymizeMetrics(); - } - - @Test - public void pruneAnyMaxStringLength() throws Exception { - assertThat(new SingleAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, "//key3", FilterType.PRUNE)).hasPruned("//key3").hasPruneMetrics(); - } - - @Test - public void pruneAnyMaxStringLengthMaxPathMatches() throws Exception { - assertThat(new SingleAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, 1, "//key3", FilterType.PRUNE)).hasPruned("//key3").hasPruneMetrics(); - } -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathJsonFilterTest.java deleted file mode 100644 index 2ceb4b5b..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathJsonFilterTest.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.jupiter.api.Assertions.assertThrows; - -import java.nio.charset.StandardCharsets; - -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; - -public class SingleFullPathJsonFilterTest extends DefaultJsonFilterTest { - - public SingleFullPathJsonFilterTest() throws Exception { - super(); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new SingleFullPathJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON)).hasPassthrough(); - } - - @Test - public void exception_constructor() throws Exception { - assertThrows(IllegalArgumentException.class, () -> { - new SingleFullPathJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.DELETE); - }); - } - - @Test - public void exception_returns_false() throws Exception { - SingleFullPathJsonFilter filter = new SingleFullPathJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void exception_offset_if_not_exceeded() throws Exception { - SingleFullPathJsonFilter filter = new SingleFullPathJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON); - assertNull(filter.process(TRUNCATED)); - assertNull(filter.process(TRUNCATED.getBytes(StandardCharsets.UTF_8))); - - assertFalse(filter.process(FULL, 0, FULL.length - 3, new StringBuilder())); - assertFalse(filter.process(new String(FULL).getBytes(StandardCharsets.UTF_8), 0, FULL.length - 3, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void exception_incorrect_level() throws Exception { - SingleFullPathJsonFilter filter = new SingleFullPathJsonFilter(127, PASSTHROUGH_XPATH, FilterType.ANON); - assertFalse(filter.process(INCORRECT_LEVEL, new StringBuilder())); - assertNull(filter.process(INCORRECT_LEVEL.getBytes(StandardCharsets.UTF_8))); - } - - @Test - public void anonymize() throws Exception { - assertThat(new SingleFullPathJsonFilter(-1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new SingleFullPathJsonFilter(-1, DEEP_PATH1, FilterType.ANON)).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - assertThat(new SingleFullPathJsonFilter(1, "/key1", FilterType.ANON)).hasAnonymized("/key1"); - - assertThat(new SingleFullPathJsonFilter(1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new SingleFullPathJsonFilter(2, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeWildcard() throws Exception { - assertThat(new SingleFullPathJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); - } - - @Test - public void prune() throws Exception { - assertThat(new SingleFullPathJsonFilter(-1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new SingleFullPathJsonFilter(-1, DEEP_PATH3, FilterType.PRUNE)).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - assertThat(new SingleFullPathJsonFilter(1, "/key3", FilterType.PRUNE)).hasPruned("/key3"); - - assertThat(new SingleFullPathJsonFilter(1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new SingleFullPathJsonFilter(2, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - - @Test - public void pruneWildcard() throws Exception { - assertThat(new SingleFullPathJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeJsonFilterTest.java deleted file mode 100644 index aff10330..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeJsonFilterTest.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -import java.io.IOException; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.ResourceLock; - -import com.github.skjolber.jsonfilter.JsonFilter; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; -import com.github.skjolber.jsonfilter.test.cache.MaxSizeJsonFilterPair.MaxSizeJsonFilterFunction; - -public class SingleFullPathMaxSizeJsonFilterTest extends DefaultJsonFilterTest { - - private static class MustContrainSingleFullPathMaxSizeJsonFilter extends SingleFullPathMaxSizeJsonFilter { - - public MustContrainSingleFullPathMaxSizeJsonFilter(int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public MustContrainSingleFullPathMaxSizeJsonFilter(int maxSize, int maxPathMatches, String expression, FilterType type) { - super(maxSize, maxPathMatches, expression, type); - } - - @Override - protected boolean mustConstrainMaxSize(int length) { - return true; - } - }; - - public SingleFullPathMaxSizeJsonFilterTest() throws Exception { - super(); - } - - @Test - @ResourceLock(value = "jackson") - public void testMaxSize() throws IOException { - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeJsonFilter(size, -1, "/CVE_Items/cve/CVE_data_meta", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeJsonFilter(size, -1, "/CVE_Items/cve/CVE_data_meta", FilterType.PRUNE)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/severity", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/severity", FilterType.PRUNE)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/impactScore", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/impactScore", FilterType.PRUNE)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/obtainAllPrivilege", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/obtainAllPrivilege", FilterType.PRUNE)); - } - - @Test - public void testDeepStructure() throws IOException { - validateDeepStructure( (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, -1, DEEP_PATH, FilterType.ANON)); - } - - @Test - public void passthrough_success() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, -1, PASSTHROUGH_XPATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON)).hasPassthrough(); - } - - @Test - public void anonymize() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, -1, DEFAULT_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathJsonFilter(-1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, -1, DEEP_PATH1, FilterType.ANON); - assertThat(maxSize, new SingleFullPathJsonFilter(-1, DEEP_PATH1, FilterType.ANON)).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, 1, "/key1", FilterType.ANON); - assertThat(maxSize, new SingleFullPathJsonFilter(1, "/key1", FilterType.ANON)).hasAnonymized("/key1").hasAnonymizeMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, 1, DEFAULT_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathJsonFilter(1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, 2, DEFAULT_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathJsonFilter(2, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeWildcard() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, -1, DEFAULT_WILDCARD_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); - } - - @Test - public void prune() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, -1, DEFAULT_PATH, FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathJsonFilter(-1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, -1, DEEP_PATH3, FilterType.PRUNE); - assertThat(new SingleFullPathJsonFilter(-1, DEEP_PATH3, FilterType.PRUNE)).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, 1, "/key3", FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathJsonFilter(1, "/key3", FilterType.PRUNE)).hasPruned("/key3"); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, 1, DEFAULT_PATH, FilterType.PRUNE); - assertThat(new SingleFullPathJsonFilter(1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, 2, DEFAULT_PATH, FilterType.PRUNE); - assertThat(new SingleFullPathJsonFilter(2, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - - @Test - public void pruneWildcard() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeJsonFilter(size, -1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); - } - - @Test - public void exception_returns_false() throws Exception { - JsonFilter filter = new SingleFullPathMaxSizeJsonFilter(-1, -1, PASSTHROUGH_XPATH, FilterType.PRUNE); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertNull(filter.process(new byte[] {}, 1, 1)); - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeMaxStringLengthJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeMaxStringLengthJsonFilterTest.java deleted file mode 100644 index ee6b7b60..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxSizeMaxStringLengthJsonFilterTest.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.ResourceLock; - -import com.github.skjolber.jsonfilter.JsonFilter; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; -import com.github.skjolber.jsonfilter.test.cache.MaxSizeJsonFilterPair.MaxSizeJsonFilterFunction; - -public class SingleFullPathMaxSizeMaxStringLengthJsonFilterTest extends DefaultJsonFilterTest { - - private static class MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter extends SingleFullPathMaxSizeMaxStringLengthJsonFilter { - - public MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type) { - super(maxStringLength, maxSize, maxPathMatches, expression, type); - } - - @Override - protected boolean mustConstrainMaxSize(int length) { - return true; - } - }; - - public SingleFullPathMaxSizeMaxStringLengthJsonFilterTest() throws Exception { - super(); - } - - @Test - @ResourceLock(value = "jackson") - public void testMaxSize() throws IOException { - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeMaxStringLengthJsonFilter(128, size, -1, "/CVE_Items/cve/CVE_data_meta", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeMaxStringLengthJsonFilter(128, size, -1, "/CVE_Items/cve/CVE_data_meta", FilterType.PRUNE)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"/CVE_Items/impact/baseMetricV2/severity", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"/CVE_Items/impact/baseMetricV2/severity", FilterType.PRUNE)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"/CVE_Items/impact/baseMetricV2/impactScore", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"/CVE_Items/impact/baseMetricV2/impactScore", FilterType.PRUNE)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"/CVE_Items/impact/baseMetricV2/obtainAllPrivilege", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new SingleFullPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,"/CVE_Items/impact/baseMetricV2/obtainAllPrivilege", FilterType.PRUNE)); - } - - @Test - public void testDeepStructure() throws IOException { - validateDeepStructure( (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,DEEP_PATH, FilterType.ANON)); - } - - @Test - public void passthrough_success() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, PASSTHROUGH_XPATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, -1, PASSTHROUGH_XPATH, FilterType.ANON)).hasPassthrough(); - } - - @Test - public void anonymize() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEFAULT_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEEP_PATH1, FilterType.ANON); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEEP_PATH1, FilterType.ANON)).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, 1, "/key1", FilterType.ANON); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, 1, "/key1", FilterType.ANON)).hasAnonymized("/key1").hasAnonymizeMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, 1, DEFAULT_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, 1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, 2, DEFAULT_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, 2, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeWildcard() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEFAULT_WILDCARD_PATH, FilterType.ANON); - - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_WILDCARD_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); - } - - @Test - public void prune() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEFAULT_PATH, FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, DEEP_PATH3, FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEEP_PATH3, FilterType.PRUNE)).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, 1, "/key3", FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, 1, "/key3", FilterType.PRUNE)).hasPruned("/key3").hasPruneMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, 1, DEFAULT_PATH, FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, 1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, 2, DEFAULT_PATH, FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, 2, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - - @Test - public void pruneWildcard() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, size, 1, "/key3", FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(-1, 1, "/key3", FilterType.PRUNE)).hasPruned("/key3").hasPruneMetrics(); - } - - @Test - public void maxStringLength() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, -1, PASSTHROUGH_XPATH, FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, PASSTHROUGH_XPATH, FilterType.PRUNE)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); - } - - @Test - public void maxStringLengthMaxStringLength() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, 1, "/key3", FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, 1, "/key3", FilterType.PRUNE)).hasPruned("/key3").hasPruneMetrics(); - } - - @Test - public void exception_returns_false() throws Exception { - JsonFilter filter = new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, -1, -1, PASSTHROUGH_XPATH, FilterType.PRUNE); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertNull(filter.process(new byte[] {}, 1, 1)); - } - - @Test - public void exception_incorrect_level() throws Exception { - JsonFilter filter = new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(-1, FULL.length - 4, 127, PASSTHROUGH_XPATH, FilterType.PRUNE); - assertFalse(filter.process(INCORRECT_LEVEL, new StringBuilder())); - assertNull(filter.process(INCORRECT_LEVEL.getBytes(StandardCharsets.UTF_8))); - } - - @Test - public void maxStringLengthAnonymize() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, -1, DEFAULT_PATH, FilterType.ANON); - - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, DEFAULT_PATH, FilterType.ANON)) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxSizeMetrics() - .hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void maxStringLengthPrune() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, -1, DEFAULT_PATH, FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, DEFAULT_PATH, FilterType.PRUNE)) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics() - .hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxStringLengthJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxStringLengthJsonFilterTest.java deleted file mode 100644 index 8258841f..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/SingleFullPathMaxStringLengthJsonFilterTest.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -import java.nio.charset.StandardCharsets; - -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; - -public class SingleFullPathMaxStringLengthJsonFilterTest extends DefaultJsonFilterTest { - - public SingleFullPathMaxStringLengthJsonFilterTest() throws Exception { - super(); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, -1, PASSTHROUGH_XPATH, FilterType.ANON)).hasPassthrough(); - } - - @Test - public void exception_returns_false() throws Exception { - SingleFullPathMaxStringLengthJsonFilter filter = new SingleFullPathMaxStringLengthJsonFilter(-1, -1, PASSTHROUGH_XPATH, FilterType.ANON); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void exception_offset_if_not_exceeded() throws Exception { - SingleFullPathMaxStringLengthJsonFilter filter = new SingleFullPathMaxStringLengthJsonFilter(-1, -1, PASSTHROUGH_XPATH, FilterType.ANON); - assertNull(filter.process(TRUNCATED)); - assertNull(filter.process(TRUNCATED.getBytes(StandardCharsets.UTF_8))); - - assertFalse(filter.process(FULL, 0, FULL.length - 3, new StringBuilder())); - assertFalse(filter.process(new String(FULL).getBytes(StandardCharsets.UTF_8), 0, FULL.length - 3, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void exception_incorrect_level() throws Exception { - SingleFullPathMaxStringLengthJsonFilter filter = new SingleFullPathMaxStringLengthJsonFilter(-1, 127, PASSTHROUGH_XPATH, FilterType.ANON); - assertFalse(filter.process(INCORRECT_LEVEL, new StringBuilder())); - assertNull(filter.process(INCORRECT_LEVEL.getBytes(StandardCharsets.UTF_8))); - } - - @Test - public void anonymize() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEEP_PATH1, FilterType.ANON)).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, 1, "/key1", FilterType.ANON)).hasAnonymized("/key1").hasAnonymizeMetrics(); - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, 1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, 2, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeWildcard() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_WILDCARD_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); - } - - @Test - public void prune() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEEP_PATH3, FilterType.PRUNE)).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, 1, "/key3", FilterType.PRUNE)).hasPruned("/key3").hasPruneMetrics(); - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, 1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, 2, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - - @Test - public void pruneWildcard() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(-1, -1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); - } - - @Test - public void maxStringLength() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, PASSTHROUGH_XPATH, FilterType.PRUNE)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); - } - - @Test - public void maxStringLengthMaxStringLength() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, 1, "/key3", FilterType.PRUNE)).hasPruned("/key3").hasPruneMetrics(); - } - - @Test - public void maxStringLengthAnonymize() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, DEFAULT_PATH, FilterType.ANON)) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics() - .hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void maxStringLengthPrune() throws Exception { - assertThat(new SingleFullPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, DEFAULT_PATH, FilterType.PRUNE)) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics() - .hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxSizeJsonRemoveWhitespaceFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxSizeJsonRemoveWhitespaceFilterTest.java deleted file mode 100644 index 99f52fd1..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxSizeJsonRemoveWhitespaceFilterTest.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.github.skjolber.jsonfilter.core.ws; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -import java.io.IOException; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.ResourceLock; - -import com.github.skjolber.jsonfilter.JsonFilter; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; -import com.github.skjolber.jsonfilter.test.cache.MaxSizeJsonFilterPair.MaxSizeJsonFilterFunction; - -public class SingleFullPathMaxSizeJsonRemoveWhitespaceFilterTest extends DefaultJsonFilterTest { - - private static class MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter extends SingleFullPathMaxSizeRemoveWhitespaceJsonFilter { - - public MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - } - - public MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(int maxSize, int maxPathMatches, String expression, FilterType type) { - super(maxSize, maxPathMatches, expression, type); - } - - @Override - protected boolean mustConstrainMaxSize(int length) { - return true; - } - }; - - - public SingleFullPathMaxSizeJsonRemoveWhitespaceFilterTest() throws Exception { - super(); - } - - @Test - @ResourceLock(value = "jackson") - public void testMaxSize() throws IOException { - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1, "/CVE_Items/cve/CVE_data_meta", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1, "/CVE_Items/cve/CVE_data_meta", FilterType.PRUNE)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/severity", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/severity", FilterType.PRUNE)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/impactScore", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/impactScore", FilterType.PRUNE)); - - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/obtainAllPrivilege", FilterType.ANON)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1,"/CVE_Items/impact/baseMetricV2/obtainAllPrivilege", FilterType.PRUNE)); - } - - @Test - public void testDeepStructure() throws IOException { - validateDeepStructure( (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1, DEEP_PATH, FilterType.ANON)); - } - - @Test - public void passthrough_success() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1, PASSTHROUGH_XPATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathRemoveWhitespaceJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON)).hasPassthrough(); - } - - @Test - public void anonymize() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1, DEFAULT_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1, DEEP_PATH1, FilterType.ANON); - assertThat(maxSize, new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEEP_PATH1, FilterType.ANON)).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, 1, "/key1", FilterType.ANON); - assertThat(maxSize, new SingleFullPathRemoveWhitespaceJsonFilter(1, "/key1", FilterType.ANON)).hasAnonymized("/key1").hasAnonymizeMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, 1, DEFAULT_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathRemoveWhitespaceJsonFilter(1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, 2, DEFAULT_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathRemoveWhitespaceJsonFilter(2, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeWildcard() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1, DEFAULT_WILDCARD_PATH, FilterType.ANON); - assertThat(maxSize, new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); - } - - @Test - public void prune() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1, DEFAULT_PATH, FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1, DEEP_PATH3, FilterType.PRUNE); - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEEP_PATH3, FilterType.PRUNE)).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, 1, "/key3", FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathRemoveWhitespaceJsonFilter(1, "/key3", FilterType.PRUNE)).hasPruned("/key3"); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, 1, DEFAULT_PATH, FilterType.PRUNE); - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - - maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, 2, DEFAULT_PATH, FilterType.PRUNE); - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(2, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - - @Test - public void pruneWildcard() throws Exception { - MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(size, -1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE); - assertThat(maxSize, new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); - } - - @Test - public void exception_returns_false() throws Exception { - JsonFilter filter = new MustContrainSingleFullPathMaxSizeRemoveWhitespaceJsonFilter(-1, -1, PASSTHROUGH_XPATH, FilterType.PRUNE); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertNull(filter.process(new byte[] {}, 1, 1)); - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilterTest.java deleted file mode 100644 index d3d430c0..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilterTest.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.github.skjolber.jsonfilter.core.ws; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -import java.io.ByteArrayOutputStream; -import java.nio.charset.StandardCharsets; - -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; - -public class SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilterTest extends DefaultJsonFilterTest { - - public SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilterTest() throws Exception { - super(); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, PASSTHROUGH_XPATH, FilterType.ANON)).hasPassthrough(); - } - - @Test - public void exception_returns_false() throws Exception { - SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter filter = new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, PASSTHROUGH_XPATH, FilterType.ANON); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void exception_offset_if_not_exceeded() throws Exception { - SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter filter = new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, PASSTHROUGH_XPATH, FilterType.ANON); - assertNull(filter.process(TRUNCATED)); - assertNull(filter.process(TRUNCATED.getBytes(StandardCharsets.UTF_8))); - } - - @Test - public void anonymize() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, DEEP_PATH1, FilterType.ANON)).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, "/key1", FilterType.ANON)).hasAnonymized("/key1").hasAnonymizeMetrics(); - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 2, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeWildcard() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, DEFAULT_WILDCARD_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); - } - - @Test - public void prune() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, DEEP_PATH3, FilterType.PRUNE)).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, "/key3", FilterType.PRUNE)).hasPruned("/key3").hasPruneMetrics(); - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 2, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - - @Test - public void pruneWildcard() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); - } - - @Test - public void maxStringLength() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, PASSTHROUGH_XPATH, FilterType.PRUNE)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); - } - - @Test - public void maxStringLengthMaxStringLength() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, 1, "/key3", FilterType.PRUNE)).hasPruned("/key3").hasPruneMetrics(); - } - - @Test - public void maxStringLengthAnonymize() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, DEFAULT_PATH, FilterType.ANON)) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics() - .hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void maxStringLengthPrune() throws Exception { - assertThat(new SingleFullPathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, DEFAULT_PATH, FilterType.PRUNE)) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics() - .hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathRemoveWhitespaceJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathRemoveWhitespaceJsonFilterTest.java deleted file mode 100644 index e6e000e6..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/SingleFullPathRemoveWhitespaceJsonFilterTest.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.github.skjolber.jsonfilter.core.ws; - -import static org.junit.Assert.assertFalse; -import static org.junit.jupiter.api.Assertions.assertThrows; - -import java.io.ByteArrayOutputStream; - -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; - -public class SingleFullPathRemoveWhitespaceJsonFilterTest extends DefaultJsonFilterTest { - - public SingleFullPathRemoveWhitespaceJsonFilterTest() throws Exception { - super(); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON)).hasPassthrough(); - } - - @Test - public void exception_constructor() throws Exception { - assertThrows(IllegalArgumentException.class, () -> { - new SingleFullPathRemoveWhitespaceJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.DELETE); - }); - } - - @Test - public void exception_returns_false() throws Exception { - SingleFullPathRemoveWhitespaceJsonFilter filter = new SingleFullPathRemoveWhitespaceJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void anonymize() throws Exception { - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEEP_PATH1, FilterType.ANON)).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(1, "/key1", FilterType.ANON)).hasAnonymized("/key1"); - - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(1, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(2, DEFAULT_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeWildcard() throws Exception { - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.ANON)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); - } - - @Test - public void prune() throws Exception { - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEEP_PATH3, FilterType.PRUNE)).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(1, "/key3", FilterType.PRUNE)).hasPruned("/key3"); - - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(1, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(2, DEFAULT_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - - @Test - public void pruneWildcard() throws Exception { - assertThat(new SingleFullPathRemoveWhitespaceJsonFilter(-1, DEFAULT_WILDCARD_PATH, FilterType.PRUNE)).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); - } - -} From 5f9de186a49136a0c6e19d9c8d049f53a8844790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Skj=C3=B8lberg?= Date: Sat, 25 Oct 2025 23:51:38 +0200 Subject: [PATCH 2/8] Simplify --- README.md | 2 +- .../base/AbstractMultiPathJsonFilter.java | 4 +- .../base/AbstractPathJsonFilter.java | 12 +- ...tractSingleCharArrayAnyPathJsonFilter.java | 22 ---- ...ractSingleCharArrayFullPathJsonFilter.java | 20 ---- .../base/AbstractSinglePathJsonFilter.java | 29 ----- ...bstractSingleStringFullPathJsonFilter.java | 18 --- .../base/AbstractPathJsonFilterTest.java | 4 +- ...tSingleCharArrayAnyPathJsonFilterTest.java | 64 ----------- ...SingleCharArrayFullPathJsonFilterTest.java | 63 ----------- .../AbstractSinglePathJsonFilterTest.java | 90 --------------- ...actSingleStringFullPathJsonFilterTest.java | 61 ---------- .../{match => path}/AbstractPathTest.java | 2 +- .../base/{match => path}/EndPathItemTest.java | 2 +- .../ExpressionNodeFactoryTest.java | 2 +- .../{match => path}/MultiPathItemTest.java | 2 +- .../{match => path}/PathItemFactoryTest.java | 2 +- .../base/{match => path}/PathItemTest.java | 2 +- .../{match => path}/SinglePathItemTest.java | 2 +- .../StarMultiPathItemTest.java | 2 +- .../{match => path}/StarPathItemTest.java | 2 +- .../jmh/AbstractAnyPathFilterBenchmark.java | 4 +- ...axSizeMaxStringLengthFilterBenchmark.java} | 14 +-- ...ctPathMaxStringLengthFilterBenchmark.java} | 14 +-- .../jsonfilter/jmh/AllFilterBenchmark.java | 28 ++--- .../jsonfilter/jmh/CveFilterBenchmark.java | 23 +--- .../jmh/ScratchFilterBenchmark.java | 4 +- ...axSizeMaxStringLengthFilterBenchmark.java} | 8 +- ...vePathMaxStringLengthFilterBenchmark.java} | 8 +- .../jsonfilter/jmh/path/AnyPathBenchmark.java | 2 +- ...ksonAnyPathMaxStringLengthJsonFilter.java} | 16 +-- .../jackson/JacksonJsonFilterFactory.java | 6 +- ...PathMaxSizeMaxStringLengthJsonFilter.java} | 10 +- ...JacksonPathMaxStringLengthJsonFilter.java} | 12 +- ...AnyPathMaxStringLengthJsonFilterTest.java} | 24 ++-- ...ultiPathMaxStringLengthJsonFilterTest.java | 102 ----------------- ...MaxSizeMaxStringLengthJsonFilterTest.java} | 40 +++---- ...ksonPathMaxStringLengthJsonFilterTest.java | 102 +++++++++++++++++ ...java => AbstractRangesPathJsonFilter.java} | 4 +- .../jsonfilter/core/AnyPathJsonFilter.java | 2 +- .../core/DefaultJsonFilterFactory.java | 18 +-- ...sonFilter.java => FullPathJsonFilter.java} | 6 +- ...athJsonFilter.java => PathJsonFilter.java} | 6 +- ...PathMaxSizeMaxStringLengthJsonFilter.java} | 6 +- ...ava => PathMaxStringLengthJsonFilter.java} | 8 +- ...gthMaxSizeRemoveWhitespaceJsonFilter.java} | 6 +- ...ringLengthRemoveWhitespaceJsonFilter.java} | 8 +- .../core/DefaultJsonFilterFactoryTest.java | 6 +- .../core/FullPathJsonFilterTest.java | 100 +++++++++++++++++ .../core/MultiFullPathJsonFilterTest.java | 100 ----------------- .../core/MultiPathJsonFilterTest.java | 104 ------------------ ...ultiPathMaxStringLengthJsonFilterTest.java | 103 ----------------- .../jsonfilter/core/PathJsonFilterTest.java | 104 ++++++++++++++++++ ...MaxSizeMaxStringLengthJsonFilterTest.java} | 64 +++++------ .../PathMaxStringLengthJsonFilterTest.java | 103 +++++++++++++++++ ...gLengthRemoveWhitespaceJsonFilterTest.java | 95 ---------------- ...axSizeJsonRemoveWhitespaceFilterTest.java} | 46 ++++---- ...gLengthRemoveWhitespaceJsonFilterTest.java | 95 ++++++++++++++++ 58 files changed, 719 insertions(+), 1089 deletions(-) delete mode 100644 base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayAnyPathJsonFilter.java delete mode 100644 base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayFullPathJsonFilter.java delete mode 100644 base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSinglePathJsonFilter.java delete mode 100644 base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleStringFullPathJsonFilter.java delete mode 100644 base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayAnyPathJsonFilterTest.java delete mode 100644 base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayFullPathJsonFilterTest.java delete mode 100644 base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSinglePathJsonFilterTest.java delete mode 100644 base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleStringFullPathJsonFilterTest.java rename base/src/test/java/com/github/skjolber/jsonfilter/base/{match => path}/AbstractPathTest.java (95%) rename base/src/test/java/com/github/skjolber/jsonfilter/base/{match => path}/EndPathItemTest.java (92%) rename base/src/test/java/com/github/skjolber/jsonfilter/base/{match => path}/ExpressionNodeFactoryTest.java (98%) rename base/src/test/java/com/github/skjolber/jsonfilter/base/{match => path}/MultiPathItemTest.java (92%) rename base/src/test/java/com/github/skjolber/jsonfilter/base/{match => path}/PathItemFactoryTest.java (99%) rename base/src/test/java/com/github/skjolber/jsonfilter/base/{match => path}/PathItemTest.java (98%) rename base/src/test/java/com/github/skjolber/jsonfilter/base/{match => path}/SinglePathItemTest.java (90%) rename base/src/test/java/com/github/skjolber/jsonfilter/base/{match => path}/StarMultiPathItemTest.java (95%) rename base/src/test/java/com/github/skjolber/jsonfilter/base/{match => path}/StarPathItemTest.java (92%) rename benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/{AbstractMultiPathMaxSizeMaxStringLengthFilterBenchmark.java => AbstractPathMaxSizeMaxStringLengthFilterBenchmark.java} (71%) rename benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/{AbstractMultiPathMaxStringLengthFilterBenchmark.java => AbstractPathMaxStringLengthFilterBenchmark.java} (71%) rename benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/{CveMultiPathMaxSizeMaxStringLengthFilterBenchmark.java => CvePathMaxSizeMaxStringLengthFilterBenchmark.java} (81%) rename benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/{CveMultiPathMaxStringLengthFilterBenchmark.java => CvePathMaxStringLengthFilterBenchmark.java} (81%) rename frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/{JacksonMultiAnyPathMaxStringLengthJsonFilter.java => JacksonAnyPathMaxStringLengthJsonFilter.java} (85%) rename frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/{JacksonMultiPathMaxSizeMaxStringLengthJsonFilter.java => JacksonPathMaxSizeMaxStringLengthJsonFilter.java} (91%) rename frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/{JacksonMultiPathMaxStringLengthJsonFilter.java => JacksonPathMaxStringLengthJsonFilter.java} (87%) rename frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/{JacksonMultiAnyPathMaxStringLengthJsonFilterTest.java => JacksonAnyPathMaxStringLengthJsonFilterTest.java} (59%) delete mode 100644 frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxStringLengthJsonFilterTest.java rename frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/{JacksonMultiPathMaxSizeMaxStringLengthJsonFilterTest.java => JacksonPathMaxSizeMaxStringLengthJsonFilterTest.java} (70%) create mode 100644 frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxStringLengthJsonFilterTest.java rename impl/core/src/main/java/com/github/skjolber/jsonfilter/core/{AbstractRangesMultiPathJsonFilter.java => AbstractRangesPathJsonFilter.java} (91%) rename impl/core/src/main/java/com/github/skjolber/jsonfilter/core/{MultiFullPathJsonFilter.java => FullPathJsonFilter.java} (95%) rename impl/core/src/main/java/com/github/skjolber/jsonfilter/core/{MultiPathJsonFilter.java => PathJsonFilter.java} (95%) rename impl/core/src/main/java/com/github/skjolber/jsonfilter/core/{MultiPathMaxSizeMaxStringLengthJsonFilter.java => PathMaxSizeMaxStringLengthJsonFilter.java} (97%) rename impl/core/src/main/java/com/github/skjolber/jsonfilter/core/{MultiPathMaxStringLengthJsonFilter.java => PathMaxStringLengthJsonFilter.java} (94%) rename impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/{MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter.java => PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter.java} (97%) rename impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/{MultiPathMaxStringLengthRemoveWhitespaceJsonFilter.java => PathMaxStringLengthRemoveWhitespaceJsonFilter.java} (95%) create mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/FullPathJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiFullPathJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathMaxStringLengthJsonFilterTest.java create mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathJsonFilterTest.java rename impl/core/src/test/java/com/github/skjolber/jsonfilter/core/{MultiPathMaxSizeMaxStringLengthJsonFilterTest.java => PathMaxSizeMaxStringLengthJsonFilterTest.java} (54%) create mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathMaxStringLengthJsonFilterTest.java delete mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthRemoveWhitespaceJsonFilterTest.java rename impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/{MultiPathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest.java => PathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest.java} (69%) create mode 100644 impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthRemoveWhitespaceJsonFilterTest.java diff --git a/README.md b/README.md index 3df0896e..6f962146 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ with support for wildcards; or a simple any-level field name search - ..myFieldName + $..myFieldName The filters within this library support using multiple expressions at once. Note that path expressions are see through arrays. diff --git a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractMultiPathJsonFilter.java b/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractMultiPathJsonFilter.java index 87ad89d8..bd3f6d99 100644 --- a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractMultiPathJsonFilter.java +++ b/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractMultiPathJsonFilter.java @@ -48,7 +48,7 @@ public AbstractMultiPathJsonFilter(int maxStringLength, int maxSize, int maxPath for(int i = 0; i < prunes.length; i++) { String prune = prunes[i]; if(hasAnyPrefix(prune)) { - String name = prune.substring(2); + String name = removeAnyPrefix(prune); if(name.equals("*")) { throw new IllegalArgumentException("Unexpected any match for *"); } @@ -64,7 +64,7 @@ public AbstractMultiPathJsonFilter(int maxStringLength, int maxSize, int maxPath for(int i = 0; i < anonymizes.length; i++) { String anonymize = anonymizes[i]; if(hasAnyPrefix(anonymize)) { - String name = anonymize.substring(2); + String name = removeAnyPrefix(anonymize); if(name.equals("*")) { throw new IllegalArgumentException("Unexpected any match for *"); } diff --git a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractPathJsonFilter.java b/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractPathJsonFilter.java index 3ae53e10..632ec1f9 100644 --- a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractPathJsonFilter.java +++ b/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractPathJsonFilter.java @@ -34,7 +34,7 @@ public int getType() { protected static final String[] EMPTY = new String[]{}; protected static final String ANY_PREFIX_SLASHES = "//"; - protected static final String ANY_PREFIX_DOTS = ".."; + protected static final String ANY_PREFIX_DOTS = "$.."; public static final String STAR = "*"; protected static final char[] STAR_CHARS = STAR.toCharArray(); @@ -66,6 +66,16 @@ public static boolean hasAnyPrefix(String string) { return string.startsWith(AbstractPathJsonFilter.ANY_PREFIX_SLASHES) || string.startsWith(AbstractPathJsonFilter.ANY_PREFIX_DOTS); } + public static String removeAnyPrefix(String string) { + if(string.startsWith(AbstractPathJsonFilter.ANY_PREFIX_SLASHES)) { + return string.substring(2); + } + if(string.startsWith(AbstractPathJsonFilter.ANY_PREFIX_DOTS)) { + return string.substring(2); + } + throw new IllegalArgumentException(); + } + /** strictly not needed, but necessary for testing */ protected final String[] anonymizes; protected final String[] prunes; diff --git a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayAnyPathJsonFilter.java b/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayAnyPathJsonFilter.java deleted file mode 100644 index 0fd795b6..00000000 --- a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayAnyPathJsonFilter.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.github.skjolber.jsonfilter.base; - -import java.nio.charset.StandardCharsets; - -public abstract class AbstractSingleCharArrayAnyPathJsonFilter extends AbstractSinglePathJsonFilter { - - protected final char[] pathChars; - protected final byte[] pathBytes; - - public AbstractSingleCharArrayAnyPathJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - - if(!hasAnyPrefix(expression)) { - throw new IllegalArgumentException("Full element path expression not supported"); - } - - String key = expression.substring(2); - this.pathChars = intern(key.toCharArray()); - this.pathBytes = intern(key.getBytes(StandardCharsets.UTF_8)); - } - -} diff --git a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayFullPathJsonFilter.java b/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayFullPathJsonFilter.java deleted file mode 100644 index a114cada..00000000 --- a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayFullPathJsonFilter.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.github.skjolber.jsonfilter.base; - -public abstract class AbstractSingleCharArrayFullPathJsonFilter extends AbstractSinglePathJsonFilter { - - protected final char[][] pathChars; - protected final byte[][] pathBytes; - - public AbstractSingleCharArrayFullPathJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - - if(hasAnyPrefix(expression)) { - throw new IllegalArgumentException("Any element expression not supported"); - } - - String[] parsed = parse(expression); - this.pathChars = toCharArray(parsed); - this.pathBytes = toByteArray(parsed); - } - -} diff --git a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSinglePathJsonFilter.java b/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSinglePathJsonFilter.java deleted file mode 100644 index 912757d6..00000000 --- a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSinglePathJsonFilter.java +++ /dev/null @@ -1,29 +0,0 @@ -/*************************************************************************** - * Copyright 2020 Thomas Rorvik Skjolberg - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package com.github.skjolber.jsonfilter.base; - -public abstract class AbstractSinglePathJsonFilter extends AbstractPathJsonFilter { - - protected final FilterType filterType; - - public AbstractSinglePathJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, type == FilterType.ANON ? new String[]{expression} : EMPTY, type == FilterType.PRUNE ? new String[]{expression} : EMPTY, pruneMessage, anonymizeMessage, truncateMessage); - - this.filterType = type; - } -} diff --git a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleStringFullPathJsonFilter.java b/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleStringFullPathJsonFilter.java deleted file mode 100644 index 6fd7b994..00000000 --- a/base/src/main/java/com/github/skjolber/jsonfilter/base/AbstractSingleStringFullPathJsonFilter.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.github.skjolber.jsonfilter.base; - -public abstract class AbstractSingleStringFullPathJsonFilter extends AbstractSinglePathJsonFilter { - - protected final String[] paths; - - public AbstractSingleStringFullPathJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String expression, FilterType type, String pruneMessage, String anonymizeMessage, String truncateMessage) { - super(maxStringLength, maxSize, maxPathMatches, expression, type, pruneMessage, anonymizeMessage, truncateMessage); - - if(hasAnyPrefix(expression)) { - throw new IllegalArgumentException("Any element expression not supported"); - } - - this.paths = parse(expression); - } - - -} diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractPathJsonFilterTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractPathJsonFilterTest.java index 67754532..e17a370d 100644 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractPathJsonFilterTest.java +++ b/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractPathJsonFilterTest.java @@ -111,8 +111,8 @@ public void testRegexpExpressions() { public void testAnyPrefix() { assertTrue(AbstractPathJsonFilter.hasAnyPrefix(new String[] {"//a"})); assertFalse(AbstractPathJsonFilter.hasAnyPrefix(new String[] {"/a"})); - assertTrue(AbstractPathJsonFilter.hasAnyPrefix(new String[] {"..a"})); - assertFalse(AbstractPathJsonFilter.hasAnyPrefix(new String[] {".a"})); + assertTrue(AbstractPathJsonFilter.hasAnyPrefix(new String[] {"$..a"})); + assertFalse(AbstractPathJsonFilter.hasAnyPrefix(new String[] {"$.a"})); } @Test diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayAnyPathJsonFilterTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayAnyPathJsonFilterTest.java deleted file mode 100644 index c89fd878..00000000 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayAnyPathJsonFilterTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.github.skjolber.jsonfilter.base; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import java.io.ByteArrayOutputStream; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; - -public class AbstractSingleCharArrayAnyPathJsonFilterTest { - - private static class MySingleCharArrayAnyPathJsonFilter extends AbstractSingleCharArrayAnyPathJsonFilter { - - public MySingleCharArrayAnyPathJsonFilter(int maxStringLength, String expression, FilterType type) { - super(maxStringLength, -1, -1, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - @Override - public boolean process(char[] chars, int offset, int length, StringBuilder output) { - return false; - } - - @Override - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output) { - return false; - } - - public char[] getPath() { - return pathChars; - } - - @Override - public boolean process(char[] chars, int offset, int length, StringBuilder output, - JsonFilterMetrics filterMetrics) { - return false; - } - - - @Override - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output, - JsonFilterMetrics filterMetrics) { - return false; - } - - } - - @Test - public void testFullPathThrowsException() { - Assertions.assertThrows(IllegalArgumentException.class, () -> { - new MySingleCharArrayAnyPathJsonFilter(-1, "/abc", FilterType.ANON); - }); - } - - @Test - public void testFullPath() { - char[] path = new MySingleCharArrayAnyPathJsonFilter(-1, "//abc", FilterType.ANON).getPath(); - assertEquals(new String(path), "abc"); - } - -} diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayFullPathJsonFilterTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayFullPathJsonFilterTest.java deleted file mode 100644 index 14e5b1ec..00000000 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleCharArrayFullPathJsonFilterTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.github.skjolber.jsonfilter.base; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import java.io.ByteArrayOutputStream; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; - -public class AbstractSingleCharArrayFullPathJsonFilterTest { - - private static class MySingleCharArrayAnyPathJsonFilter extends AbstractSingleCharArrayFullPathJsonFilter { - - public MySingleCharArrayAnyPathJsonFilter(int maxStringLength, String expression, FilterType type) { - super(maxStringLength, -1, -1, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - @Override - public boolean process(char[] chars, int offset, int length, StringBuilder output) { - return false; - } - - @Override - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output) { - return false; - } - - public char[][] getPaths() { - return pathChars; - } - - @Override - public boolean process(char[] chars, int offset, int length, StringBuilder output, - JsonFilterMetrics filterMetrics) { - return false; - } - - - @Override - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output, - JsonFilterMetrics filterMetrics) { - return false; - } - } - - @Test - public void testFullPathThrowsException() { - Assertions.assertThrows(IllegalArgumentException.class, () -> { - new MySingleCharArrayAnyPathJsonFilter(-1, "//abc", FilterType.ANON); - }); - } - - @Test - public void testFullPath() { - char[][] paths = new MySingleCharArrayAnyPathJsonFilter(-1, "/abc", FilterType.ANON).getPaths(); - assertEquals(new String(paths[1]), "abc"); - } - -} diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSinglePathJsonFilterTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSinglePathJsonFilterTest.java deleted file mode 100644 index 83b7995b..00000000 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSinglePathJsonFilterTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.github.skjolber.jsonfilter.base; - -import static com.github.skjolber.jsonfilter.test.JsonFilterConstants.INVALID_PATH; -import static com.github.skjolber.jsonfilter.test.JsonFilterConstants.PASSTHROUGH_XPATH; -import static com.google.common.truth.Truth.assertThat; - -import java.io.ByteArrayOutputStream; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; -import com.github.skjolber.jsonfilter.test.JsonFilterDirectoryUnitTestCollectionRunner; -import com.github.skjolber.jsonfilter.test.jackson.JsonValidator; - -public class AbstractSinglePathJsonFilterTest { - - public class DefaultSinglePathJsonFilter extends AbstractSinglePathJsonFilter { - - public DefaultSinglePathJsonFilter(int maxScalarLength, String expression, FilterType type) { - super(maxScalarLength, -1, -1, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - @Override - public boolean process(char[] chars, int offset, int length, StringBuilder output) { - if(JsonValidator.isWellformed(new String(chars, offset, length))) { - output.append(chars, offset, length); - - return true; - } - return false; - } - - @Override - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output) { - if(JsonValidator.isWellformed(new String(chars, offset, length))) { - output.write(chars, offset, length); - - return true; - } - return false; - } - - @Override - public boolean process(char[] chars, int offset, int length, StringBuilder output, - JsonFilterMetrics filterMetrics) { - return false; - } - - @Override - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output, - JsonFilterMetrics filterMetrics) { - return false; - } - - }; - - @Test - public void construct_invalidAnonymizePath_throwsException() { - Assertions.assertThrows(IllegalArgumentException.class, () -> { - new DefaultSinglePathJsonFilter(-1, INVALID_PATH, FilterType.ANON); - }); - } - - @Test - public void construct_invalidPrunePath_throwsException() { - Assertions.assertThrows(IllegalArgumentException.class, () -> { - new DefaultSinglePathJsonFilter(-1, INVALID_PATH, FilterType.PRUNE); - }); - } - - @Test - public void construct_validPrunePath_constructed() { - DefaultSinglePathJsonFilter filter = new DefaultSinglePathJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.PRUNE); - assertThat(filter.getPruneFilters()[0]).isEqualTo(PASSTHROUGH_XPATH); - assertThat(filter.getAnonymizeFilters().length).isEqualTo(0); - } - - @Test - public void construct_validAnonymizePath_constructed() { - DefaultSinglePathJsonFilter filter = new DefaultSinglePathJsonFilter(-1, PASSTHROUGH_XPATH, FilterType.ANON); - - assertThat(filter.getAnonymizeFilters()[0]).isEqualTo(PASSTHROUGH_XPATH); - assertThat(filter.getPruneFilters().length).isEqualTo(0); - } - - -} diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleStringFullPathJsonFilterTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleStringFullPathJsonFilterTest.java deleted file mode 100644 index 1fd586ed..00000000 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/AbstractSingleStringFullPathJsonFilterTest.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.github.skjolber.jsonfilter.base; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import java.io.ByteArrayOutputStream; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.JsonFilterMetrics; -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; - -public class AbstractSingleStringFullPathJsonFilterTest { - - private static class MySingleStringPathJsonFilter extends AbstractSingleStringFullPathJsonFilter { - - public MySingleStringPathJsonFilter(int maxStringLength, String expression, FilterType type) { - super(maxStringLength, -1, -1, expression, type, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); - } - - @Override - public boolean process(char[] chars, int offset, int length, StringBuilder output) { - return false; - } - - @Override - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output) { - return false; - } - - public String[] getPaths() { - return paths; - } - - @Override - public boolean process(char[] chars, int offset, int length, StringBuilder output, - JsonFilterMetrics filterMetrics) { - return false; - } - - @Override - public boolean process(byte[] chars, int offset, int length, ResizableByteArrayOutputStream output, - JsonFilterMetrics filterMetrics) { - return false; - } - } - - @Test - public void testFullPathThrowsException() { - Assertions.assertThrows(IllegalArgumentException.class, () -> { - new MySingleStringPathJsonFilter(-1, "//abc", FilterType.ANON); - }); - } - - @Test - public void testFullPath() { - String[] paths = new MySingleStringPathJsonFilter(-1, "/abc", FilterType.ANON).getPaths(); - assertEquals(new String(paths[1]), "abc"); - } -} diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/AbstractPathTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/AbstractPathTest.java similarity index 95% rename from base/src/test/java/com/github/skjolber/jsonfilter/base/match/AbstractPathTest.java rename to base/src/test/java/com/github/skjolber/jsonfilter/base/path/AbstractPathTest.java index 80bccb69..12824c4a 100644 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/AbstractPathTest.java +++ b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/AbstractPathTest.java @@ -1,4 +1,4 @@ -package com.github.skjolber.jsonfilter.base.match; +package com.github.skjolber.jsonfilter.base.path; import java.nio.charset.StandardCharsets; diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/EndPathItemTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/EndPathItemTest.java similarity index 92% rename from base/src/test/java/com/github/skjolber/jsonfilter/base/match/EndPathItemTest.java rename to base/src/test/java/com/github/skjolber/jsonfilter/base/path/EndPathItemTest.java index eb494af5..2b35916b 100644 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/EndPathItemTest.java +++ b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/EndPathItemTest.java @@ -1,4 +1,4 @@ -package com.github.skjolber.jsonfilter.base.match; +package com.github.skjolber.jsonfilter.base.path; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/ExpressionNodeFactoryTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/ExpressionNodeFactoryTest.java similarity index 98% rename from base/src/test/java/com/github/skjolber/jsonfilter/base/match/ExpressionNodeFactoryTest.java rename to base/src/test/java/com/github/skjolber/jsonfilter/base/path/ExpressionNodeFactoryTest.java index b4e11ded..b10ff32d 100644 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/ExpressionNodeFactoryTest.java +++ b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/ExpressionNodeFactoryTest.java @@ -1,4 +1,4 @@ -package com.github.skjolber.jsonfilter.base.match; +package com.github.skjolber.jsonfilter.base.path; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/MultiPathItemTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/MultiPathItemTest.java similarity index 92% rename from base/src/test/java/com/github/skjolber/jsonfilter/base/match/MultiPathItemTest.java rename to base/src/test/java/com/github/skjolber/jsonfilter/base/path/MultiPathItemTest.java index 9b91d3f2..67aef26d 100644 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/MultiPathItemTest.java +++ b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/MultiPathItemTest.java @@ -1,4 +1,4 @@ -package com.github.skjolber.jsonfilter.base.match; +package com.github.skjolber.jsonfilter.base.path; import static org.junit.jupiter.api.Assertions.assertSame; diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/PathItemFactoryTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/PathItemFactoryTest.java similarity index 99% rename from base/src/test/java/com/github/skjolber/jsonfilter/base/match/PathItemFactoryTest.java rename to base/src/test/java/com/github/skjolber/jsonfilter/base/path/PathItemFactoryTest.java index 0611625d..336db25a 100644 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/PathItemFactoryTest.java +++ b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/PathItemFactoryTest.java @@ -1,4 +1,4 @@ -package com.github.skjolber.jsonfilter.base.match; +package com.github.skjolber.jsonfilter.base.path; import static org.junit.Assert.assertNotNull; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/PathItemTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/PathItemTest.java similarity index 98% rename from base/src/test/java/com/github/skjolber/jsonfilter/base/match/PathItemTest.java rename to base/src/test/java/com/github/skjolber/jsonfilter/base/path/PathItemTest.java index eefce90d..77536712 100644 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/PathItemTest.java +++ b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/PathItemTest.java @@ -1,4 +1,4 @@ -package com.github.skjolber.jsonfilter.base.match; +package com.github.skjolber.jsonfilter.base.path; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertSame; diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/SinglePathItemTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/SinglePathItemTest.java similarity index 90% rename from base/src/test/java/com/github/skjolber/jsonfilter/base/match/SinglePathItemTest.java rename to base/src/test/java/com/github/skjolber/jsonfilter/base/path/SinglePathItemTest.java index 488135c1..5e39774b 100644 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/SinglePathItemTest.java +++ b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/SinglePathItemTest.java @@ -1,4 +1,4 @@ -package com.github.skjolber.jsonfilter.base.match; +package com.github.skjolber.jsonfilter.base.path; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertSame; diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/StarMultiPathItemTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/StarMultiPathItemTest.java similarity index 95% rename from base/src/test/java/com/github/skjolber/jsonfilter/base/match/StarMultiPathItemTest.java rename to base/src/test/java/com/github/skjolber/jsonfilter/base/path/StarMultiPathItemTest.java index 4cf532de..50b5d59e 100644 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/StarMultiPathItemTest.java +++ b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/StarMultiPathItemTest.java @@ -1,4 +1,4 @@ -package com.github.skjolber.jsonfilter.base.match; +package com.github.skjolber.jsonfilter.base.path; import static org.junit.jupiter.api.Assertions.assertSame; diff --git a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/StarPathItemTest.java b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/StarPathItemTest.java similarity index 92% rename from base/src/test/java/com/github/skjolber/jsonfilter/base/match/StarPathItemTest.java rename to base/src/test/java/com/github/skjolber/jsonfilter/base/path/StarPathItemTest.java index d90633c1..ca4f2cbd 100644 --- a/base/src/test/java/com/github/skjolber/jsonfilter/base/match/StarPathItemTest.java +++ b/base/src/test/java/com/github/skjolber/jsonfilter/base/path/StarPathItemTest.java @@ -1,4 +1,4 @@ -package com.github.skjolber.jsonfilter.base.match; +package com.github.skjolber.jsonfilter.base.path; import static org.junit.jupiter.api.Assertions.assertSame; diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractAnyPathFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractAnyPathFilterBenchmark.java index 05edfbb9..a98c6a93 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractAnyPathFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractAnyPathFilterBenchmark.java @@ -16,7 +16,7 @@ import com.github.skjolber.jsonfilter.JsonFilter; import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonMultiAnyPathMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.jackson.JacksonAnyPathMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jmh.asm.DynamicClassLoader; import com.github.skjolber.jsonfilter.jmh.asm.RemoveStaticMethodLabelsClassVisitor; @@ -35,7 +35,7 @@ public void init() throws Exception { String[] paths = new String[]{path}; - jacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMultiAnyPathMaxStringLengthJsonFilter(-1, type == FilterType.ANON ? paths : null, type == FilterType.PRUNE ? paths : null), true, false); + jacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonAnyPathMaxStringLengthJsonFilter(-1, type == FilterType.ANON ? paths : null, type == FilterType.PRUNE ? paths : null), true, false); coreMultipleJsonFilter = new BenchmarkRunner<>(file, true, new AnyPathJsonFilter(-1, type == FilterType.ANON ? paths : null, type == FilterType.PRUNE ? paths : null), true, false); JsonFilter filter = null; diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractMultiPathMaxSizeMaxStringLengthFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractPathMaxSizeMaxStringLengthFilterBenchmark.java similarity index 71% rename from benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractMultiPathMaxSizeMaxStringLengthFilterBenchmark.java rename to benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractPathMaxSizeMaxStringLengthFilterBenchmark.java index 09f6a130..e607dbf4 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractMultiPathMaxSizeMaxStringLengthFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractPathMaxSizeMaxStringLengthFilterBenchmark.java @@ -6,12 +6,12 @@ import org.openjdk.jmh.annotations.Setup; import com.github.skjolber.jsonfilter.JsonFilter; -import com.github.skjolber.jsonfilter.core.MultiPathMaxSizeMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.core.ws.MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonMultiPathMaxSizeMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.core.PathMaxSizeMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.core.ws.PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter; +import com.github.skjolber.jsonfilter.jackson.JacksonPathMaxSizeMaxStringLengthJsonFilter; -public abstract class AbstractMultiPathMaxSizeMaxStringLengthFilterBenchmark { +public abstract class AbstractPathMaxSizeMaxStringLengthFilterBenchmark { protected JacksonBenchmarkRunner jacksonJsonFilter; protected BenchmarkRunner coreJsonFilter; @@ -35,9 +35,9 @@ public void init() throws Exception { String[] anon = getAnon(); String[] prune = getPrune(); - jacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMultiPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, anon, prune), true, false); - coreJsonFilter = new BenchmarkRunner<>(file, true, new MultiPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, -1, anon, prune), true, false); - coreRemoveWhitespaceJsonFilter = new BenchmarkRunner<>(file, true, new MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(maxStringLength, maxSize, -1, anon, prune), true, false); + jacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, anon, prune), true, false); + coreJsonFilter = new BenchmarkRunner<>(file, true, new PathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, -1, anon, prune), true, false); + coreRemoveWhitespaceJsonFilter = new BenchmarkRunner<>(file, true, new PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(maxStringLength, maxSize, -1, anon, prune), true, false); } protected abstract int getMaxSize(int minimum); diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractMultiPathMaxStringLengthFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractPathMaxStringLengthFilterBenchmark.java similarity index 71% rename from benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractMultiPathMaxStringLengthFilterBenchmark.java rename to benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractPathMaxStringLengthFilterBenchmark.java index 713f503c..71004895 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractMultiPathMaxStringLengthFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AbstractPathMaxStringLengthFilterBenchmark.java @@ -6,12 +6,12 @@ import org.openjdk.jmh.annotations.Setup; import com.github.skjolber.jsonfilter.JsonFilter; -import com.github.skjolber.jsonfilter.core.MultiPathMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.core.ws.MultiPathMaxStringLengthRemoveWhitespaceJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonMultiPathMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.core.PathMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.core.ws.PathMaxStringLengthRemoveWhitespaceJsonFilter; +import com.github.skjolber.jsonfilter.jackson.JacksonPathMaxStringLengthJsonFilter; -public abstract class AbstractMultiPathMaxStringLengthFilterBenchmark { +public abstract class AbstractPathMaxStringLengthFilterBenchmark { protected JacksonBenchmarkRunner jacksonJsonFilter; protected BenchmarkRunner coreJsonFilter; @@ -26,9 +26,9 @@ public void init() throws Exception { String[] anon = getAnon(); String[] prune = getPrune(); - jacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMultiPathMaxStringLengthJsonFilter(maxStringLength, anon, prune), true, false); - coreJsonFilter = new BenchmarkRunner<>(file, true, new MultiPathMaxStringLengthJsonFilter(maxStringLength, -1, anon, prune), true, false); - coreRemoveWhitespaceJsonFilter = new BenchmarkRunner<>(file, true, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(maxStringLength, -1, anon, prune), true, false); + jacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxStringLengthJsonFilter(maxStringLength, anon, prune), true, false); + coreJsonFilter = new BenchmarkRunner<>(file, true, new PathMaxStringLengthJsonFilter(maxStringLength, -1, anon, prune), true, false); + coreRemoveWhitespaceJsonFilter = new BenchmarkRunner<>(file, true, new PathMaxStringLengthRemoveWhitespaceJsonFilter(maxStringLength, -1, anon, prune), true, false); } protected abstract String[] getPrune(); diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java index 378ac2db..d99398a8 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java @@ -27,16 +27,16 @@ import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; import com.github.skjolber.jsonfilter.core.MaxSizeJsonFilter; import com.github.skjolber.jsonfilter.core.MaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.core.MultiFullPathJsonFilter; -import com.github.skjolber.jsonfilter.core.MultiPathJsonFilter; -import com.github.skjolber.jsonfilter.core.MultiPathMaxSizeMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.core.MultiPathMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.core.FullPathJsonFilter; +import com.github.skjolber.jsonfilter.core.PathJsonFilter; +import com.github.skjolber.jsonfilter.core.PathMaxSizeMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.core.PathMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMaxSizeJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonMultiAnyPathMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonMultiPathMaxSizeMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonMultiPathMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.jackson.JacksonAnyPathMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.jackson.JacksonPathMaxSizeMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.jackson.JacksonPathMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jmh.filter.PrimitiveJsonPropertyBodyFilter; import com.github.skjolber.jsonfilter.jmh.utils.JsonMaskerJsonFilter; @@ -92,9 +92,9 @@ public void init() throws Exception { // generic filters // jackson - jacksonMultiPathMaxSizeMaxStringLengthJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMultiPathMaxSizeMaxStringLengthJsonFilter(20, -1, new String[] {xpath}, null), prettyPrinted); - multiPathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMultiPathMaxStringLengthJsonFilter(20, new String[] {xpath}, null), prettyPrinted); - multiAnyPathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMultiAnyPathMaxStringLengthJsonFilter(20, new String[] {DEFAULT_ANY_XPATH}, null), prettyPrinted); + jacksonMultiPathMaxSizeMaxStringLengthJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxSizeMaxStringLengthJsonFilter(20, -1, new String[] {xpath}, null), prettyPrinted); + multiPathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxStringLengthJsonFilter(20, new String[] {xpath}, null), prettyPrinted); + multiAnyPathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonAnyPathMaxStringLengthJsonFilter(20, new String[] {DEFAULT_ANY_XPATH}, null), prettyPrinted); maxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMaxStringLengthJsonFilter(20), prettyPrinted); maxSizeJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMaxSizeJsonFilter(128), prettyPrinted); @@ -106,12 +106,12 @@ public void init() throws Exception { anyPathAnonymizeJsonFilter = new BenchmarkRunner(file, true, new AnyPathJsonFilter(-1, new String[]{DEFAULT_ANY_XPATH}, null), prettyPrinted); // path - multiple - multiPathAnonymizeJsonFilter = new BenchmarkRunner(file, true, new MultiPathJsonFilter(-1, new String[]{xpath}, null), prettyPrinted); - multiPathMaxStringLengthAnonymizeJsonFilter = new BenchmarkRunner(file, true, new MultiPathMaxStringLengthJsonFilter(20, -1, new String[]{xpath}, null), prettyPrinted); - multiPathAnonymizeFullPathJsonFilter = new BenchmarkRunner(file, true, new MultiFullPathJsonFilter(-1, new String[]{xpath}, null), prettyPrinted); + multiPathAnonymizeJsonFilter = new BenchmarkRunner(file, true, new PathJsonFilter(-1, new String[]{xpath}, null), prettyPrinted); + multiPathMaxStringLengthAnonymizeJsonFilter = new BenchmarkRunner(file, true, new PathMaxStringLengthJsonFilter(20, -1, new String[]{xpath}, null), prettyPrinted); + multiPathAnonymizeFullPathJsonFilter = new BenchmarkRunner(file, true, new FullPathJsonFilter(-1, new String[]{xpath}, null), prettyPrinted); // max size - multiPathAnonymizeMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new MultiPathMaxSizeMaxStringLengthJsonFilter(20, -1, -1, new String[]{xpath}, null), prettyPrinted); + multiPathAnonymizeMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new PathMaxSizeMaxStringLengthJsonFilter(20, -1, -1, new String[]{xpath}, null), prettyPrinted); // other filters Set hashSet = new HashSet<>(); diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java index 1814f2e4..11cf1b35 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java @@ -29,7 +29,7 @@ import com.github.skjolber.jsonfilter.core.MaxSizeJsonFilter; import com.github.skjolber.jsonfilter.core.MaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.core.MaxStringLengthMaxSizeJsonFilter; -import com.github.skjolber.jsonfilter.core.MultiPathMaxSizeMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.core.PathMaxSizeMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MaxSizeRemoveWhitespaceJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MaxStringLengthMaxSizeRemoveWhitespaceJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MaxStringLengthRemoveWhitespaceJsonFilter; @@ -38,7 +38,7 @@ import com.github.skjolber.jsonfilter.jackson.JacksonJsonLogFilterBuilder; import com.github.skjolber.jsonfilter.jackson.JacksonMaxSizeJsonFilter; import com.github.skjolber.jsonfilter.jackson.JacksonMaxSizeMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonMultiPathMaxSizeMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.jackson.JacksonPathMaxSizeMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jmh.utils.JsonMaskerJsonFilter; import dev.blaauwendraad.masker.json.JsonMasker; @@ -77,9 +77,6 @@ public class CveFilterBenchmark { private BenchmarkRunner maxStringLengthMaxSizeRemoveWhitespaceJsonFilter; private BenchmarkRunner maxStringLengthMaxSizeJacksonJsonFilter; - private BenchmarkRunner singlePathMaxStringLengthJsonFilter; - private BenchmarkRunner singlePathMaxStringLengthJacksonJsonFilter; - private JacksonBenchmarkRunner maxSizeJacksonJsonFilter; private BenchmarkRunner maxSizeJsonFilter; private BenchmarkRunner maxSizeRemoveWhitespaceJsonFilter; @@ -101,15 +98,12 @@ public void init() throws Exception { //BodyFilter maxLength = JsonPathBodyFilters.jsonPath("$..*[?(@.* =~ /^[\\w\\W]{" + maxStringLength + ",}$/)]").replace("..removed"); int size = Integer.parseInt(fileName.substring(0, fileName.length() - 2)) * 1024 - 1; - jacksonMultiPathMaxSizeMaxStringLengthJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMultiPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, anon, prune), prettyPrinted); - multiPathMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new MultiPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, -1, anon, prune), prettyPrinted); + jacksonMultiPathMaxSizeMaxStringLengthJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, anon, prune), prettyPrinted); + multiPathMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new PathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, -1, anon, prune), prettyPrinted); multiPathMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, (JacksonJsonFilter) new JacksonJsonLogFilterBuilder().withMaxStringLength(maxStringLength).withAnonymize(anon).withPrune(prune).build(), prettyPrinted); multiPathMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new DefaultJsonLogFilterBuilder().withMaxStringLength(maxStringLength).withAnonymize(anon).withPrune(prune).build(), prettyPrinted); - singlePathMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, (JacksonJsonFilter) new JacksonJsonLogFilterBuilder().withMaxStringLength(maxStringLength).withAnonymize(anon[0]).build(), prettyPrinted); - singlePathMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new DefaultJsonLogFilterBuilder().withMaxStringLength(maxStringLength).withAnonymize(anon[0]).build(), prettyPrinted); - maxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, (JacksonJsonFilter) new JacksonJsonLogFilterBuilder().withMaxStringLength(maxStringLength).build(), prettyPrinted); maxStringLengthJsonFilter = new BenchmarkRunner(file, true, new MaxStringLengthJsonFilter(maxStringLength), prettyPrinted); maxStringLengthRemoveWhitespaceJsonFilter = new BenchmarkRunner(file, true, new MaxStringLengthRemoveWhitespaceJsonFilter(maxStringLength), prettyPrinted); @@ -172,15 +166,6 @@ public long maxStringLength_core_remove_whitespace() throws IOException { return maxStringLengthRemoveWhitespaceJsonFilter.benchmarkBytes(); } - @Benchmark - public long anon_single_jackson() throws IOException { - return singlePathMaxStringLengthJacksonJsonFilter.benchmarkBytes(); - } - - @Benchmark - public long anon_single_core() throws IOException { - return singlePathMaxStringLengthJsonFilter.benchmarkBytes(); - } @Benchmark public long maxSize_core() throws IOException { return maxSizeJsonFilter.benchmarkBytes(); diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/ScratchFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/ScratchFilterBenchmark.java index d31495ad..6f0a751c 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/ScratchFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/ScratchFilterBenchmark.java @@ -26,7 +26,7 @@ import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; import com.github.skjolber.jsonfilter.core.MaxSizeJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonMultiAnyPathMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.jackson.JacksonAnyPathMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jmh.utils.JsonMaskerJsonFilter; import dev.blaauwendraad.masker.json.JsonMasker; @@ -93,7 +93,7 @@ public void init() throws Exception { original = new BenchmarkRunner(file, true, new AnyPathJsonFilter(-1, new String[]{"//" + key}, null), true, prettyPrint); modified1 = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(masker), true, prettyPrint); - modified2 = new BenchmarkRunner(file, true, new JacksonMultiAnyPathMaxStringLengthJsonFilter(-1, new String[] {DEFAULT_ANY_XPATH}, null), true, prettyPrint); + modified2 = new BenchmarkRunner(file, true, new JacksonAnyPathMaxStringLengthJsonFilter(-1, new String[] {DEFAULT_ANY_XPATH}, null), true, prettyPrint); diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveMultiPathMaxSizeMaxStringLengthFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CvePathMaxSizeMaxStringLengthFilterBenchmark.java similarity index 81% rename from benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveMultiPathMaxSizeMaxStringLengthFilterBenchmark.java rename to benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CvePathMaxSizeMaxStringLengthFilterBenchmark.java index 16069223..5953f270 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveMultiPathMaxSizeMaxStringLengthFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CvePathMaxSizeMaxStringLengthFilterBenchmark.java @@ -17,7 +17,7 @@ import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; -import com.github.skjolber.jsonfilter.jmh.AbstractMultiPathMaxSizeMaxStringLengthFilterBenchmark; +import com.github.skjolber.jsonfilter.jmh.AbstractPathMaxSizeMaxStringLengthFilterBenchmark; @State(Scope.Thread) @@ -27,7 +27,7 @@ @Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) @Fork(1) -public class CveMultiPathMaxSizeMaxStringLengthFilterBenchmark extends AbstractMultiPathMaxSizeMaxStringLengthFilterBenchmark { +public class CvePathMaxSizeMaxStringLengthFilterBenchmark extends AbstractPathMaxSizeMaxStringLengthFilterBenchmark { private static String[] anon = new String[] {"/CVE_Items/cve/affects/vendor/vendor_data/vendor_name"}; private static String[] prune = new String[] {"/CVE_Items/cve/references", "//version"}; @@ -63,10 +63,10 @@ protected int getMaxSize(int minimum) { public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() - .include(CveMultiPathMaxSizeMaxStringLengthFilterBenchmark.class.getSimpleName()) + .include(CvePathMaxSizeMaxStringLengthFilterBenchmark.class.getSimpleName()) .warmupIterations(5) .measurementIterations(25) - .result("target/" + System.currentTimeMillis() + "." + CveMultiPathMaxSizeMaxStringLengthFilterBenchmark.class.getSimpleName() + ".json") + .result("target/" + System.currentTimeMillis() + "." + CvePathMaxSizeMaxStringLengthFilterBenchmark.class.getSimpleName() + ".json") .resultFormat(ResultFormatType.JSON) .build(); diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveMultiPathMaxStringLengthFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CvePathMaxStringLengthFilterBenchmark.java similarity index 81% rename from benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveMultiPathMaxStringLengthFilterBenchmark.java rename to benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CvePathMaxStringLengthFilterBenchmark.java index b5724890..a6483cfb 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CveMultiPathMaxStringLengthFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/cve/CvePathMaxStringLengthFilterBenchmark.java @@ -17,7 +17,7 @@ import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; -import com.github.skjolber.jsonfilter.jmh.AbstractMultiPathMaxStringLengthFilterBenchmark; +import com.github.skjolber.jsonfilter.jmh.AbstractPathMaxStringLengthFilterBenchmark; @State(Scope.Thread) @@ -27,7 +27,7 @@ @Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS) @Fork(1) -public class CveMultiPathMaxStringLengthFilterBenchmark extends AbstractMultiPathMaxStringLengthFilterBenchmark { +public class CvePathMaxStringLengthFilterBenchmark extends AbstractPathMaxStringLengthFilterBenchmark { private static String[] anon = new String[] {"/CVE_Items/cve/affects/vendor/vendor_data/vendor_name"}; private static String[] prune = new String[] {"/CVE_Items/cve/references", "//version"}; @@ -57,10 +57,10 @@ protected String[] getAnon() { public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() - .include(CveMultiPathMaxStringLengthFilterBenchmark.class.getSimpleName()) + .include(CvePathMaxStringLengthFilterBenchmark.class.getSimpleName()) .warmupIterations(5) .measurementIterations(2) - .result("target/" + System.currentTimeMillis() + "." + CveMultiPathMaxStringLengthFilterBenchmark.class.getSimpleName() + ".json") + .result("target/" + System.currentTimeMillis() + "." + CvePathMaxStringLengthFilterBenchmark.class.getSimpleName() + ".json") .resultFormat(ResultFormatType.JSON) .build(); diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java index 4d4d03d0..c4317fab 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java @@ -32,7 +32,7 @@ import com.github.skjolber.jsonfilter.base.path.any.AnyPathFilters; import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; import com.github.skjolber.jsonfilter.core.MaxSizeJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonMultiAnyPathMaxStringLengthJsonFilter; +import com.github.skjolber.jsonfilter.jackson.JacksonAnyPathMaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.jmh.utils.JsonMaskerJsonFilter; import dev.blaauwendraad.masker.json.JsonMasker; diff --git a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiAnyPathMaxStringLengthJsonFilter.java b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonAnyPathMaxStringLengthJsonFilter.java similarity index 85% rename from frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiAnyPathMaxStringLengthJsonFilter.java rename to frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonAnyPathMaxStringLengthJsonFilter.java index 2bce74da..e12a1c03 100644 --- a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiAnyPathMaxStringLengthJsonFilter.java +++ b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonAnyPathMaxStringLengthJsonFilter.java @@ -19,24 +19,24 @@ * */ -public class JacksonMultiAnyPathMaxStringLengthJsonFilter extends AbstractMultiPathJsonFilter implements JacksonJsonFilter { +public class JacksonAnyPathMaxStringLengthJsonFilter extends AbstractMultiPathJsonFilter implements JacksonJsonFilter { protected final JsonFactory jsonFactory; private final Map fields; - public JacksonMultiAnyPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes) { + public JacksonAnyPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes) { this(maxStringLength, anonymizes, prunes, new JsonFactory()); } - public JacksonMultiAnyPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, JsonFactory jsonFactory) { + public JacksonAnyPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, JsonFactory jsonFactory) { this(maxStringLength, anonymizes, prunes, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE, jsonFactory); } - public JacksonMultiAnyPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { + public JacksonAnyPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { this(maxStringLength, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage, new JsonFactory()); } - public JacksonMultiAnyPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { + public JacksonAnyPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { super(maxStringLength, -1, -1, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); this.jsonFactory = jsonFactory; @@ -51,7 +51,8 @@ public JacksonMultiAnyPathMaxStringLengthJsonFilter(int maxStringLength, String[ if(!hasAnyPrefix(prunes[i])) { throw new IllegalArgumentException("Only any-element expression expected"); } - fields.put(prunes[i].substring(2), FilterType.PRUNE); + String name = removeAnyPrefix(prunes[i]); + fields.put(name, FilterType.PRUNE); } } @@ -60,7 +61,8 @@ public JacksonMultiAnyPathMaxStringLengthJsonFilter(int maxStringLength, String[ if(!hasAnyPrefix(anonymizes[i])) { throw new IllegalArgumentException("Only any-element expression expected"); } - fields.put(anonymizes[i].substring(2), FilterType.ANON); + String name = removeAnyPrefix(anonymizes[i]); + fields.put(name, FilterType.ANON); } } } diff --git a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonFilterFactory.java b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonFilterFactory.java index e06591c3..e7709f77 100644 --- a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonFilterFactory.java +++ b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonJsonFilterFactory.java @@ -73,14 +73,14 @@ public JsonFilter newJsonFilter() { if(!isFullPrefix(anonymizeFilters) && !isFullPrefix(pruneFilters)) { // TODO multi any max size if(!isActiveMaxSize()) { - return new JacksonMultiAnyPathMaxStringLengthJsonFilter(maxStringLength, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); + return new JacksonAnyPathMaxStringLengthJsonFilter(maxStringLength, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } } if(isActiveMaxSize()) { - return new JacksonMultiPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); + return new JacksonPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } - return new JacksonMultiPathMaxStringLengthJsonFilter(maxStringLength, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); + return new JacksonPathMaxStringLengthJsonFilter(maxStringLength, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } if(isActiveMaxStringLength()) { if(isActiveMaxSize()) { diff --git a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxSizeMaxStringLengthJsonFilter.java b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxSizeMaxStringLengthJsonFilter.java similarity index 91% rename from frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxSizeMaxStringLengthJsonFilter.java rename to frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxSizeMaxStringLengthJsonFilter.java index 136f9854..088d4b20 100644 --- a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxSizeMaxStringLengthJsonFilter.java +++ b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxSizeMaxStringLengthJsonFilter.java @@ -12,21 +12,21 @@ import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; import com.github.skjolber.jsonfilter.base.path.PathItem; -public class JacksonMultiPathMaxSizeMaxStringLengthJsonFilter extends JacksonMultiPathMaxStringLengthJsonFilter implements JacksonJsonFilter { +public class JacksonPathMaxSizeMaxStringLengthJsonFilter extends JacksonPathMaxStringLengthJsonFilter implements JacksonJsonFilter { - public JacksonMultiPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String[] anonymizes, String[] prunes) { + public JacksonPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String[] anonymizes, String[] prunes) { this(maxStringLength, maxSize, anonymizes, prunes, new JsonFactory()); } - public JacksonMultiPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String[] anonymizes, String[] prunes, JsonFactory jsonFactory) { + public JacksonPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String[] anonymizes, String[] prunes, JsonFactory jsonFactory) { this(maxStringLength, maxSize, anonymizes, prunes, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE, jsonFactory); } - protected JacksonMultiPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { + protected JacksonPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { this(maxStringLength, maxSize, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage, new JsonFactory()); } - protected JacksonMultiPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { + protected JacksonPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { super(maxStringLength, maxSize, -1, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage, jsonFactory); } diff --git a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxStringLengthJsonFilter.java b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxStringLengthJsonFilter.java similarity index 87% rename from frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxStringLengthJsonFilter.java rename to frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxStringLengthJsonFilter.java index 7e562169..2969bc29 100644 --- a/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxStringLengthJsonFilter.java +++ b/frameworks/jackson/src/main/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxStringLengthJsonFilter.java @@ -12,27 +12,27 @@ import com.github.skjolber.jsonfilter.base.AbstractMultiPathJsonFilter; import com.github.skjolber.jsonfilter.base.path.PathItem; -public class JacksonMultiPathMaxStringLengthJsonFilter extends AbstractMultiPathJsonFilter implements JacksonJsonFilter { +public class JacksonPathMaxStringLengthJsonFilter extends AbstractMultiPathJsonFilter implements JacksonJsonFilter { protected final JsonFactory jsonFactory; - public JacksonMultiPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes) { + public JacksonPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes) { this(maxStringLength, anonymizes, prunes, new JsonFactory()); } - public JacksonMultiPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, JsonFactory jsonFactory) { + public JacksonPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, JsonFactory jsonFactory) { this(maxStringLength, anonymizes, prunes, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE, jsonFactory); } - public JacksonMultiPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { + public JacksonPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { this(maxStringLength, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage, new JsonFactory()); } - public JacksonMultiPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { + public JacksonPathMaxStringLengthJsonFilter(int maxStringLength, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { this(maxStringLength, -1, -1, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage, jsonFactory); } - protected JacksonMultiPathMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, + protected JacksonPathMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage, JsonFactory jsonFactory) { super(maxStringLength, maxSize, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); diff --git a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiAnyPathMaxStringLengthJsonFilterTest.java b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonAnyPathMaxStringLengthJsonFilterTest.java similarity index 59% rename from frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiAnyPathMaxStringLengthJsonFilterTest.java rename to frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonAnyPathMaxStringLengthJsonFilterTest.java index 91398630..7c3c9ab7 100644 --- a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiAnyPathMaxStringLengthJsonFilterTest.java +++ b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonAnyPathMaxStringLengthJsonFilterTest.java @@ -16,43 +16,43 @@ import com.fasterxml.jackson.core.JsonParser; import com.github.skjolber.jsonfilter.JsonFilterMetrics; -public class JacksonMultiAnyPathMaxStringLengthJsonFilterTest extends AbstractDefaultJacksonJsonFilterTest { +public class JacksonAnyPathMaxStringLengthJsonFilterTest extends AbstractDefaultJacksonJsonFilterTest { - public JacksonMultiAnyPathMaxStringLengthJsonFilterTest() throws Exception { + public JacksonAnyPathMaxStringLengthJsonFilterTest() throws Exception { super(true); } @Test public void testConstructor() { assertThrows(IllegalArgumentException.class, () -> { - assertThat(new JacksonMultiAnyPathMaxStringLengthJsonFilter(-1, new String[] {PASSTHROUGH_XPATH}, null)).hasPassthrough(); + assertThat(new JacksonAnyPathMaxStringLengthJsonFilter(-1, new String[] {PASSTHROUGH_XPATH}, null)).hasPassthrough(); }); } @Test public void passthrough_success() throws Exception { - assertThat(new JacksonMultiAnyPathMaxStringLengthJsonFilter(-1, null, null)).hasPassthrough(); - assertThat(new JacksonMultiAnyPathMaxStringLengthJsonFilter(-1, new String[]{ANY_PASSTHROUGH_XPATH}, new String[]{ANY_PASSTHROUGH_XPATH})).hasPassthrough(); + assertThat(new JacksonAnyPathMaxStringLengthJsonFilter(-1, null, null)).hasPassthrough(); + assertThat(new JacksonAnyPathMaxStringLengthJsonFilter(-1, new String[]{ANY_PASSTHROUGH_XPATH}, new String[]{ANY_PASSTHROUGH_XPATH})).hasPassthrough(); } @Test public void anonymizeAny() throws Exception { - assertThat(new JacksonMultiAnyPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH); + assertThat(new JacksonAnyPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH); } @Test public void pruneAny() throws Exception { - assertThat(new JacksonMultiAnyPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH); + assertThat(new JacksonAnyPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH); } @Test public void maxStringLength() throws Exception { - assertThat(new JacksonMultiAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH); + assertThat(new JacksonAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH); } @Test public void maxStringLengthAnonymizePrune() throws Exception { - assertThat(new JacksonMultiAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, new String[]{"//key1"}, new String[]{"//key3"})) + assertThat(new JacksonAnyPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, new String[]{"//key1"}, new String[]{"//key3"})) .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) .hasPruned("//key3") .hasAnonymized("//key1"); @@ -65,17 +65,17 @@ public void testConvenienceMethods() throws IOException { when(jsonFactory.createGenerator(any(ByteArrayOutputStream.class))).thenThrow(new RuntimeException()); testConvenienceMethods( - new JacksonMultiAnyPathMaxStringLengthJsonFilter(-1, null, null) { + new JacksonAnyPathMaxStringLengthJsonFilter(-1, null, null) { public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { return true; } }, - new JacksonMultiAnyPathMaxStringLengthJsonFilter(-1, null, null) { + new JacksonAnyPathMaxStringLengthJsonFilter(-1, null, null) { public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { throw new RuntimeException(); } }, - new JacksonMultiAnyPathMaxStringLengthJsonFilter(-1, null, null, jsonFactory) { + new JacksonAnyPathMaxStringLengthJsonFilter(-1, null, null, jsonFactory) { public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { throw new RuntimeException(); } diff --git a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxStringLengthJsonFilterTest.java b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxStringLengthJsonFilterTest.java deleted file mode 100644 index ec88b241..00000000 --- a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxStringLengthJsonFilterTest.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.github.skjolber.jsonfilter.jackson; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -import org.apache.commons.io.output.StringBuilderWriter; -import org.junit.jupiter.api.Test; - -import com.fasterxml.jackson.core.JsonFactory; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.github.skjolber.jsonfilter.JsonFilterMetrics; - -public class JacksonMultiPathMaxStringLengthJsonFilterTest extends AbstractDefaultJacksonJsonFilterTest { - - public JacksonMultiPathMaxStringLengthJsonFilterTest() throws Exception { - super(true); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, null)).hasPassthrough(); - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); - } - - @Test - public void anonymize() throws Exception { - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH); - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH); - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{DEEP_PATH1}, null)).hasAnonymized(DEEP_PATH1); - } - - @Test - public void anonymizeWildcard() throws Exception { - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH); - } - - @Test - public void anonymizeAny() throws Exception { - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH); - } - - @Test - public void prune() throws Exception { - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH); - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH); - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, new String[]{DEEP_PATH3})).hasPruned(DEEP_PATH3); - } - - @Test - public void pruneWildcard() throws Exception { - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH); - } - - @Test - public void pruneAny() throws Exception { - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH); - } - - @Test - public void maxStringLength() throws Exception { - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH); - } - - @Test - public void maxStringLengthAnonymizePrune() throws Exception { - assertThat(new JacksonMultiPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, new String[]{"/key1"}, new String[]{"/key3"})) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) - .hasPruned("/key3") - .hasAnonymized("/key1"); - } - - @Test - public void testConvenienceMethods() throws IOException { - JsonFactory jsonFactory = mock(JsonFactory.class); - when(jsonFactory.createGenerator(any(StringBuilderWriter.class))).thenThrow(new RuntimeException()); - when(jsonFactory.createGenerator(any(ByteArrayOutputStream.class))).thenThrow(new RuntimeException()); - - testConvenienceMethods( - new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, null) { - public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { - return true; - } - }, - new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, null) { - public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { - throw new RuntimeException(); - } - }, - new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, null, jsonFactory) { - public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { - throw new RuntimeException(); - } - } - ); - } - -} diff --git a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxSizeMaxStringLengthJsonFilterTest.java b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxSizeMaxStringLengthJsonFilterTest.java similarity index 70% rename from frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxSizeMaxStringLengthJsonFilterTest.java rename to frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxSizeMaxStringLengthJsonFilterTest.java index 174922e0..b203b4ca 100644 --- a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonMultiPathMaxSizeMaxStringLengthJsonFilterTest.java +++ b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxSizeMaxStringLengthJsonFilterTest.java @@ -16,9 +16,9 @@ import com.github.skjolber.jsonfilter.JsonFilterMetrics; import com.github.skjolber.jsonfilter.test.cache.MaxSizeJsonFilterPair.MaxSizeJsonFilterFunction; -public class JacksonMultiPathMaxSizeMaxStringLengthJsonFilterTest extends AbstractDefaultJacksonJsonFilterTest { +public class JacksonPathMaxSizeMaxStringLengthJsonFilterTest extends AbstractDefaultJacksonJsonFilterTest { - private static class MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter extends JacksonMultiPathMaxSizeMaxStringLengthJsonFilter { + private static class MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter extends JacksonPathMaxSizeMaxStringLengthJsonFilter { public MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, String[] anonymizes, String[] prunes, JsonFactory jsonFactory) { @@ -48,7 +48,7 @@ protected boolean mustConstrainMaxSize(int length) { } }; - public JacksonMultiPathMaxSizeMaxStringLengthJsonFilterTest() throws Exception { + public JacksonPathMaxSizeMaxStringLengthJsonFilterTest() throws Exception { super(false); } @@ -60,71 +60,71 @@ public void testMaxSize() throws IOException { @Test public void passthrough_success() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, null, null); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, null)).hasPassthrough(); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, null, null)).hasPassthrough(); maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); } @Test public void anonymize() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, new String[]{DEFAULT_PATH}, null); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH); maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH); maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, new String[]{DEEP_PATH1}, null); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{DEEP_PATH1}, null)).hasAnonymized(DEEP_PATH1); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{DEEP_PATH1}, null)).hasAnonymized(DEEP_PATH1); } @Test public void anonymizeWildcard() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, new String[]{DEFAULT_WILDCARD_PATH}, null); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH); } @Test public void anonymizeAny() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, new String[]{DEFAULT_ANY_PATH}, null); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH); } @Test public void prune() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, null, new String[]{DEFAULT_PATH}); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH); maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH); maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, null, new String[]{DEEP_PATH3}); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, new String[]{DEEP_PATH3})).hasPruned(DEEP_PATH3); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, null, new String[]{DEEP_PATH3})).hasPruned(DEEP_PATH3); } @Test public void pruneWildcard() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, null, new String[]{DEFAULT_WILDCARD_PATH}); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH); } @Test public void pruneAny() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, null, new String[]{DEFAULT_ANY_PATH}); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH); } @Test public void maxStringLength() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, null, null); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH); + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH); } @Test public void maxStringLengthAnonymizePrune() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainJacksonMultiPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, new String[]{"/key1"}, new String[]{"/key3"}); - assertThat(maxSize, new JacksonMultiPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, new String[]{"/key1"}, new String[]{"/key3"})) + assertThat(maxSize, new JacksonPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, new String[]{"/key1"}, new String[]{"/key3"})) .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) .hasPruned("/key3") .hasAnonymized("/key1"); @@ -137,17 +137,17 @@ public void testConvenienceMethods() throws IOException { when(jsonFactory.createGenerator(any(ByteArrayOutputStream.class))).thenThrow(new RuntimeException()); testConvenienceMethods( - new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, null) { + new JacksonPathMaxStringLengthJsonFilter(-1, null, null) { public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { return true; } }, - new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, null) { + new JacksonPathMaxStringLengthJsonFilter(-1, null, null) { public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { throw new RuntimeException(); } }, - new JacksonMultiPathMaxStringLengthJsonFilter(-1, null, null, jsonFactory) { + new JacksonPathMaxStringLengthJsonFilter(-1, null, null, jsonFactory) { public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { throw new RuntimeException(); } diff --git a/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxStringLengthJsonFilterTest.java b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxStringLengthJsonFilterTest.java new file mode 100644 index 00000000..4323cd4d --- /dev/null +++ b/frameworks/jackson/src/test/java/com/github/skjolber/jsonfilter/jackson/JacksonPathMaxStringLengthJsonFilterTest.java @@ -0,0 +1,102 @@ +package com.github.skjolber.jsonfilter.jackson; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import org.apache.commons.io.output.StringBuilderWriter; +import org.junit.jupiter.api.Test; + +import com.fasterxml.jackson.core.JsonFactory; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.github.skjolber.jsonfilter.JsonFilterMetrics; + +public class JacksonPathMaxStringLengthJsonFilterTest extends AbstractDefaultJacksonJsonFilterTest { + + public JacksonPathMaxStringLengthJsonFilterTest() throws Exception { + super(true); + } + + @Test + public void passthrough_success() throws Exception { + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, null, null)).hasPassthrough(); + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); + } + + @Test + public void anonymize() throws Exception { + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH); + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH); + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{DEEP_PATH1}, null)).hasAnonymized(DEEP_PATH1); + } + + @Test + public void anonymizeWildcard() throws Exception { + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH); + } + + @Test + public void anonymizeAny() throws Exception { + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH); + } + + @Test + public void prune() throws Exception { + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH); + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH); + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, null, new String[]{DEEP_PATH3})).hasPruned(DEEP_PATH3); + } + + @Test + public void pruneWildcard() throws Exception { + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH); + } + + @Test + public void pruneAny() throws Exception { + assertThat(new JacksonPathMaxStringLengthJsonFilter(-1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH); + } + + @Test + public void maxStringLength() throws Exception { + assertThat(new JacksonPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH); + } + + @Test + public void maxStringLengthAnonymizePrune() throws Exception { + assertThat(new JacksonPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, new String[]{"/key1"}, new String[]{"/key3"})) + .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) + .hasPruned("/key3") + .hasAnonymized("/key1"); + } + + @Test + public void testConvenienceMethods() throws IOException { + JsonFactory jsonFactory = mock(JsonFactory.class); + when(jsonFactory.createGenerator(any(StringBuilderWriter.class))).thenThrow(new RuntimeException()); + when(jsonFactory.createGenerator(any(ByteArrayOutputStream.class))).thenThrow(new RuntimeException()); + + testConvenienceMethods( + new JacksonPathMaxStringLengthJsonFilter(-1, null, null) { + public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { + return true; + } + }, + new JacksonPathMaxStringLengthJsonFilter(-1, null, null) { + public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { + throw new RuntimeException(); + } + }, + new JacksonPathMaxStringLengthJsonFilter(-1, null, null, jsonFactory) { + public boolean process(final JsonParser parser, JsonGenerator generator, JsonFilterMetrics metrics) throws IOException { + throw new RuntimeException(); + } + } + ); + } + +} diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesMultiPathJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesPathJsonFilter.java similarity index 91% rename from impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesMultiPathJsonFilter.java rename to impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesPathJsonFilter.java index ede75c95..13f21aab 100644 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesMultiPathJsonFilter.java +++ b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AbstractRangesPathJsonFilter.java @@ -8,9 +8,9 @@ import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; import com.github.skjolber.jsonfilter.core.util.CharArrayRangesSizeFilter; -public abstract class AbstractRangesMultiPathJsonFilter extends AbstractMultiPathJsonFilter { +public abstract class AbstractRangesPathJsonFilter extends AbstractMultiPathJsonFilter { - public AbstractRangesMultiPathJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { + public AbstractRangesPathJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { super(maxStringLength, maxSize, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); } diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AnyPathJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AnyPathJsonFilter.java index c497cc7e..9eda7137 100644 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AnyPathJsonFilter.java +++ b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/AnyPathJsonFilter.java @@ -4,7 +4,7 @@ import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -public class AnyPathJsonFilter extends AbstractRangesMultiPathJsonFilter { +public class AnyPathJsonFilter extends AbstractRangesPathJsonFilter { public AnyPathJsonFilter(int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { this(-1, -1, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactory.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactory.java index 59040e3f..4f4587ca 100644 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactory.java +++ b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactory.java @@ -23,8 +23,8 @@ import com.github.skjolber.jsonfilter.base.DefaultJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MaxStringLengthMaxSizeRemoveWhitespaceJsonFilter; import com.github.skjolber.jsonfilter.core.ws.MaxStringLengthRemoveWhitespaceJsonFilter; -import com.github.skjolber.jsonfilter.core.ws.MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter; -import com.github.skjolber.jsonfilter.core.ws.MultiPathMaxStringLengthRemoveWhitespaceJsonFilter; +import com.github.skjolber.jsonfilter.core.ws.PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter; +import com.github.skjolber.jsonfilter.core.ws.PathMaxStringLengthRemoveWhitespaceJsonFilter; import com.github.skjolber.jsonfilter.core.ws.RemoveWhitespaceJsonFilter; /** @@ -74,9 +74,9 @@ public JsonFilter newJsonFilter() { if(removeWhitespace) { // TODO more filters for removing whitespace if(isActiveMaxSize()) { - return new MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(maxStringLength, maxSize, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); + return new PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(maxStringLength, maxSize, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } - return new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(maxStringLength, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); + return new PathMaxStringLengthRemoveWhitespaceJsonFilter(maxStringLength, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } else { if(anonymizeFilters != null && AbstractPathJsonFilter.hasAllAnyPrefix(anonymizeFilters) && pruneFilters != null && AbstractPathJsonFilter.hasAllAnyPrefix(pruneFilters)) { @@ -88,20 +88,20 @@ public JsonFilter newJsonFilter() { if(isActiveMaxStringLength()) { if(isActiveMaxSize()) { - return new MultiPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); + return new PathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } - return new MultiPathMaxStringLengthJsonFilter(maxStringLength, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); + return new PathMaxStringLengthJsonFilter(maxStringLength, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } else { if(!AbstractPathJsonFilter.hasAnyPrefix(anonymizeFilters) && !AbstractPathJsonFilter.hasAnyPrefix(pruneFilters)) { if(!isActiveMaxSize()) { - return new MultiFullPathJsonFilter(maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); + return new FullPathJsonFilter(maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } } if(isActiveMaxSize()) { // TODO MultiPathJsonMaxSizeFilter - return new MultiPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); + return new PathMaxSizeMaxStringLengthJsonFilter(maxStringLength, maxSize, maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } - return new MultiPathJsonFilter(maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); + return new PathJsonFilter(maxPathMatches, anonymizeFilters, pruneFilters, pruneJsonValue, anonymizeJsonValue, truncateStringValue); } } } else if(maxPathMatches != -1) { diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiFullPathJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/FullPathJsonFilter.java similarity index 95% rename from impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiFullPathJsonFilter.java rename to impl/core/src/main/java/com/github/skjolber/jsonfilter/core/FullPathJsonFilter.java index bb7bb010..1ee684fe 100644 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiFullPathJsonFilter.java +++ b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/FullPathJsonFilter.java @@ -4,9 +4,9 @@ import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -public class MultiFullPathJsonFilter extends AbstractRangesMultiPathJsonFilter { +public class FullPathJsonFilter extends AbstractRangesPathJsonFilter { - public MultiFullPathJsonFilter(int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { + public FullPathJsonFilter(int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { super(-1, -1, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); if(anyPathFilters != null) { @@ -14,7 +14,7 @@ public MultiFullPathJsonFilter(int maxPathMatches, String[] anonymizes, String[] } } - public MultiFullPathJsonFilter(int maxPathMatches, String[] anonymizes, String[] prunes) { + public FullPathJsonFilter(int maxPathMatches, String[] anonymizes, String[] prunes) { this(maxPathMatches, anonymizes, prunes, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); } diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiPathJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/PathJsonFilter.java similarity index 95% rename from impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiPathJsonFilter.java rename to impl/core/src/main/java/com/github/skjolber/jsonfilter/core/PathJsonFilter.java index a74b1a59..83d45ef1 100644 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiPathJsonFilter.java +++ b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/PathJsonFilter.java @@ -5,13 +5,13 @@ import com.github.skjolber.jsonfilter.core.util.ByteArrayRangesFilter; import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -public class MultiPathJsonFilter extends AbstractRangesMultiPathJsonFilter { +public class PathJsonFilter extends AbstractRangesPathJsonFilter { - public MultiPathJsonFilter(int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { + public PathJsonFilter(int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { super(-1, -1, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); } - public MultiPathJsonFilter(int maxPathMatches, String[] anonymizes, String[] prunes) { + public PathJsonFilter(int maxPathMatches, String[] anonymizes, String[] prunes) { this(maxPathMatches, anonymizes, prunes, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); } diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiPathMaxSizeMaxStringLengthJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/PathMaxSizeMaxStringLengthJsonFilter.java similarity index 97% rename from impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiPathMaxSizeMaxStringLengthJsonFilter.java rename to impl/core/src/main/java/com/github/skjolber/jsonfilter/core/PathMaxSizeMaxStringLengthJsonFilter.java index f032e7ed..4a145953 100644 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiPathMaxSizeMaxStringLengthJsonFilter.java +++ b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/PathMaxSizeMaxStringLengthJsonFilter.java @@ -7,13 +7,13 @@ import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; import com.github.skjolber.jsonfilter.core.util.CharArrayRangesSizeFilter; -public class MultiPathMaxSizeMaxStringLengthJsonFilter extends MultiPathMaxStringLengthJsonFilter { +public class PathMaxSizeMaxStringLengthJsonFilter extends PathMaxStringLengthJsonFilter { - public MultiPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { + public PathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { super(maxStringLength, maxSize, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); } - public MultiPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes) { + public PathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes) { this(maxStringLength, maxSize, maxPathMatches, anonymizes, prunes, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); } diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiPathMaxStringLengthJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/PathMaxStringLengthJsonFilter.java similarity index 94% rename from impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiPathMaxStringLengthJsonFilter.java rename to impl/core/src/main/java/com/github/skjolber/jsonfilter/core/PathMaxStringLengthJsonFilter.java index 23838e72..b5ee10a5 100644 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/MultiPathMaxStringLengthJsonFilter.java +++ b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/PathMaxStringLengthJsonFilter.java @@ -5,17 +5,17 @@ import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; -public class MultiPathMaxStringLengthJsonFilter extends AbstractRangesMultiPathJsonFilter { +public class PathMaxStringLengthJsonFilter extends AbstractRangesPathJsonFilter { - public MultiPathMaxStringLengthJsonFilter(int maxStringLength, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { + public PathMaxStringLengthJsonFilter(int maxStringLength, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { this(maxStringLength, -1, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); } - public MultiPathMaxStringLengthJsonFilter(int maxStringLength, int maxPathMatches, String[] anonymizes, String[] prunes) { + public PathMaxStringLengthJsonFilter(int maxStringLength, int maxPathMatches, String[] anonymizes, String[] prunes) { this(maxStringLength, maxPathMatches, anonymizes, prunes, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); } - protected MultiPathMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, + protected PathMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { super(maxStringLength, maxSize, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); } diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter.java similarity index 97% rename from impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter.java rename to impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter.java index 73569180..099813c6 100644 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter.java +++ b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter.java @@ -14,13 +14,13 @@ import com.github.skjolber.jsonfilter.core.util.CharArrayWhitespaceFilter; import com.github.skjolber.jsonfilter.core.util.CharArrayWhitespaceSizeFilter; -public class MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter extends MultiPathMaxStringLengthRemoveWhitespaceJsonFilter { +public class PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter extends PathMaxStringLengthRemoveWhitespaceJsonFilter { - public MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { + public PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { super(maxStringLength, maxSize, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); } - public MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes) { + public PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes) { this(maxStringLength, maxSize, maxPathMatches, anonymizes, prunes, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); } diff --git a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthRemoveWhitespaceJsonFilter.java b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthRemoveWhitespaceJsonFilter.java similarity index 95% rename from impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthRemoveWhitespaceJsonFilter.java rename to impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthRemoveWhitespaceJsonFilter.java index 08f906d1..964e2243 100644 --- a/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthRemoveWhitespaceJsonFilter.java +++ b/impl/core/src/main/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthRemoveWhitespaceJsonFilter.java @@ -26,17 +26,17 @@ import com.github.skjolber.jsonfilter.core.util.CharArrayRangesFilter; import com.github.skjolber.jsonfilter.core.util.CharArrayWhitespaceFilter; -public class MultiPathMaxStringLengthRemoveWhitespaceJsonFilter extends AbstractMultiPathJsonFilter { +public class PathMaxStringLengthRemoveWhitespaceJsonFilter extends AbstractMultiPathJsonFilter { - public MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(int maxStringLength, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { + public PathMaxStringLengthRemoveWhitespaceJsonFilter(int maxStringLength, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { this(maxStringLength, -1, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); } - public MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(int maxStringLength, int maxPathMatches, String[] anonymizes, String[] prunes) { + public PathMaxStringLengthRemoveWhitespaceJsonFilter(int maxStringLength, int maxPathMatches, String[] anonymizes, String[] prunes) { this(maxStringLength, maxPathMatches, anonymizes, prunes, FILTER_PRUNE_MESSAGE_JSON, FILTER_ANONYMIZE_JSON, FILTER_TRUNCATE_MESSAGE); } - public MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, + public PathMaxStringLengthRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { super(maxStringLength, maxSize, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); } diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactoryTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactoryTest.java index 84293d93..af63cfbc 100644 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactoryTest.java +++ b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/DefaultJsonFilterFactoryTest.java @@ -87,14 +87,14 @@ public void testAnonFullPathMaxSize() { @Test public void testMultipleAnonFullPath() { factory.setAnonymize("/abc", "/def"); - MultiFullPathJsonFilter filter = (MultiFullPathJsonFilter)factory.newJsonFilter(); + FullPathJsonFilter filter = (FullPathJsonFilter)factory.newJsonFilter(); assertThat(filter.getAnonymizeFilters()).isEqualTo(new String[]{"/abc", "/def"}); } @Test public void testMultipleAnonMixedPath() { factory.setAnonymize("/abc", "//def"); - MultiPathJsonFilter filter = (MultiPathJsonFilter)factory.newJsonFilter(); + PathJsonFilter filter = (PathJsonFilter)factory.newJsonFilter(); assertThat(filter.getAnonymizeFilters()).isEqualTo(new String[]{"/abc", "//def"}); } @@ -326,7 +326,7 @@ public void testMultiplePrunesMaxSize() { @Test public void testMultiplePruneMixedPath() { factory.setPrune("/abc", "//def"); - MultiPathJsonFilter filter = (MultiPathJsonFilter)factory.newJsonFilter(); + PathJsonFilter filter = (PathJsonFilter)factory.newJsonFilter(); assertThat(filter.getPruneFilters()).isEqualTo(new String[]{"/abc", "//def"}); } diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/FullPathJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/FullPathJsonFilterTest.java new file mode 100644 index 00000000..08a4a051 --- /dev/null +++ b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/FullPathJsonFilterTest.java @@ -0,0 +1,100 @@ +package com.github.skjolber.jsonfilter.core; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; + +import java.nio.charset.StandardCharsets; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; +import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; + +public class FullPathJsonFilterTest extends DefaultJsonFilterTest { + + public FullPathJsonFilterTest() throws Exception { + super(); + } + + @Test + public void testConstructor() throws Exception { + Assertions.assertThrows(IllegalArgumentException.class, () -> { + new FullPathJsonFilter(-1, new String[]{"//abc"}, null); + }); + } + + @Test + public void passthrough_success() throws Exception { + assertThat(new FullPathJsonFilter(-1, null, null)).hasPassthrough(); + assertThat(new FullPathJsonFilter(-1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); + } + + @Test + public void exception_returns_false() throws Exception { + FullPathJsonFilter filter = new FullPathJsonFilter(-1, null, null); + assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); + assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); + } + + @Test + public void exception_incorrect_level() throws Exception { + FullPathJsonFilter filter = new FullPathJsonFilter(127, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); + assertFalse(filter.process(INCORRECT_LEVEL, new StringBuilder())); + assertNull(filter.process(INCORRECT_LEVEL.getBytes(StandardCharsets.UTF_8))); + } + + @Test + public void anonymize() throws Exception { + assertThat(new FullPathJsonFilter(-1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(new FullPathJsonFilter(-1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(new FullPathJsonFilter(-1, new String[]{DEEP_PATH1}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); + } + + @Test + public void anonymizeMaxPathMatches() throws Exception { + assertThat(new FullPathJsonFilter(1, new String[]{"/key1"}, null)).hasAnonymized("/key1"); + + assertThat(new FullPathJsonFilter(1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(new FullPathJsonFilter(2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + + } + + @Test + public void anonymizeWildcard() throws Exception { + assertThat(new FullPathJsonFilter(-1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); + } + + @Test + public void prune() throws Exception { + assertThat(new FullPathJsonFilter(-1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new FullPathJsonFilter(-1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new FullPathJsonFilter(-1, new String[]{PASSTHROUGH_XPATH}, new String[]{DEEP_PATH3})).hasPruned(DEEP_PATH3).hasPruneMetrics(); + } + + @Test + public void pruneMaxPathMatches() throws Exception { + assertThat(new FullPathJsonFilter(1, null, new String[]{"/key3"})).hasPruned("/key3"); + + assertThat(new FullPathJsonFilter(1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new FullPathJsonFilter(2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + } + + @Test + public void pruneWildcard() throws Exception { + assertThat(new FullPathJsonFilter(-1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); + } + + @Test + public void AnonymizePrune() throws Exception { + assertThat(new FullPathJsonFilter(-1, new String[]{"/key1"}, new String[]{"/key3"})) + .hasPruned("/key3") + .hasAnonymized("/key1"); + + assertThat(new FullPathJsonFilter(-1, new String[]{DEEP_PATH1}, new String[]{DEEP_PATH3})) + .hasPruned(DEEP_PATH3).hasPruneMetrics() + .hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); + + } + +} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiFullPathJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiFullPathJsonFilterTest.java deleted file mode 100644 index 62d2e2fd..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiFullPathJsonFilterTest.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -import java.nio.charset.StandardCharsets; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; - -public class MultiFullPathJsonFilterTest extends DefaultJsonFilterTest { - - public MultiFullPathJsonFilterTest() throws Exception { - super(); - } - - @Test - public void testConstructor() throws Exception { - Assertions.assertThrows(IllegalArgumentException.class, () -> { - new MultiFullPathJsonFilter(-1, new String[]{"//abc"}, null); - }); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new MultiFullPathJsonFilter(-1, null, null)).hasPassthrough(); - assertThat(new MultiFullPathJsonFilter(-1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); - } - - @Test - public void exception_returns_false() throws Exception { - MultiFullPathJsonFilter filter = new MultiFullPathJsonFilter(-1, null, null); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void exception_incorrect_level() throws Exception { - MultiFullPathJsonFilter filter = new MultiFullPathJsonFilter(127, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertFalse(filter.process(INCORRECT_LEVEL, new StringBuilder())); - assertNull(filter.process(INCORRECT_LEVEL.getBytes(StandardCharsets.UTF_8))); - } - - @Test - public void anonymize() throws Exception { - assertThat(new MultiFullPathJsonFilter(-1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new MultiFullPathJsonFilter(-1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new MultiFullPathJsonFilter(-1, new String[]{DEEP_PATH1}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - assertThat(new MultiFullPathJsonFilter(1, new String[]{"/key1"}, null)).hasAnonymized("/key1"); - - assertThat(new MultiFullPathJsonFilter(1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new MultiFullPathJsonFilter(2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - - } - - @Test - public void anonymizeWildcard() throws Exception { - assertThat(new MultiFullPathJsonFilter(-1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); - } - - @Test - public void prune() throws Exception { - assertThat(new MultiFullPathJsonFilter(-1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiFullPathJsonFilter(-1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiFullPathJsonFilter(-1, new String[]{PASSTHROUGH_XPATH}, new String[]{DEEP_PATH3})).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - assertThat(new MultiFullPathJsonFilter(1, null, new String[]{"/key3"})).hasPruned("/key3"); - - assertThat(new MultiFullPathJsonFilter(1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiFullPathJsonFilter(2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - - @Test - public void pruneWildcard() throws Exception { - assertThat(new MultiFullPathJsonFilter(-1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); - } - - @Test - public void AnonymizePrune() throws Exception { - assertThat(new MultiFullPathJsonFilter(-1, new String[]{"/key1"}, new String[]{"/key3"})) - .hasPruned("/key3") - .hasAnonymized("/key1"); - - assertThat(new MultiFullPathJsonFilter(-1, new String[]{DEEP_PATH1}, new String[]{DEEP_PATH3})) - .hasPruned(DEEP_PATH3).hasPruneMetrics() - .hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathJsonFilterTest.java deleted file mode 100644 index 47447662..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathJsonFilterTest.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -import java.nio.charset.StandardCharsets; - -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; - -public class MultiPathJsonFilterTest extends DefaultJsonFilterTest { - - public MultiPathJsonFilterTest() throws Exception { - super(); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new MultiPathJsonFilter(-1, null, null)).hasPassthrough(); - assertThat(new MultiPathJsonFilter(-1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); - } - - @Test - public void exception_returns_false() throws Exception { - MultiPathJsonFilter filter = new MultiPathJsonFilter(-1, null, null); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void exception_incorrect_level() throws Exception { - MultiPathJsonFilter filter = new MultiPathJsonFilter(127, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertFalse(filter.process(INCORRECT_LEVEL, new StringBuilder())); - assertNull(filter.process(INCORRECT_LEVEL.getBytes(StandardCharsets.UTF_8))); - } - - @Test - public void anonymize() throws Exception { - assertThat(new MultiPathJsonFilter(-1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new MultiPathJsonFilter(-1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics();; - assertThat(new MultiPathJsonFilter(-1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics();; - - assertThat(new MultiPathJsonFilter(-1, new String[]{"/key1", "/key2", "/key3"}, null)).hasAnonymized("/key1", "/key2", "/key3").hasAnonymizeMetrics();; - assertThat(new MultiPathJsonFilter(-1, new String[]{"/xxkey2", "/xxkey3", "/key1"}, null)).hasAnonymized("/xxkey2", "/xxkey3", "/key1").hasAnonymizeMetrics();; - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - assertThat(new MultiPathJsonFilter(1, new String[]{"/key1"}, null)).hasAnonymized("/key1").hasAnonymizeMetrics();; - - assertThat(new MultiPathJsonFilter(1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics();; - assertThat(new MultiPathJsonFilter(2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics();; - } - - @Test - public void anonymizeWildcard() throws Exception { - assertThat(new MultiPathJsonFilter(-1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics();; - } - - @Test - public void anonymizeAny() throws Exception { - assertThat(new MultiPathJsonFilter(-1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics();; - } - - @Test - public void prune() throws Exception { - assertThat(new MultiPathJsonFilter(-1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiPathJsonFilter(-1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiPathJsonFilter(-1, null, new String[]{DEEP_PATH3})).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - assertThat(new MultiPathJsonFilter(1, null, new String[]{"/key3"})).hasPruned("/key3").hasPruneMetrics(); - - assertThat(new MultiPathJsonFilter(1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiPathJsonFilter(2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - - } - - @Test - public void pruneWildcard() throws Exception { - assertThat(new MultiPathJsonFilter(-1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); - } - - @Test - public void pruneAny() throws Exception { - assertThat(new MultiPathJsonFilter(-1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); - } - - @Test - public void anonymizePrune() throws Exception { - assertThat(new MultiPathJsonFilter(-1, new String[]{"/key1"}, new String[]{"/key3"})) - .hasPruned("/key3") - .hasAnonymized("/key1"); - - assertThat(new MultiFullPathJsonFilter(-1, new String[]{DEEP_PATH1}, new String[]{DEEP_PATH3})) - .hasPruned(DEEP_PATH3).hasPruneMetrics() - .hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathMaxStringLengthJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathMaxStringLengthJsonFilterTest.java deleted file mode 100644 index 919edc7a..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathMaxStringLengthJsonFilterTest.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.github.skjolber.jsonfilter.core; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -import java.nio.charset.StandardCharsets; - -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; - -public class MultiPathMaxStringLengthJsonFilterTest extends DefaultJsonFilterTest { - - public MultiPathMaxStringLengthJsonFilterTest() throws Exception { - super(); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, null, null)).hasPassthrough(); - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); - } - - @Test - public void exception_returns_false() throws Exception { - MultiPathMaxStringLengthJsonFilter filter = new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void exception_incorrect_level() throws Exception { - MultiPathMaxStringLengthJsonFilter filter = new MultiPathMaxStringLengthJsonFilter(-1, 127, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertFalse(filter.process(INCORRECT_LEVEL, new StringBuilder())); - assertNull(filter.process(INCORRECT_LEVEL.getBytes(StandardCharsets.UTF_8))); - } - - @Test - public void anonymize() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH); - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, 1, new String[]{"/key1"}, null)).hasAnonymized("/key1"); - - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, 1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, 2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeWildcard() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeAny() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics(); - } - - @Test - public void prune() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEEP_PATH3, PASSTHROUGH_XPATH})).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, 1, null, new String[]{"/key3"})).hasPruned("/key3").hasPruneMetrics(); - - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, 1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, 2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - - @Test - public void pruneWildcard() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); - } - - @Test - public void pruneAny() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); - } - - @Test - public void maxStringLength() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); - } - - @Test - public void maxStringLengthAnonymizePrune() throws Exception { - assertThat(new MultiPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, 2, new String[]{"/key1"}, new String[]{"/key3"})) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) - .hasMaxPathMatches(2) - .hasPruned("/key3").hasPruneMetrics() - .hasAnonymized("/key1").hasAnonymizeMetrics(); - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathJsonFilterTest.java new file mode 100644 index 00000000..ab035a87 --- /dev/null +++ b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathJsonFilterTest.java @@ -0,0 +1,104 @@ +package com.github.skjolber.jsonfilter.core; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; + +import java.nio.charset.StandardCharsets; + +import org.junit.jupiter.api.Test; + +import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; +import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; + +public class PathJsonFilterTest extends DefaultJsonFilterTest { + + public PathJsonFilterTest() throws Exception { + super(); + } + + @Test + public void passthrough_success() throws Exception { + assertThat(new PathJsonFilter(-1, null, null)).hasPassthrough(); + assertThat(new PathJsonFilter(-1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); + } + + @Test + public void exception_returns_false() throws Exception { + PathJsonFilter filter = new PathJsonFilter(-1, null, null); + assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); + assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); + } + + @Test + public void exception_incorrect_level() throws Exception { + PathJsonFilter filter = new PathJsonFilter(127, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); + assertFalse(filter.process(INCORRECT_LEVEL, new StringBuilder())); + assertNull(filter.process(INCORRECT_LEVEL.getBytes(StandardCharsets.UTF_8))); + } + + @Test + public void anonymize() throws Exception { + assertThat(new PathJsonFilter(-1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(new PathJsonFilter(-1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics();; + assertThat(new PathJsonFilter(-1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics();; + + assertThat(new PathJsonFilter(-1, new String[]{"/key1", "/key2", "/key3"}, null)).hasAnonymized("/key1", "/key2", "/key3").hasAnonymizeMetrics();; + assertThat(new PathJsonFilter(-1, new String[]{"/xxkey2", "/xxkey3", "/key1"}, null)).hasAnonymized("/xxkey2", "/xxkey3", "/key1").hasAnonymizeMetrics();; + } + + @Test + public void anonymizeMaxPathMatches() throws Exception { + assertThat(new PathJsonFilter(1, new String[]{"/key1"}, null)).hasAnonymized("/key1").hasAnonymizeMetrics();; + + assertThat(new PathJsonFilter(1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics();; + assertThat(new PathJsonFilter(2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics();; + } + + @Test + public void anonymizeWildcard() throws Exception { + assertThat(new PathJsonFilter(-1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics();; + } + + @Test + public void anonymizeAny() throws Exception { + assertThat(new PathJsonFilter(-1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics();; + } + + @Test + public void prune() throws Exception { + assertThat(new PathJsonFilter(-1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new PathJsonFilter(-1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new PathJsonFilter(-1, null, new String[]{DEEP_PATH3})).hasPruned(DEEP_PATH3).hasPruneMetrics(); + } + + @Test + public void pruneMaxPathMatches() throws Exception { + assertThat(new PathJsonFilter(1, null, new String[]{"/key3"})).hasPruned("/key3").hasPruneMetrics(); + + assertThat(new PathJsonFilter(1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new PathJsonFilter(2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + + } + + @Test + public void pruneWildcard() throws Exception { + assertThat(new PathJsonFilter(-1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); + } + + @Test + public void pruneAny() throws Exception { + assertThat(new PathJsonFilter(-1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); + } + + @Test + public void anonymizePrune() throws Exception { + assertThat(new PathJsonFilter(-1, new String[]{"/key1"}, new String[]{"/key3"})) + .hasPruned("/key3") + .hasAnonymized("/key1"); + + assertThat(new FullPathJsonFilter(-1, new String[]{DEEP_PATH1}, new String[]{DEEP_PATH3})) + .hasPruned(DEEP_PATH3).hasPruneMetrics() + .hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); + } + +} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathMaxSizeMaxStringLengthJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathMaxSizeMaxStringLengthJsonFilterTest.java similarity index 54% rename from impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathMaxSizeMaxStringLengthJsonFilterTest.java rename to impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathMaxSizeMaxStringLengthJsonFilterTest.java index dc8c1bb0..a7192710 100644 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/MultiPathMaxSizeMaxStringLengthJsonFilterTest.java +++ b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathMaxSizeMaxStringLengthJsonFilterTest.java @@ -13,9 +13,9 @@ import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; import com.github.skjolber.jsonfilter.test.cache.MaxSizeJsonFilterPair.MaxSizeJsonFilterFunction; -public class MultiPathMaxSizeMaxStringLengthJsonFilterTest extends DefaultJsonFilterTest { +public class PathMaxSizeMaxStringLengthJsonFilterTest extends DefaultJsonFilterTest { - private static class MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter extends MultiPathMaxSizeMaxStringLengthJsonFilter { + private static class MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter extends PathMaxSizeMaxStringLengthJsonFilter { public MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, String truncateMessage) { super(maxStringLength, maxSize, maxPathMatches, anonymizes, prunes, pruneMessage, anonymizeMessage, truncateMessage); @@ -31,24 +31,24 @@ protected boolean mustConstrainMaxSize(int length) { } }; - public MultiPathMaxSizeMaxStringLengthJsonFilterTest() throws Exception { + public PathMaxSizeMaxStringLengthJsonFilterTest() throws Exception { super(); } @Test @ResourceLock(value = "jackson") public void testMaxSize() throws IOException { - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MultiPathMaxSizeMaxStringLengthJsonFilter(128, size, -1, new String[] {"/CVE_Items/cve/CVE_data_meta"}, null)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MultiPathMaxSizeMaxStringLengthJsonFilter(128, size, -1, null, new String[] {"/CVE_Items/cve/CVE_data_meta"})); + validate("/json/maxSize/cve2006.json.gz.json", (size) -> new PathMaxSizeMaxStringLengthJsonFilter(128, size, -1, new String[] {"/CVE_Items/cve/CVE_data_meta"}, null)); + validate("/json/maxSize/cve2006.json.gz.json", (size) -> new PathMaxSizeMaxStringLengthJsonFilter(128, size, -1, null, new String[] {"/CVE_Items/cve/CVE_data_meta"})); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MultiPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,new String[] {"/CVE_Items/impact/baseMetricV2/severity"}, null)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MultiPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,null, new String[] {"/CVE_Items/impact/baseMetricV2/severity"})); + validate("/json/maxSize/cve2006.json.gz.json", (size) -> new PathMaxSizeMaxStringLengthJsonFilter(128, size, -1,new String[] {"/CVE_Items/impact/baseMetricV2/severity"}, null)); + validate("/json/maxSize/cve2006.json.gz.json", (size) -> new PathMaxSizeMaxStringLengthJsonFilter(128, size, -1,null, new String[] {"/CVE_Items/impact/baseMetricV2/severity"})); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MultiPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,new String[] {"/CVE_Items/impact/baseMetricV2/impactScore"}, null)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MultiPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,null, new String[] {"/CVE_Items/impact/baseMetricV2/impactScore"})); + validate("/json/maxSize/cve2006.json.gz.json", (size) -> new PathMaxSizeMaxStringLengthJsonFilter(128, size, -1,new String[] {"/CVE_Items/impact/baseMetricV2/impactScore"}, null)); + validate("/json/maxSize/cve2006.json.gz.json", (size) -> new PathMaxSizeMaxStringLengthJsonFilter(128, size, -1,null, new String[] {"/CVE_Items/impact/baseMetricV2/impactScore"})); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MultiPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,new String[] {"/CVE_Items/impact/baseMetricV2/obtainAllPrivilege"}, null)); - validate("/json/maxSize/cve2006.json.gz.json", (size) -> new MultiPathMaxSizeMaxStringLengthJsonFilter(128, size, -1,null, new String[] {"/CVE_Items/impact/baseMetricV2/obtainAllPrivilege"})); + validate("/json/maxSize/cve2006.json.gz.json", (size) -> new PathMaxSizeMaxStringLengthJsonFilter(128, size, -1,new String[] {"/CVE_Items/impact/baseMetricV2/obtainAllPrivilege"}, null)); + validate("/json/maxSize/cve2006.json.gz.json", (size) -> new PathMaxSizeMaxStringLengthJsonFilter(128, size, -1,null, new String[] {"/CVE_Items/impact/baseMetricV2/obtainAllPrivilege"})); } @Test @@ -64,96 +64,96 @@ public void testDeepStructure2() throws IOException { @Test public void passthrough_success() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, null, null); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, null, null)).hasPassthrough(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, null, null)).hasPassthrough(); maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); } @Test public void anonymize() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, new String[]{DEFAULT_PATH}, null); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); } @Test public void anonymizeMaxPathMatches() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, 1, new String[]{"/key1"}, null); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, 1, new String[]{"/key1"}, null)).hasAnonymized("/key1"); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, 1, new String[]{"/key1"}, null)).hasAnonymized("/key1"); maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, 1, new String[]{DEFAULT_PATH}, null); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, 1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, 1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, 2, new String[]{DEFAULT_PATH}, null); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, 2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, 2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); } @Test public void anonymizeWildcard() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, new String[]{DEFAULT_WILDCARD_PATH}, null); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); } @Test public void anonymizeAny() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, new String[]{DEFAULT_ANY_PATH}, null); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics(); } @Test public void prune() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, null, new String[]{DEFAULT_PATH}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, null, new String[]{DEEP_PATH3, PASSTHROUGH_XPATH}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEEP_PATH3, PASSTHROUGH_XPATH})).hasPruned(DEEP_PATH3).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEEP_PATH3, PASSTHROUGH_XPATH})).hasPruned(DEEP_PATH3).hasPruneMetrics(); } @Test public void pruneMaxPathMatches() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, 1, null, new String[]{"/key3"}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, 1, null, new String[]{"/key3"})).hasPruned("/key3").hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, 1, null, new String[]{"/key3"})).hasPruned("/key3").hasPruneMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, 1, null, new String[]{DEFAULT_PATH}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, 1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, 1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, 2, null, new String[]{DEFAULT_PATH}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, 2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, 2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); } @Test public void pruneWildcard() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, null, new String[]{DEFAULT_WILDCARD_PATH}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); } @Test public void pruneAny() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(-1, size, -1, null, new String[]{DEFAULT_ANY_PATH}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); } @Test public void maxStringLength() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, -1, null, null); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); + assertThat(maxSize, new PathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); } @Test public void maxStringLengthAnonymizePrune() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxSizeMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, 2, new String[]{"/key1"}, new String[]{"/key3"}); - assertThat(maxSize, new MultiPathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, 2, new String[]{"/key1"}, new String[]{"/key3"})) + assertThat(maxSize, new PathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, 2, new String[]{"/key1"}, new String[]{"/key3"})) .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) .hasMaxPathMatches(2) .hasPruned("/key3").hasPruneMetrics() @@ -162,7 +162,7 @@ public void maxStringLengthAnonymizePrune() throws Exception { @Test public void exception_returns_false() throws Exception { - MultiPathMaxStringLengthJsonFilter filter = new MultiPathMaxSizeMaxStringLengthJsonFilter(-1, -1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); + PathMaxStringLengthJsonFilter filter = new PathMaxSizeMaxStringLengthJsonFilter(-1, -1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); } diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathMaxStringLengthJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathMaxStringLengthJsonFilterTest.java new file mode 100644 index 00000000..2ba1ad24 --- /dev/null +++ b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/PathMaxStringLengthJsonFilterTest.java @@ -0,0 +1,103 @@ +package com.github.skjolber.jsonfilter.core; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; + +import java.nio.charset.StandardCharsets; + +import org.junit.jupiter.api.Test; + +import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; +import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; + +public class PathMaxStringLengthJsonFilterTest extends DefaultJsonFilterTest { + + public PathMaxStringLengthJsonFilterTest() throws Exception { + super(); + } + + @Test + public void passthrough_success() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, null, null)).hasPassthrough(); + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); + } + + @Test + public void exception_returns_false() throws Exception { + PathMaxStringLengthJsonFilter filter = new PathMaxStringLengthJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); + assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); + assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); + } + + @Test + public void exception_incorrect_level() throws Exception { + PathMaxStringLengthJsonFilter filter = new PathMaxStringLengthJsonFilter(-1, 127, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); + assertFalse(filter.process(INCORRECT_LEVEL, new StringBuilder())); + assertNull(filter.process(INCORRECT_LEVEL.getBytes(StandardCharsets.UTF_8))); + } + + @Test + public void anonymize() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH); + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); + } + + @Test + public void anonymizeMaxPathMatches() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(-1, 1, new String[]{"/key1"}, null)).hasAnonymized("/key1"); + + assertThat(new PathMaxStringLengthJsonFilter(-1, 1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(new PathMaxStringLengthJsonFilter(-1, 2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + } + + @Test + public void anonymizeWildcard() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); + } + + @Test + public void anonymizeAny() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics(); + } + + @Test + public void prune() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEEP_PATH3, PASSTHROUGH_XPATH})).hasPruned(DEEP_PATH3).hasPruneMetrics(); + } + + @Test + public void pruneMaxPathMatches() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(-1, 1, null, new String[]{"/key3"})).hasPruned("/key3").hasPruneMetrics(); + + assertThat(new PathMaxStringLengthJsonFilter(-1, 1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new PathMaxStringLengthJsonFilter(-1, 2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + } + + @Test + public void pruneWildcard() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); + } + + @Test + public void pruneAny() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(-1, -1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); + } + + @Test + public void maxStringLength() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); + } + + @Test + public void maxStringLengthAnonymizePrune() throws Exception { + assertThat(new PathMaxStringLengthJsonFilter(DEFAULT_MAX_STRING_LENGTH, 2, new String[]{"/key1"}, new String[]{"/key3"})) + .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) + .hasMaxPathMatches(2) + .hasPruned("/key3").hasPruneMetrics() + .hasAnonymized("/key1").hasAnonymizeMetrics(); + } + +} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthRemoveWhitespaceJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthRemoveWhitespaceJsonFilterTest.java deleted file mode 100644 index 4a907642..00000000 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthRemoveWhitespaceJsonFilterTest.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.github.skjolber.jsonfilter.core.ws; - -import static org.junit.Assert.assertFalse; - -import java.io.ByteArrayOutputStream; - -import org.junit.jupiter.api.Test; - -import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; -import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; - -public class MultiPathMaxStringLengthRemoveWhitespaceJsonFilterTest extends DefaultJsonFilterTest { - - public MultiPathMaxStringLengthRemoveWhitespaceJsonFilterTest() throws Exception { - super(); - } - - @Test - public void passthrough_success() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, null)).hasPassthrough(); - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); - } - - @Test - public void exception_returns_false() throws Exception { - MultiPathMaxStringLengthRemoveWhitespaceJsonFilter filter = new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); - assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); - } - - @Test - public void anonymize() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH); - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeMaxPathMatches() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, new String[]{"/key1"}, null)).hasAnonymized("/key1"); - - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeWildcard() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); - } - - @Test - public void anonymizeAny() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics(); - } - - @Test - public void prune() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEEP_PATH3, PASSTHROUGH_XPATH})).hasPruned(DEEP_PATH3).hasPruneMetrics(); - } - - @Test - public void pruneMaxPathMatches() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, null, new String[]{"/key3"})).hasPruned("/key3").hasPruneMetrics(); - - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); - } - - @Test - public void pruneWildcard() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); - } - - @Test - public void pruneAny() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); - } - - @Test - public void maxStringLength() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); - } - - @Test - public void maxStringLengthAnonymizePrune() throws Exception { - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, 2, new String[]{"/key1"}, new String[]{"/key3"})) - .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) - .hasMaxPathMatches(2) - .hasPruned("/key3").hasPruneMetrics() - .hasAnonymized("/key1").hasAnonymizeMetrics(); - } - -} diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest.java similarity index 69% rename from impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest.java rename to impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest.java index a52d80e2..4552a5d4 100644 --- a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/MultiPathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest.java +++ b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest.java @@ -14,10 +14,10 @@ import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; import com.github.skjolber.jsonfilter.test.cache.MaxSizeJsonFilterPair.MaxSizeJsonFilterFunction; -public class MultiPathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest extends DefaultJsonFilterTest { +public class PathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest extends DefaultJsonFilterTest { - private static class MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter extends MultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter { + private static class MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter extends PathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter { public MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(int maxStringLength, int maxSize, int maxPathMatches, String[] anonymizes, String[] prunes, String pruneMessage, String anonymizeMessage, @@ -36,7 +36,7 @@ protected boolean mustConstrainMaxSize(int length) { } }; - public MultiPathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest() throws Exception { + public PathMaxStringLengthMaxSizeJsonRemoveWhitespaceFilterTest() throws Exception { super(); } @@ -69,96 +69,96 @@ public void testDeepStructure2() throws IOException { @Test public void passthrough_success() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, null, null); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, null)).hasPassthrough(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, null)).hasPassthrough(); maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); } @Test public void anonymize() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, new String[]{DEFAULT_PATH}, null); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); - assertThat(new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); } @Test public void anonymizeMaxPathMatches() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, 1, new String[]{"/key1"}, null); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, new String[]{"/key1"}, null)).hasAnonymized("/key1"); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, new String[]{"/key1"}, null)).hasAnonymized("/key1"); maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, 1, new String[]{DEFAULT_PATH}, null); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, 2, new String[]{DEFAULT_PATH}, null); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); } @Test public void anonymizeWildcard() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, new String[]{DEFAULT_WILDCARD_PATH}, null); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); } @Test public void anonymizeAny() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, new String[]{DEFAULT_ANY_PATH}, null); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics(); } @Test public void prune() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, null, new String[]{DEFAULT_PATH}); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, null, new String[]{DEEP_PATH3, PASSTHROUGH_XPATH}); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEEP_PATH3, PASSTHROUGH_XPATH})).hasPruned(DEEP_PATH3).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEEP_PATH3, PASSTHROUGH_XPATH})).hasPruned(DEEP_PATH3).hasPruneMetrics(); } @Test public void pruneMaxPathMatches() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, 1, null, new String[]{"/key3"}); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, null, new String[]{"/key3"})).hasPruned("/key3").hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, null, new String[]{"/key3"})).hasPruned("/key3").hasPruneMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, 1, null, new String[]{DEFAULT_PATH}); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, 2, null, new String[]{DEFAULT_PATH}); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); } @Test public void pruneWildcard() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, null, new String[]{DEFAULT_WILDCARD_PATH}); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); } @Test public void pruneAny() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(-1, size, -1, null, new String[]{DEFAULT_ANY_PATH}); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); } @Test public void maxStringLength() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, -1, null, null); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); } @Test public void maxStringLengthAnonymizePrune() throws Exception { MaxSizeJsonFilterFunction maxSize = (size) -> new MustContrainMultiPathMaxStringLengthMaxSizeRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, size, 2, new String[]{"/key1"}, new String[]{"/key3"}); - assertThat(maxSize, new MultiPathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, 2, new String[]{"/key1"}, new String[]{"/key3"})) + assertThat(maxSize, new PathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, 2, new String[]{"/key1"}, new String[]{"/key3"})) .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) .hasMaxPathMatches(2) .hasPruned("/key3").hasPruneMetrics() diff --git a/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthRemoveWhitespaceJsonFilterTest.java b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthRemoveWhitespaceJsonFilterTest.java new file mode 100644 index 00000000..215a0653 --- /dev/null +++ b/impl/core/src/test/java/com/github/skjolber/jsonfilter/core/ws/PathMaxStringLengthRemoveWhitespaceJsonFilterTest.java @@ -0,0 +1,95 @@ +package com.github.skjolber.jsonfilter.core.ws; + +import static org.junit.Assert.assertFalse; + +import java.io.ByteArrayOutputStream; + +import org.junit.jupiter.api.Test; + +import com.github.skjolber.jsonfilter.ResizableByteArrayOutputStream; +import com.github.skjolber.jsonfilter.test.DefaultJsonFilterTest; + +public class PathMaxStringLengthRemoveWhitespaceJsonFilterTest extends DefaultJsonFilterTest { + + public PathMaxStringLengthRemoveWhitespaceJsonFilterTest() throws Exception { + super(); + } + + @Test + public void passthrough_success() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, null)).hasPassthrough(); + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasPassthrough(); + } + + @Test + public void exception_returns_false() throws Exception { + PathMaxStringLengthRemoveWhitespaceJsonFilter filter = new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH}); + assertFalse(filter.process(new char[] {}, 1, 1, new StringBuilder())); + assertFalse(filter.process(new byte[] {}, 1, 1, new ResizableByteArrayOutputStream(128))); + } + + @Test + public void anonymize() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH); + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEEP_PATH1, PASSTHROUGH_XPATH}, new String[]{PASSTHROUGH_XPATH})).hasAnonymized(DEEP_PATH1).hasAnonymizeMetrics(); + } + + @Test + public void anonymizeMaxPathMatches() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, new String[]{"/key1"}, null)).hasAnonymized("/key1"); + + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 2, new String[]{DEFAULT_PATH}, null)).hasAnonymized(DEFAULT_PATH).hasAnonymizeMetrics(); + } + + @Test + public void anonymizeWildcard() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_WILDCARD_PATH}, null)).hasAnonymized(DEFAULT_WILDCARD_PATH).hasAnonymizeMetrics(); + } + + @Test + public void anonymizeAny() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, new String[]{DEFAULT_ANY_PATH}, null)).hasAnonymized(DEFAULT_ANY_PATH).hasAnonymizeMetrics(); + } + + @Test + public void prune() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_PATH, PASSTHROUGH_XPATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEEP_PATH3, PASSTHROUGH_XPATH})).hasPruned(DEEP_PATH3).hasPruneMetrics(); + } + + @Test + public void pruneMaxPathMatches() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, null, new String[]{"/key3"})).hasPruned("/key3").hasPruneMetrics(); + + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 1, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, 2, null, new String[]{DEFAULT_PATH})).hasPruned(DEFAULT_PATH).hasPruneMetrics(); + } + + @Test + public void pruneWildcard() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_WILDCARD_PATH})).hasPruned(DEFAULT_WILDCARD_PATH).hasPruneMetrics(); + } + + @Test + public void pruneAny() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(-1, -1, null, new String[]{DEFAULT_ANY_PATH})).hasPruned(DEFAULT_ANY_PATH).hasPruneMetrics(); + } + + @Test + public void maxStringLength() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, -1, null, null)).hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH).hasMaxStringLengthMetrics(); + } + + @Test + public void maxStringLengthAnonymizePrune() throws Exception { + assertThat(new PathMaxStringLengthRemoveWhitespaceJsonFilter(DEFAULT_MAX_STRING_LENGTH, 2, new String[]{"/key1"}, new String[]{"/key3"})) + .hasMaxStringLength(DEFAULT_MAX_STRING_LENGTH) + .hasMaxPathMatches(2) + .hasPruned("/key3").hasPruneMetrics() + .hasAnonymized("/key1").hasAnonymizeMetrics(); + } + +} From d1bd778051090d6da676bb76aed8281942ea3796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Skj=C3=B8lberg?= Date: Sun, 26 Oct 2025 00:15:19 +0200 Subject: [PATCH 3/8] Adjust benchmarks --- .../jsonfilter/jmh/AllFilterBenchmark.java | 79 +++++++++---------- .../jsonfilter/jmh/CveFilterBenchmark.java | 30 +++---- 2 files changed, 54 insertions(+), 55 deletions(-) diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java index d99398a8..b632271f 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java @@ -55,9 +55,9 @@ public class AllFilterBenchmark { public static final String DEFAULT_XPATH = "/address"; public static final String DEFAULT_ANY_XPATH = "//address"; - private JacksonBenchmarkRunner jacksonMultiPathMaxSizeMaxStringLengthJsonFilter; + private JacksonBenchmarkRunner pathMaxSizeMaxStringLengthJacksonJsonFilter; private BenchmarkRunner anyPathJsonMaskerJsonFilter; - private BenchmarkRunner singlePathJsonMaskerJsonFilter; + private BenchmarkRunner fullPathJsonMaskerJsonFilter; private BenchmarkRunner maxStringLengthJacksonJsonFilter; private BenchmarkRunner maxSizeJacksonJsonFilter; @@ -67,16 +67,16 @@ public class AllFilterBenchmark { private BenchmarkRunner maxStringLengthJsonFilter; private BenchmarkRunner maxSizeJsonFilter; - private BenchmarkRunner multiPathAnonymizeJsonFilter; - private BenchmarkRunner multiPathAnonymizeFullPathJsonFilter; - private BenchmarkRunner multiPathMaxStringLengthAnonymizeJsonFilter; + private BenchmarkRunner pathAnonymizeJsonFilter; + private BenchmarkRunner fullPathAnonymizeJsonFilter; + private BenchmarkRunner pathAnonymizeMaxStringLengthJsonFilter; - private BenchmarkRunner multiPathAnonymizeMaxStringLengthJacksonJsonFilter; - private BenchmarkRunner multiAnyPathAnonymizeMaxStringLengthJacksonJsonFilter; - private BenchmarkRunner multiAnyPathLogbookJsonFilter; + private BenchmarkRunner pathAnonymizeMaxStringLengthJacksonJsonFilter; + private BenchmarkRunner anyPathAnonymizeMaxStringLengthJacksonJsonFilter; + private BenchmarkRunner anyPathLogbookJsonFilter; private BenchmarkRunner anyPathAnonymizeJsonFilter; - private BenchmarkRunner multiPathAnonymizeMaxSizeMaxStringLengthJsonFilter; + private BenchmarkRunner pathAnonymizeMaxSizeMaxStringLengthJsonFilter; private final boolean prettyPrinted = false; @@ -92,9 +92,9 @@ public void init() throws Exception { // generic filters // jackson - jacksonMultiPathMaxSizeMaxStringLengthJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxSizeMaxStringLengthJsonFilter(20, -1, new String[] {xpath}, null), prettyPrinted); - multiPathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxStringLengthJsonFilter(20, new String[] {xpath}, null), prettyPrinted); - multiAnyPathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonAnyPathMaxStringLengthJsonFilter(20, new String[] {DEFAULT_ANY_XPATH}, null), prettyPrinted); + pathMaxSizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxSizeMaxStringLengthJsonFilter(20, -1, new String[] {xpath}, null), prettyPrinted); + pathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxStringLengthJsonFilter(20, new String[] {xpath}, null), prettyPrinted); + anyPathAnonymizeMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonAnyPathMaxStringLengthJsonFilter(20, new String[] {DEFAULT_ANY_XPATH}, null), prettyPrinted); maxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMaxStringLengthJsonFilter(20), prettyPrinted); maxSizeJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonMaxSizeJsonFilter(128), prettyPrinted); @@ -102,20 +102,19 @@ public void init() throws Exception { maxStringLengthJsonFilter = new BenchmarkRunner(file, true, new MaxStringLengthJsonFilter(20), prettyPrinted); maxSizeJsonFilter = new BenchmarkRunner(file, true, new MaxSizeJsonFilter(128), prettyPrinted); - // path - single anyPathAnonymizeJsonFilter = new BenchmarkRunner(file, true, new AnyPathJsonFilter(-1, new String[]{DEFAULT_ANY_XPATH}, null), prettyPrinted); // path - multiple - multiPathAnonymizeJsonFilter = new BenchmarkRunner(file, true, new PathJsonFilter(-1, new String[]{xpath}, null), prettyPrinted); - multiPathMaxStringLengthAnonymizeJsonFilter = new BenchmarkRunner(file, true, new PathMaxStringLengthJsonFilter(20, -1, new String[]{xpath}, null), prettyPrinted); - multiPathAnonymizeFullPathJsonFilter = new BenchmarkRunner(file, true, new FullPathJsonFilter(-1, new String[]{xpath}, null), prettyPrinted); + pathAnonymizeJsonFilter = new BenchmarkRunner(file, true, new PathJsonFilter(-1, new String[]{xpath}, null), prettyPrinted); + pathAnonymizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new PathMaxStringLengthJsonFilter(20, -1, new String[]{xpath}, null), prettyPrinted); + fullPathAnonymizeJsonFilter = new BenchmarkRunner(file, true, new FullPathJsonFilter(-1, new String[]{xpath}, null), prettyPrinted); // max size - multiPathAnonymizeMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new PathMaxSizeMaxStringLengthJsonFilter(20, -1, -1, new String[]{xpath}, null), prettyPrinted); + pathAnonymizeMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new PathMaxSizeMaxStringLengthJsonFilter(20, -1, -1, new String[]{xpath}, null), prettyPrinted); // other filters Set hashSet = new HashSet<>(); - hashSet.add("product_name"); + hashSet.add("address"); JsonMasker anyPathJsonMasker = JsonMasker.getMasker(hashSet); var singlePathJsonMasker = JsonMasker.getMasker( @@ -125,9 +124,9 @@ public void init() throws Exception { ); anyPathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(anyPathJsonMasker), false); - singlePathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(singlePathJsonMasker), false); + fullPathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(singlePathJsonMasker), false); - multiAnyPathLogbookJsonFilter = new BenchmarkRunner(file, true, PrimitiveJsonPropertyBodyFilter.replaceString((a) -> a.equals("firstName"), "*"), prettyPrinted); + anyPathLogbookJsonFilter = new BenchmarkRunner(file, true, PrimitiveJsonPropertyBodyFilter.replaceString((a) -> a.equals("address"), "*"), prettyPrinted); } @Benchmark @@ -136,23 +135,23 @@ public long noop_passthrough() throws IOException { } @Benchmark - public long multiAnyPathLogbook() throws IOException { - return multiAnyPathLogbookJsonFilter.benchmarkBytes(); + public long anyPathLogbook() throws IOException { + return anyPathLogbookJsonFilter.benchmarkBytes(); } @Benchmark - public long anonMultiMaxStringLengthJackson() throws IOException { - return multiPathAnonymizeMaxStringLengthJacksonJsonFilter.benchmarkBytes(); + public long pathAnonymizeMaxStringLengthJackson() throws IOException { + return pathAnonymizeMaxStringLengthJacksonJsonFilter.benchmarkBytes(); } @Benchmark - public long jacksonMultiPathMaxSizeMaxStringLengthJsonFilter() throws IOException { - return jacksonMultiPathMaxSizeMaxStringLengthJsonFilter.benchmarkBytes(); + public long pathMaxSizeMaxStringLengthJackson() throws IOException { + return pathMaxSizeMaxStringLengthJacksonJsonFilter.benchmarkBytes(); } @Benchmark - public long anonMultiAnyMaxStringLengthJackson() throws IOException { - return multiAnyPathAnonymizeMaxStringLengthJacksonJsonFilter.benchmarkBytes(); + public long anyPathAnonymizeMaxStringLengthJackson() throws IOException { + return anyPathAnonymizeMaxStringLengthJacksonJsonFilter.benchmarkBytes(); } @Benchmark @@ -166,38 +165,38 @@ public long maxSizeJackson() throws IOException { } @Benchmark - public long anonAnyPath() throws IOException { + public long anyPathAnonymize() throws IOException { return anyPathAnonymizeJsonFilter.benchmarkBytes(); } @Benchmark - public long anonSingleAnyPathJsonMask() throws IOException { + public long anyPathJsonMasker() throws IOException { return anyPathJsonMaskerJsonFilter.benchmarkBytesAsArray(); } @Benchmark - public long anonSingleFullPathJsonMask() throws IOException { - return singlePathJsonMaskerJsonFilter.benchmarkBytesAsArray(); + public long fullPathJsonMasker() throws IOException { + return fullPathJsonMaskerJsonFilter.benchmarkBytesAsArray(); } @Benchmark - public long anonMultiPathMaxStringLength() throws IOException { - return multiPathMaxStringLengthAnonymizeJsonFilter.benchmarkBytes(); + public long pathAnonymizeMaxStringLength() throws IOException { + return pathAnonymizeMaxStringLengthJsonFilter.benchmarkBytes(); } @Benchmark - public long multiPathAnonymizeMaxSizeMaxStringLengthJsonFilter() throws IOException { - return multiPathAnonymizeMaxSizeMaxStringLengthJsonFilter.benchmarkBytes(); + public long pathAnonymizeMaxSizeMaxStringLength() throws IOException { + return pathAnonymizeMaxSizeMaxStringLengthJsonFilter.benchmarkBytes(); } @Benchmark - public long anonMultiPath() throws IOException { - return multiPathAnonymizeJsonFilter.benchmarkBytes(); + public long pathAnonymize() throws IOException { + return pathAnonymizeJsonFilter.benchmarkBytes(); } @Benchmark - public long anonMultiFullPath() throws IOException { - return multiPathAnonymizeFullPathJsonFilter.benchmarkBytes(); + public long fullPathAnonymize() throws IOException { + return fullPathAnonymizeJsonFilter.benchmarkBytes(); } @Benchmark diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java index 11cf1b35..e4bc5a8c 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java @@ -61,11 +61,11 @@ public class CveFilterBenchmark { private static String[] prune = new String[] {"/CVE_Items/cve/references", "//version"}; private static String[] prune2 = new String[] {"$.CVE_Items[?(@.cve.references)]", "$..version"}; - private JacksonBenchmarkRunner jacksonMultiPathMaxSizeMaxStringLengthJsonFilter; - private BenchmarkRunner multiPathMaxSizeMaxStringLengthJsonFilter; + private JacksonBenchmarkRunner jacksonPathMaxSizeMaxStringLengthJsonFilter; + private BenchmarkRunner pathMaxSizeMaxStringLengthJsonFilter; private BenchmarkRunner multiPathMaxStringLengthJsonFilter; - private BenchmarkRunner multiPathMaxStringLengthJacksonJsonFilter; + private BenchmarkRunner pathMaxStringLengthJacksonJsonFilter; private BenchmarkRunner anyPathJsonFilter; @@ -82,7 +82,7 @@ public class CveFilterBenchmark { private BenchmarkRunner maxSizeRemoveWhitespaceJsonFilter; private BenchmarkRunner anyPathJsonMaskerJsonFilter; - private BenchmarkRunner singlePathJsonMaskerJsonFilter; + private BenchmarkRunner fullPathJsonMaskerJsonFilter; private BenchmarkRunner removeWhitespaceJsonFilter; @@ -98,10 +98,10 @@ public void init() throws Exception { //BodyFilter maxLength = JsonPathBodyFilters.jsonPath("$..*[?(@.* =~ /^[\\w\\W]{" + maxStringLength + ",}$/)]").replace("..removed"); int size = Integer.parseInt(fileName.substring(0, fileName.length() - 2)) * 1024 - 1; - jacksonMultiPathMaxSizeMaxStringLengthJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, anon, prune), prettyPrinted); - multiPathMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new PathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, -1, anon, prune), prettyPrinted); + jacksonPathMaxSizeMaxStringLengthJsonFilter = new JacksonBenchmarkRunner(file, true, new JacksonPathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, anon, prune), prettyPrinted); + pathMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new PathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, -1, anon, prune), prettyPrinted); - multiPathMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, (JacksonJsonFilter) new JacksonJsonLogFilterBuilder().withMaxStringLength(maxStringLength).withAnonymize(anon).withPrune(prune).build(), prettyPrinted); + pathMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, (JacksonJsonFilter) new JacksonJsonLogFilterBuilder().withMaxStringLength(maxStringLength).withAnonymize(anon).withPrune(prune).build(), prettyPrinted); multiPathMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new DefaultJsonLogFilterBuilder().withMaxStringLength(maxStringLength).withAnonymize(anon).withPrune(prune).build(), prettyPrinted); maxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, (JacksonJsonFilter) new JacksonJsonLogFilterBuilder().withMaxStringLength(maxStringLength).build(), prettyPrinted); @@ -128,22 +128,22 @@ public void init() throws Exception { ); anyPathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(JsonMasker.getMasker(Set.of("version"))), false); - singlePathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(singlePathJsonMasker), false); + fullPathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(singlePathJsonMasker), false); } @Benchmark public long all_maxsize_jackson() throws IOException { - return jacksonMultiPathMaxSizeMaxStringLengthJsonFilter.benchmarkBytes(); + return jacksonPathMaxSizeMaxStringLengthJsonFilter.benchmarkBytes(); } @Benchmark public long all_maxsize_core() throws IOException { - return multiPathMaxSizeMaxStringLengthJsonFilter.benchmarkBytes(); + return pathMaxSizeMaxStringLengthJsonFilter.benchmarkBytes(); } @Benchmark public long all_jackson() throws IOException { - return multiPathMaxStringLengthJacksonJsonFilter.benchmarkBytes(); + return pathMaxStringLengthJacksonJsonFilter.benchmarkBytes(); } @Benchmark @@ -202,18 +202,18 @@ public long maxStringLengthMaxSize_jackson() throws IOException { } @Benchmark - public long anon_core() throws IOException { + public long anon_any_core() throws IOException { return anyPathJsonFilter.benchmarkBytes(); } @Benchmark - public long anon_jsonMask() throws IOException { + public long anon_any_jsonMask() throws IOException { return anyPathJsonMaskerJsonFilter.benchmarkBytesAsArray(); } @Benchmark - public long anon_single_jsonMask() throws IOException { - return singlePathJsonMaskerJsonFilter.benchmarkBytesAsArray(); + public long anon_full_jsonMask() throws IOException { + return fullPathJsonMaskerJsonFilter.benchmarkBytesAsArray(); } From f5bed75394dc9574911d229417194f26252fb0d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Skj=C3=B8lberg?= Date: Sun, 26 Oct 2025 00:28:54 +0200 Subject: [PATCH 4/8] Improve benchmark --- .../jsonfilter/jmh/CveFilterBenchmark.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java index e4bc5a8c..ffa10ded 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java @@ -26,6 +26,7 @@ import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; import com.github.skjolber.jsonfilter.core.DefaultJsonLogFilterBuilder; +import com.github.skjolber.jsonfilter.core.FullPathJsonFilter; import com.github.skjolber.jsonfilter.core.MaxSizeJsonFilter; import com.github.skjolber.jsonfilter.core.MaxStringLengthJsonFilter; import com.github.skjolber.jsonfilter.core.MaxStringLengthMaxSizeJsonFilter; @@ -64,10 +65,11 @@ public class CveFilterBenchmark { private JacksonBenchmarkRunner jacksonPathMaxSizeMaxStringLengthJsonFilter; private BenchmarkRunner pathMaxSizeMaxStringLengthJsonFilter; - private BenchmarkRunner multiPathMaxStringLengthJsonFilter; + private BenchmarkRunner pathMaxStringLengthJsonFilter; private BenchmarkRunner pathMaxStringLengthJacksonJsonFilter; private BenchmarkRunner anyPathJsonFilter; + private BenchmarkRunner fullPathJsonFilter; private BenchmarkRunner maxStringLengthJsonFilter; private BenchmarkRunner maxStringLengthJacksonJsonFilter; @@ -86,7 +88,7 @@ public class CveFilterBenchmark { private BenchmarkRunner removeWhitespaceJsonFilter; - //@Param(value={"2KB","8KB","14KB","22KB","30KB","50KB","70KB","100KB","200KB"}) + // @Param(value={"2KB","8KB","14KB","22KB","30KB","50KB","70KB","100KB","200KB"}) @Param(value={"8KB"}) private String fileName; private final boolean prettyPrinted = false; @@ -102,7 +104,7 @@ public void init() throws Exception { pathMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new PathMaxSizeMaxStringLengthJsonFilter(maxStringLength, size, -1, anon, prune), prettyPrinted); pathMaxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, (JacksonJsonFilter) new JacksonJsonLogFilterBuilder().withMaxStringLength(maxStringLength).withAnonymize(anon).withPrune(prune).build(), prettyPrinted); - multiPathMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new DefaultJsonLogFilterBuilder().withMaxStringLength(maxStringLength).withAnonymize(anon).withPrune(prune).build(), prettyPrinted); + pathMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new DefaultJsonLogFilterBuilder().withMaxStringLength(maxStringLength).withAnonymize(anon).withPrune(prune).build(), prettyPrinted); maxStringLengthJacksonJsonFilter = new JacksonBenchmarkRunner(file, true, (JacksonJsonFilter) new JacksonJsonLogFilterBuilder().withMaxStringLength(maxStringLength).build(), prettyPrinted); maxStringLengthJsonFilter = new BenchmarkRunner(file, true, new MaxStringLengthJsonFilter(maxStringLength), prettyPrinted); @@ -119,6 +121,7 @@ public void init() throws Exception { removeWhitespaceJsonFilter = new BenchmarkRunner(file, true, new RemoveWhitespaceJsonFilter(), prettyPrinted); anyPathJsonFilter = new BenchmarkRunner(file, true, new AnyPathJsonFilter(size, new String[] {"//version"}, null), prettyPrinted); + fullPathJsonFilter = new BenchmarkRunner(file, true, new FullPathJsonFilter(size, anon, null), prettyPrinted); // other filters var singlePathJsonMasker = JsonMasker.getMasker( @@ -148,7 +151,7 @@ public long all_jackson() throws IOException { @Benchmark public long all_core() throws IOException { - return multiPathMaxStringLengthJsonFilter.benchmarkBytes(); + return pathMaxStringLengthJsonFilter.benchmarkBytes(); } @Benchmark @@ -215,7 +218,11 @@ public long anon_any_jsonMask() throws IOException { public long anon_full_jsonMask() throws IOException { return fullPathJsonMaskerJsonFilter.benchmarkBytesAsArray(); } - + + @Benchmark + public long anon_full_core() throws IOException { + return fullPathJsonFilter.benchmarkBytesAsArray(); + } public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() From 93e6054192dc21799b5100fbef17e25de91d49fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Skj=C3=B8lberg?= Date: Sun, 26 Oct 2025 01:26:47 +0200 Subject: [PATCH 5/8] Adjust benchmarks --- README.md | 13 +-- .../jsonfilter/jmh/AllFilterBenchmark.java | 7 +- .../jsonfilter/jmh/CveFilterBenchmark.java | 5 +- .../jmh/RemoveWhitespaceBenchmark.java | 4 +- .../jsonfilter/jmh/path/AnyPathBenchmark.java | 12 +- .../jmh/path/AnyPathFilterBenchmark.java | 110 ++++++++++++++++++ 6 files changed, 121 insertions(+), 30 deletions(-) create mode 100644 benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathFilterBenchmark.java diff --git a/README.md b/README.md index 6f962146..a97cccb4 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Bugs, feature suggestions and help requests can be filed with the [issue-tracker [Apache 2.0] ## Obtain -The project is built with [Maven] and is available on the central Maven repository. +The project is built with [Maven] and is available on the central Maven repository. No external dependencies are necessary, except for the opt-in Jackson module.
Maven coordinates @@ -194,7 +194,7 @@ Configure max path matches; so that filtering stops after a number of matches. T For example if the to-be filtered JSON document has a schema definition with a header + body structure, and the target value is in the header. ### Max size -Configure max size to limit the size of the resulting document. This reduces the size of the document by (silently) deleting the JSON content after the limit is reached. +Configure max size to limit the size of the resulting document. ### Metrics Pass in a `JsonFilterMetrics` argument to the `process` method like so: @@ -210,16 +210,11 @@ The resulting metrics could be logged as metadata alongside the JSON payload or * Make sure filters are actually operating as intended ## Performance -The `core` processors within this project are faster than the `Jackson`-based processors. This is expected as parser/serializer features have been traded for performance: - - * `core` processors are multiple times as fast as (streaming) `Jackson` processors, where - * skipping large parts of JSON documents (prune) decreases the difference, and - * small documents increase the difference, as `Jackson` is more expensive to initialize. - * working directly on bytes is faster than working on characters for the `core` processors. +The `core` processors within this project are faster than the `Jackson`-based processors. This is expected as parser/serializer features have been traded for performance. For a typical, light-weight web service, the overall system performance improvement for using the `core` filters over the `Jackson`-based filters will most likely be a few percent. -Memory use will be at most 2-8 times the raw JSON byte size; depending on the invoked `JsonFilter` method (some accept string, other raw bytes or chars). +Memory use will be at most 8 times the raw JSON byte size; depending on the invoked `JsonFilter` method (some accept `String`, other raw bytes or chars). See the benchmark results ([JDK 17](https://jmh.morethan.io/?source=https://raw.githubusercontent.com/skjolber/json-log-filter/master/benchmark/jmh/results/jmh-results-4.1.2.jdk17.json&topBar=off)) and the [JMH] module for running detailed benchmarks. diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java index b632271f..647fca00 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/AllFilterBenchmark.java @@ -113,20 +113,17 @@ public void init() throws Exception { pathAnonymizeMaxSizeMaxStringLengthJsonFilter = new BenchmarkRunner(file, true, new PathMaxSizeMaxStringLengthJsonFilter(20, -1, -1, new String[]{xpath}, null), prettyPrinted); // other filters - Set hashSet = new HashSet<>(); - hashSet.add("address"); - JsonMasker anyPathJsonMasker = JsonMasker.getMasker(hashSet); - var singlePathJsonMasker = JsonMasker.getMasker( JsonMaskingConfig.builder() .maskJsonPaths(Set.of("$.address")) .build() ); - anyPathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(anyPathJsonMasker), false); + anyPathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(JsonMasker.getMasker(Set.of("address"))), false); fullPathJsonMaskerJsonFilter = new BenchmarkRunner(file, true, new JsonMaskerJsonFilter(singlePathJsonMasker), false); anyPathLogbookJsonFilter = new BenchmarkRunner(file, true, PrimitiveJsonPropertyBodyFilter.replaceString((a) -> a.equals("address"), "*"), prettyPrinted); + } @Benchmark diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java index ffa10ded..229774e3 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java @@ -23,7 +23,6 @@ import org.openjdk.jmh.runner.options.OptionsBuilder; import com.github.skjolber.jsonfilter.JsonFilter; -import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; import com.github.skjolber.jsonfilter.core.DefaultJsonLogFilterBuilder; import com.github.skjolber.jsonfilter.core.FullPathJsonFilter; @@ -88,8 +87,8 @@ public class CveFilterBenchmark { private BenchmarkRunner removeWhitespaceJsonFilter; - // @Param(value={"2KB","8KB","14KB","22KB","30KB","50KB","70KB","100KB","200KB"}) - @Param(value={"8KB"}) + @Param(value={"2KB","8KB","14KB","22KB","30KB","50KB","70KB","100KB","200KB"}) + //@Param(value={"8KB"}) private String fileName; private final boolean prettyPrinted = false; diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/RemoveWhitespaceBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/RemoveWhitespaceBenchmark.java index 896f2f0f..d6aa1ead 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/RemoveWhitespaceBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/RemoveWhitespaceBenchmark.java @@ -60,12 +60,12 @@ public void init() throws Exception { } @Benchmark - public long test() throws IOException { + public long testEnabled() throws IOException { return benchmarkBytes(test0, enabled); } @Benchmark - public long test0PP() throws IOException { + public long testDisabled() throws IOException { return benchmarkBytes(test0, disabled); } diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java index c4317fab..53f5ec3a 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathBenchmark.java @@ -3,9 +3,7 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; -import java.util.HashSet; import java.util.List; -import java.util.Set; import java.util.concurrent.TimeUnit; import org.apache.commons.io.IOUtils; @@ -26,17 +24,9 @@ import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; -import com.github.skjolber.jsonfilter.JsonFilter; import com.github.skjolber.jsonfilter.base.AbstractPathJsonFilter.FilterType; import com.github.skjolber.jsonfilter.base.path.any.AnyPathFilter; import com.github.skjolber.jsonfilter.base.path.any.AnyPathFilters; -import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; -import com.github.skjolber.jsonfilter.core.MaxSizeJsonFilter; -import com.github.skjolber.jsonfilter.jackson.JacksonAnyPathMaxStringLengthJsonFilter; -import com.github.skjolber.jsonfilter.jmh.utils.JsonMaskerJsonFilter; - -import dev.blaauwendraad.masker.json.JsonMasker; -import dev.blaauwendraad.masker.json.config.JsonMaskingConfig; @State(Scope.Thread) @@ -57,6 +47,7 @@ public class AnyPathBenchmark { private List chars; private List bytes; + private AnyPathFilters anyPathFilters; @Setup @@ -123,7 +114,6 @@ public long jsonLogFilterSetChars() throws IOException { return count; } - @Benchmark public long jsonLogFilterSetBytes() throws IOException { diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathFilterBenchmark.java new file mode 100644 index 00000000..cc1ca8bd --- /dev/null +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/path/AnyPathFilterBenchmark.java @@ -0,0 +1,110 @@ +package com.github.skjolber.jsonfilter.jmh.path; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.apache.commons.io.IOUtils; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; +import org.openjdk.jmh.results.format.ResultFormatType; +import org.openjdk.jmh.runner.Runner; +import org.openjdk.jmh.runner.RunnerException; +import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.OptionsBuilder; + +import com.github.skjolber.jsonfilter.core.AnyPathJsonFilter; + +import dev.blaauwendraad.masker.json.JsonMasker; + + +@State(Scope.Thread) +@BenchmarkMode(Mode.Throughput) +@OutputTimeUnit(TimeUnit.SECONDS) +@Warmup(iterations = 1, time = 3, timeUnit = TimeUnit.SECONDS) +@Measurement(iterations = 1, time = 3, timeUnit = TimeUnit.SECONDS) +@Fork(1) +public class AnyPathFilterBenchmark { + + private String[] KEYS = new String[] {"name", "first_name", "last_name", "address1", "address2", "latitude", "longitude", "phone", "email", "user_id", + "subtotal_price", "token", "cart_token", "checkout_token", "admin_graphql_api_id", "id", "code", "po_number", "zip", "city" + }; + + //@Param(value={"1","2","3","4","5","6","7","8","9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"}) + @Param(value={"1","5", "10", "15", "20"}) + private String count; + + private AnyPathJsonFilter anyPathJsonFilter; + private JsonMasker jsonMaskerJsonFilter; + + private byte[] bytes; + private char[] chars; + private String string; + + @Setup + public void init() throws Exception { + File file = new File("./src/test/resources/benchmark/shopify/order.json"); + + bytes = IOUtils.toByteArray(new FileInputStream(file)); + string = new String(bytes, StandardCharsets.UTF_8); + chars = string.toCharArray(); + + List keys = new ArrayList<>(); + List keysWithPrefix = new ArrayList<>(); + + int count = Integer.parseInt(this.count); + for(int i = 0; i < count; i++) { + keys.add(KEYS[i]); + keysWithPrefix.add("//" + KEYS[i]); + } + + jsonMaskerJsonFilter = JsonMasker.getMasker(new HashSet<>(keys)); + anyPathJsonFilter = new AnyPathJsonFilter(-1, keysWithPrefix.toArray(new String[keysWithPrefix.size()]), null); + } + + @Benchmark + public String mark_chars() throws IOException { + return jsonMaskerJsonFilter.mask(string); + } + + @Benchmark + public byte[] mark_bytes() throws IOException { + return jsonMaskerJsonFilter.mask(bytes); + } + + @Benchmark + public String core_chars() throws IOException { + return anyPathJsonFilter.process(string); + } + + @Benchmark + public byte[] core_bytes() throws IOException { + return anyPathJsonFilter.process(bytes); + } + + public static void main(String[] args) throws RunnerException { + Options opt = new OptionsBuilder() + .include(AnyPathFilterBenchmark.class.getName()) + .warmupIterations(1) + .measurementIterations(1) + .forks(1) + .resultFormat(ResultFormatType.JSON) + .result("target/" + System.currentTimeMillis() + ".json") + .build(); + + new Runner(opt).run(); + } +} \ No newline at end of file From ed1a6c2459b5af10bd0268625aaed74b50529729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Skj=C3=B8lberg?= Date: Sun, 26 Oct 2025 02:05:04 +0200 Subject: [PATCH 6/8] Adjust readme, benchmark results --- README.md | 18 +- .../jmh-results-5.0.0.graalvm.jdk25.json | 9886 +++++++++++++++++ .../jmh/results/jmh-results-5.0.0.jdk25.json | 9076 +++++++++++++++ .../jsonfilter/jmh/CveFilterBenchmark.java | 4 +- 4 files changed, 18973 insertions(+), 11 deletions(-) create mode 100644 benchmark/jmh/results/jmh-results-5.0.0.graalvm.jdk25.json create mode 100644 benchmark/jmh/results/jmh-results-5.0.0.jdk25.json diff --git a/README.md b/README.md index a97cccb4..8ea84fc1 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,13 @@ High-performance filtering of to-be-logged JSON. Reads, filters and writes JSON Features: - * Mask single values or whole subtrees - * Remove single values or whole subtrees - * Limit String value size + * Anonymize single values or whole subtrees + * Remove whole subtrees + * Limit text value size * Limit document size (skip end of document when max size is reached) * Remove whitespace -The library contains multiple filter implementations as to accommodate combinations of the above features with as little overhead as possible. +The library contains multiple filter implementations as to accommodate combinations of the above features with as little overhead as possible. No external dependencies are necessary, except for the opt-in [Jackson] module (see below). The equivalent filters are also implemented using [Jackson]: @@ -41,7 +41,7 @@ Bugs, feature suggestions and help requests can be filed with the [issue-tracker [Apache 2.0] ## Obtain -The project is built with [Maven] and is available on the central Maven repository. No external dependencies are necessary, except for the opt-in Jackson module. +The project is built with [Maven] and is available on the central Maven repository.
Maven coordinates @@ -111,7 +111,7 @@ Use a `DefaultJsonLogFilterBuilder` or `JacksonJsonLogFilterBuilder` to configur ```java JsonFilter filter = DefaultJsonLogFilterBuilder.createInstance() .withMaxStringLength(127) // cuts long texts - .withAnonymize("$.customer.email") // inserts ***** for values + .withAnonymize("$.customer.email") // inserts "*" for values .withPrune("$.customer.account") // removes whole subtree .withMaxPathMatches(16) // halt anon/prune after a number of hits .withMaxSize(128*1024) @@ -131,7 +131,7 @@ Configure max string length for output like } ``` -### Mask (anonymize) +### anonymize (mask) Configure anonymize for output like ```json @@ -216,7 +216,7 @@ For a typical, light-weight web service, the overall system performance improvem Memory use will be at most 8 times the raw JSON byte size; depending on the invoked `JsonFilter` method (some accept `String`, other raw bytes or chars). -See the benchmark results ([JDK 17](https://jmh.morethan.io/?source=https://raw.githubusercontent.com/skjolber/json-log-filter/master/benchmark/jmh/results/jmh-results-4.1.2.jdk17.json&topBar=off)) and the [JMH] module for running detailed benchmarks. +See the benchmark results ([JDK 25](https://jmh.morethan.io/?source=https://raw.githubusercontent.com/skjolber/json-log-filter/master/benchmark/jmh/results/jmh-results-5.0.0.jdk25.json&topBar=off)) and the [JMH] module for running detailed benchmarks. There is also a [path](impl/path) artifact which helps facilitate per-path filters for request/response-logging applications, which should further improve performance. @@ -229,7 +229,7 @@ Using SIMD for parsing JSON: Alternative JSON filters: - * [json-masker](https://github.com/Breus/json-masker) (included in benchmark). + * [json-masker](https://github.com/Breus/json-masker) (included in some of the benchmarks). [Apache 2.0]: https://www.apache.org/licenses/LICENSE-2.0.html [issue-tracker]: https://github.com/skjolber/json-log-filter/issues diff --git a/benchmark/jmh/results/jmh-results-5.0.0.graalvm.jdk25.json b/benchmark/jmh/results/jmh-results-5.0.0.graalvm.jdk25.json new file mode 100644 index 00000000..bacf8ee3 --- /dev/null +++ b/benchmark/jmh/results/jmh-results-5.0.0.graalvm.jdk25.json @@ -0,0 +1,9886 @@ +[ + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 747431.8163004188, + "scoreError" : 336354.1745421085, + "scoreConfidence" : [ + 411077.6417583103, + 1083785.9908425272 + ], + "scorePercentiles" : { + "0.0" : 726396.7583337545, + "50.0" : 755110.8725090723, + "90.0" : 760787.8180584301, + "95.0" : 760787.8180584301, + "99.0" : 760787.8180584301, + "99.9" : 760787.8180584301, + "99.99" : 760787.8180584301, + "99.999" : 760787.8180584301, + "99.9999" : 760787.8180584301, + "100.0" : 760787.8180584301 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 726396.7583337545, + 760787.8180584301, + 755110.8725090723 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 264790.4213560326, + "scoreError" : 83136.5365889785, + "scoreConfidence" : [ + 181653.8847670541, + 347926.9579450111 + ], + "scorePercentiles" : { + "0.0" : 259976.61081400872, + "50.0" : 265357.05048040807, + "90.0" : 269037.6027736811, + "95.0" : 269037.6027736811, + "99.0" : 269037.6027736811, + "99.9" : 269037.6027736811, + "99.99" : 269037.6027736811, + "99.999" : 269037.6027736811, + "99.9999" : 269037.6027736811, + "100.0" : 269037.6027736811 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 259976.61081400872, + 269037.6027736811, + 265357.05048040807 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 143008.0226831941, + "scoreError" : 45272.09959976612, + "scoreConfidence" : [ + 97735.92308342799, + 188280.12228296022 + ], + "scorePercentiles" : { + "0.0" : 140171.01998235792, + "50.0" : 144077.9754582639, + "90.0" : 144775.0726089604, + "95.0" : 144775.0726089604, + "99.0" : 144775.0726089604, + "99.9" : 144775.0726089604, + "99.99" : 144775.0726089604, + "99.999" : 144775.0726089604, + "99.9999" : 144775.0726089604, + "100.0" : 144775.0726089604 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 140171.01998235792, + 144077.9754582639, + 144775.0726089604 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 87192.2723238484, + "scoreError" : 27236.92028247176, + "scoreConfidence" : [ + 59955.35204137664, + 114429.19260632017 + ], + "scorePercentiles" : { + "0.0" : 85497.79578473158, + "50.0" : 87764.82130694532, + "90.0" : 88314.19987986829, + "95.0" : 88314.19987986829, + "99.0" : 88314.19987986829, + "99.9" : 88314.19987986829, + "99.99" : 88314.19987986829, + "99.999" : 88314.19987986829, + "99.9999" : 88314.19987986829, + "100.0" : 88314.19987986829 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 85497.79578473158, + 88314.19987986829, + 87764.82130694532 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 61711.46582372298, + "scoreError" : 57627.69413297817, + "scoreConfidence" : [ + 4083.771690744812, + 119339.15995670116 + ], + "scorePercentiles" : { + "0.0" : 59717.0477576536, + "50.0" : 60063.95557916177, + "90.0" : 65353.3941343536, + "95.0" : 65353.3941343536, + "99.0" : 65353.3941343536, + "99.9" : 65353.3941343536, + "99.99" : 65353.3941343536, + "99.999" : 65353.3941343536, + "99.9999" : 65353.3941343536, + "100.0" : 65353.3941343536 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 65353.3941343536, + 59717.0477576536, + 60063.95557916177 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 35938.598174786755, + "scoreError" : 72145.48904412377, + "scoreConfidence" : [ + -36206.89086933701, + 108084.08721891051 + ], + "scorePercentiles" : { + "0.0" : 31444.38383297044, + "50.0" : 37485.77928054804, + "90.0" : 38885.63141084179, + "95.0" : 38885.63141084179, + "99.0" : 38885.63141084179, + "99.9" : 38885.63141084179, + "99.99" : 38885.63141084179, + "99.999" : 38885.63141084179, + "99.9999" : 38885.63141084179, + "100.0" : 38885.63141084179 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 31444.38383297044, + 37485.77928054804, + 38885.63141084179 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 28566.604017939786, + "scoreError" : 3557.73305088301, + "scoreConfidence" : [ + 25008.870967056777, + 32124.337068822795 + ], + "scorePercentiles" : { + "0.0" : 28391.342002713685, + "50.0" : 28531.793825264267, + "90.0" : 28776.67622584141, + "95.0" : 28776.67622584141, + "99.0" : 28776.67622584141, + "99.9" : 28776.67622584141, + "99.99" : 28776.67622584141, + "99.999" : 28776.67622584141, + "99.9999" : 28776.67622584141, + "100.0" : 28776.67622584141 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 28531.793825264267, + 28776.67622584141, + 28391.342002713685 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 17805.673121771342, + "scoreError" : 6087.315890967173, + "scoreConfidence" : [ + 11718.35723080417, + 23892.989012738515 + ], + "scorePercentiles" : { + "0.0" : 17524.090808160847, + "50.0" : 17718.72151416305, + "90.0" : 18174.20704299013, + "95.0" : 18174.20704299013, + "99.0" : 18174.20704299013, + "99.9" : 18174.20704299013, + "99.99" : 18174.20704299013, + "99.999" : 18174.20704299013, + "99.9999" : 18174.20704299013, + "100.0" : 18174.20704299013 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 17718.72151416305, + 17524.090808160847, + 18174.20704299013 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 9481.464246465644, + "scoreError" : 2756.4856595977835, + "scoreConfidence" : [ + 6724.978586867861, + 12237.949906063428 + ], + "scorePercentiles" : { + "0.0" : 9334.72486724841, + "50.0" : 9473.105464165115, + "90.0" : 9636.562407983414, + "95.0" : 9636.562407983414, + "99.0" : 9636.562407983414, + "99.9" : 9636.562407983414, + "99.99" : 9636.562407983414, + "99.999" : 9636.562407983414, + "99.9999" : 9636.562407983414, + "100.0" : 9636.562407983414 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 9636.562407983414, + 9334.72486724841, + 9473.105464165115 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 200723.90459854013, + "scoreError" : 16149.13322495639, + "scoreConfidence" : [ + 184574.77137358373, + 216873.03782349653 + ], + "scorePercentiles" : { + "0.0" : 199720.29499991497, + "50.0" : 201057.97602637968, + "90.0" : 201393.4427693257, + "95.0" : 201393.4427693257, + "99.0" : 201393.4427693257, + "99.9" : 201393.4427693257, + "99.99" : 201393.4427693257, + "99.999" : 201393.4427693257, + "99.9999" : 201393.4427693257, + "100.0" : 201393.4427693257 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 201057.97602637968, + 201393.4427693257, + 199720.29499991497 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 77405.80966507133, + "scoreError" : 30351.421495958744, + "scoreConfidence" : [ + 47054.388169112586, + 107757.23116103007 + ], + "scorePercentiles" : { + "0.0" : 75488.4704067518, + "50.0" : 78261.35334906349, + "90.0" : 78467.60523939872, + "95.0" : 78467.60523939872, + "99.0" : 78467.60523939872, + "99.9" : 78467.60523939872, + "99.99" : 78467.60523939872, + "99.999" : 78467.60523939872, + "99.9999" : 78467.60523939872, + "100.0" : 78467.60523939872 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 75488.4704067518, + 78261.35334906349, + 78467.60523939872 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 41274.55336771733, + "scoreError" : 45974.1058026194, + "scoreConfidence" : [ + -4699.552434902071, + 87248.65917033673 + ], + "scorePercentiles" : { + "0.0" : 39607.1658661917, + "50.0" : 40043.00055129517, + "90.0" : 44173.4936856651, + "95.0" : 44173.4936856651, + "99.0" : 44173.4936856651, + "99.9" : 44173.4936856651, + "99.99" : 44173.4936856651, + "99.999" : 44173.4936856651, + "99.9999" : 44173.4936856651, + "100.0" : 44173.4936856651 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 40043.00055129517, + 39607.1658661917, + 44173.4936856651 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 27448.503571001274, + "scoreError" : 12019.003085498158, + "scoreConfidence" : [ + 15429.500485503117, + 39467.506656499434 + ], + "scorePercentiles" : { + "0.0" : 26961.42728602355, + "50.0" : 27185.99058292284, + "90.0" : 28198.092844057435, + "95.0" : 28198.092844057435, + "99.0" : 28198.092844057435, + "99.9" : 28198.092844057435, + "99.99" : 28198.092844057435, + "99.999" : 28198.092844057435, + "99.9999" : 28198.092844057435, + "100.0" : 28198.092844057435 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 26961.42728602355, + 27185.99058292284, + 28198.092844057435 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 18783.034920737282, + "scoreError" : 10419.749450932772, + "scoreConfidence" : [ + 8363.28546980451, + 29202.78437167005 + ], + "scorePercentiles" : { + "0.0" : 18299.43897521598, + "50.0" : 18636.498012868775, + "90.0" : 19413.167774127098, + "95.0" : 19413.167774127098, + "99.0" : 19413.167774127098, + "99.9" : 19413.167774127098, + "99.99" : 19413.167774127098, + "99.999" : 19413.167774127098, + "99.9999" : 19413.167774127098, + "100.0" : 19413.167774127098 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 18299.43897521598, + 19413.167774127098, + 18636.498012868775 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 11771.974251233287, + "scoreError" : 5197.290239007201, + "scoreConfidence" : [ + 6574.6840122260855, + 16969.264490240486 + ], + "scorePercentiles" : { + "0.0" : 11605.719928657096, + "50.0" : 11609.282743287331, + "90.0" : 12100.920081755428, + "95.0" : 12100.920081755428, + "99.0" : 12100.920081755428, + "99.9" : 12100.920081755428, + "99.99" : 12100.920081755428, + "99.999" : 12100.920081755428, + "99.9999" : 12100.920081755428, + "100.0" : 12100.920081755428 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 11609.282743287331, + 11605.719928657096, + 12100.920081755428 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 8083.302487829314, + "scoreError" : 1521.2157456667853, + "scoreConfidence" : [ + 6562.086742162528, + 9604.5182334961 + ], + "scorePercentiles" : { + "0.0" : 7999.657009581574, + "50.0" : 8083.830011114831, + "90.0" : 8166.420442791535, + "95.0" : 8166.420442791535, + "99.0" : 8166.420442791535, + "99.9" : 8166.420442791535, + "99.99" : 8166.420442791535, + "99.999" : 8166.420442791535, + "99.9999" : 8166.420442791535, + "100.0" : 8166.420442791535 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 8083.830011114831, + 7999.657009581574, + 8166.420442791535 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 5596.440009916917, + "scoreError" : 506.3357050146245, + "scoreConfidence" : [ + 5090.104304902293, + 6102.775714931541 + ], + "scorePercentiles" : { + "0.0" : 5574.240453995739, + "50.0" : 5587.52310589265, + "90.0" : 5627.556469862359, + "95.0" : 5627.556469862359, + "99.0" : 5627.556469862359, + "99.9" : 5627.556469862359, + "99.99" : 5627.556469862359, + "99.999" : 5627.556469862359, + "99.9999" : 5627.556469862359, + "100.0" : 5627.556469862359 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 5587.52310589265, + 5574.240453995739, + 5627.556469862359 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 2768.5952860535695, + "scoreError" : 409.2884959456884, + "scoreConfidence" : [ + 2359.306790107881, + 3177.8837819992577 + ], + "scorePercentiles" : { + "0.0" : 2742.994478570035, + "50.0" : 2777.967126820544, + "90.0" : 2784.824252770129, + "95.0" : 2784.824252770129, + "99.0" : 2784.824252770129, + "99.9" : 2784.824252770129, + "99.99" : 2784.824252770129, + "99.999" : 2784.824252770129, + "99.9999" : 2784.824252770129, + "100.0" : 2784.824252770129 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 2777.967126820544, + 2742.994478570035, + 2784.824252770129 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 700728.8030713821, + "scoreError" : 189241.1844203656, + "scoreConfidence" : [ + 511487.6186510165, + 889969.9874917477 + ], + "scorePercentiles" : { + "0.0" : 692562.5653009115, + "50.0" : 697223.6106617176, + "90.0" : 712400.2332515169, + "95.0" : 712400.2332515169, + "99.0" : 712400.2332515169, + "99.9" : 712400.2332515169, + "99.99" : 712400.2332515169, + "99.999" : 712400.2332515169, + "99.9999" : 712400.2332515169, + "100.0" : 712400.2332515169 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 692562.5653009115, + 697223.6106617176, + 712400.2332515169 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 272824.42106700194, + "scoreError" : 225108.74604147146, + "scoreConfidence" : [ + 47715.67502553048, + 497933.16710847337 + ], + "scorePercentiles" : { + "0.0" : 258576.67517501293, + "50.0" : 279909.7898676228, + "90.0" : 279986.7981583702, + "95.0" : 279986.7981583702, + "99.0" : 279986.7981583702, + "99.9" : 279986.7981583702, + "99.99" : 279986.7981583702, + "99.999" : 279986.7981583702, + "99.9999" : 279986.7981583702, + "100.0" : 279986.7981583702 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 258576.67517501293, + 279909.7898676228, + 279986.7981583702 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 148098.86415898753, + "scoreError" : 54813.35668864847, + "scoreConfidence" : [ + 93285.50747033907, + 202912.220847636 + ], + "scorePercentiles" : { + "0.0" : 144698.05494003205, + "50.0" : 149205.1955200034, + "90.0" : 150393.3420169271, + "95.0" : 150393.3420169271, + "99.0" : 150393.3420169271, + "99.9" : 150393.3420169271, + "99.99" : 150393.3420169271, + "99.999" : 150393.3420169271, + "99.9999" : 150393.3420169271, + "100.0" : 150393.3420169271 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 144698.05494003205, + 150393.3420169271, + 149205.1955200034 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 87005.55409815331, + "scoreError" : 87925.94378437237, + "scoreConfidence" : [ + -920.3896862190595, + 174931.49788252567 + ], + "scorePercentiles" : { + "0.0" : 81449.06223701834, + "50.0" : 89515.84623604314, + "90.0" : 90051.75382139845, + "95.0" : 90051.75382139845, + "99.0" : 90051.75382139845, + "99.9" : 90051.75382139845, + "99.99" : 90051.75382139845, + "99.999" : 90051.75382139845, + "99.9999" : 90051.75382139845, + "100.0" : 90051.75382139845 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 81449.06223701834, + 89515.84623604314, + 90051.75382139845 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 62842.99308637027, + "scoreError" : 65209.88823854539, + "scoreConfidence" : [ + -2366.8951521751223, + 128052.88132491565 + ], + "scorePercentiles" : { + "0.0" : 58726.1049092965, + "50.0" : 64647.32419979774, + "90.0" : 65155.550150016585, + "95.0" : 65155.550150016585, + "99.0" : 65155.550150016585, + "99.9" : 65155.550150016585, + "99.99" : 65155.550150016585, + "99.999" : 65155.550150016585, + "99.9999" : 65155.550150016585, + "100.0" : 65155.550150016585 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 58726.1049092965, + 65155.550150016585, + 64647.32419979774 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 37090.797092672365, + "scoreError" : 21523.938334488783, + "scoreConfidence" : [ + 15566.858758183582, + 58614.73542716115 + ], + "scorePercentiles" : { + "0.0" : 35729.572999427546, + "50.0" : 37724.19650261093, + "90.0" : 37818.621775978616, + "95.0" : 37818.621775978616, + "99.0" : 37818.621775978616, + "99.9" : 37818.621775978616, + "99.99" : 37818.621775978616, + "99.999" : 37818.621775978616, + "99.9999" : 37818.621775978616, + "100.0" : 37818.621775978616 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 37724.19650261093, + 37818.621775978616, + 35729.572999427546 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 26576.334250269196, + "scoreError" : 16336.431140793104, + "scoreConfidence" : [ + 10239.903109476092, + 42912.7653910623 + ], + "scorePercentiles" : { + "0.0" : 25594.936778191524, + "50.0" : 26785.104347638575, + "90.0" : 27348.961624977495, + "95.0" : 27348.961624977495, + "99.0" : 27348.961624977495, + "99.9" : 27348.961624977495, + "99.99" : 27348.961624977495, + "99.999" : 27348.961624977495, + "99.9999" : 27348.961624977495, + "100.0" : 27348.961624977495 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 27348.961624977495, + 25594.936778191524, + 26785.104347638575 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 16666.759608773882, + "scoreError" : 3478.408490518698, + "scoreConfidence" : [ + 13188.351118255185, + 20145.16809929258 + ], + "scorePercentiles" : { + "0.0" : 16535.79113248473, + "50.0" : 16578.986089539798, + "90.0" : 16885.501604297126, + "95.0" : 16885.501604297126, + "99.0" : 16885.501604297126, + "99.9" : 16885.501604297126, + "99.99" : 16885.501604297126, + "99.999" : 16885.501604297126, + "99.9999" : 16885.501604297126, + "100.0" : 16885.501604297126 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 16578.986089539798, + 16535.79113248473, + 16885.501604297126 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 9400.413778285221, + "scoreError" : 1642.0989049404698, + "scoreConfidence" : [ + 7758.3148733447515, + 11042.51268322569 + ], + "scorePercentiles" : { + "0.0" : 9303.873189310296, + "50.0" : 9415.344114015325, + "90.0" : 9482.024031530045, + "95.0" : 9482.024031530045, + "99.0" : 9482.024031530045, + "99.9" : 9482.024031530045, + "99.99" : 9482.024031530045, + "99.999" : 9482.024031530045, + "99.9999" : 9482.024031530045, + "100.0" : 9482.024031530045 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 9303.873189310296, + 9482.024031530045, + 9415.344114015325 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 208073.88314244655, + "scoreError" : 19597.333939492783, + "scoreConfidence" : [ + 188476.54920295376, + 227671.21708193934 + ], + "scorePercentiles" : { + "0.0" : 207130.74481560927, + "50.0" : 207847.76711761655, + "90.0" : 209243.1374941139, + "95.0" : 209243.1374941139, + "99.0" : 209243.1374941139, + "99.9" : 209243.1374941139, + "99.99" : 209243.1374941139, + "99.999" : 209243.1374941139, + "99.9999" : 209243.1374941139, + "100.0" : 209243.1374941139 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 207130.74481560927, + 209243.1374941139, + 207847.76711761655 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 72396.4066926752, + "scoreError" : 50752.12952691657, + "scoreConfidence" : [ + 21644.277165758627, + 123148.53621959177 + ], + "scorePercentiles" : { + "0.0" : 70085.06261264552, + "50.0" : 71620.18617866964, + "90.0" : 75483.97128671042, + "95.0" : 75483.97128671042, + "99.0" : 75483.97128671042, + "99.9" : 75483.97128671042, + "99.99" : 75483.97128671042, + "99.999" : 75483.97128671042, + "99.9999" : 75483.97128671042, + "100.0" : 75483.97128671042 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 71620.18617866964, + 75483.97128671042, + 70085.06261264552 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 38662.620217959106, + "scoreError" : 45464.7856208552, + "scoreConfidence" : [ + -6802.165402896091, + 84127.4058388143 + ], + "scorePercentiles" : { + "0.0" : 36805.10999947525, + "50.0" : 37688.037163890185, + "90.0" : 41494.71349051188, + "95.0" : 41494.71349051188, + "99.0" : 41494.71349051188, + "99.9" : 41494.71349051188, + "99.99" : 41494.71349051188, + "99.999" : 41494.71349051188, + "99.9999" : 41494.71349051188, + "100.0" : 41494.71349051188 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 37688.037163890185, + 36805.10999947525, + 41494.71349051188 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 26490.889564103392, + "scoreError" : 10443.399566706757, + "scoreConfidence" : [ + 16047.489997396635, + 36934.28913081015 + ], + "scorePercentiles" : { + "0.0" : 25916.862971072256, + "50.0" : 26494.080147853965, + "90.0" : 27061.72557338396, + "95.0" : 27061.72557338396, + "99.0" : 27061.72557338396, + "99.9" : 27061.72557338396, + "99.99" : 27061.72557338396, + "99.999" : 27061.72557338396, + "99.9999" : 27061.72557338396, + "100.0" : 27061.72557338396 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 25916.862971072256, + 26494.080147853965, + 27061.72557338396 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 17929.715040220315, + "scoreError" : 11677.539785206569, + "scoreConfidence" : [ + 6252.175255013746, + 29607.254825426884 + ], + "scorePercentiles" : { + "0.0" : 17205.40213912561, + "50.0" : 18164.445497700766, + "90.0" : 18419.297483834576, + "95.0" : 18419.297483834576, + "99.0" : 18419.297483834576, + "99.9" : 18419.297483834576, + "99.99" : 18419.297483834576, + "99.999" : 18419.297483834576, + "99.9999" : 18419.297483834576, + "100.0" : 18419.297483834576 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 17205.40213912561, + 18419.297483834576, + 18164.445497700766 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 11214.981452482993, + "scoreError" : 7985.864809339792, + "scoreConfidence" : [ + 3229.1166431432002, + 19200.846261822786 + ], + "scorePercentiles" : { + "0.0" : 10930.690055173098, + "50.0" : 10995.19721646919, + "90.0" : 11719.057085806688, + "95.0" : 11719.057085806688, + "99.0" : 11719.057085806688, + "99.9" : 11719.057085806688, + "99.99" : 11719.057085806688, + "99.999" : 11719.057085806688, + "99.9999" : 11719.057085806688, + "100.0" : 11719.057085806688 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 10930.690055173098, + 10995.19721646919, + 11719.057085806688 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 7656.00906468055, + "scoreError" : 694.4533719995188, + "scoreConfidence" : [ + 6961.555692681031, + 8350.462436680069 + ], + "scorePercentiles" : { + "0.0" : 7613.03647887716, + "50.0" : 7669.496157523937, + "90.0" : 7685.494557640554, + "95.0" : 7685.494557640554, + "99.0" : 7685.494557640554, + "99.9" : 7685.494557640554, + "99.99" : 7685.494557640554, + "99.999" : 7685.494557640554, + "99.9999" : 7685.494557640554, + "100.0" : 7685.494557640554 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 7685.494557640554, + 7613.03647887716, + 7669.496157523937 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 5322.3364382332265, + "scoreError" : 573.0396877664979, + "scoreConfidence" : [ + 4749.296750466729, + 5895.3761259997245 + ], + "scorePercentiles" : { + "0.0" : 5286.074182739819, + "50.0" : 5339.843283148004, + "90.0" : 5341.091848811855, + "95.0" : 5341.091848811855, + "99.0" : 5341.091848811855, + "99.9" : 5341.091848811855, + "99.99" : 5341.091848811855, + "99.999" : 5341.091848811855, + "99.9999" : 5341.091848811855, + "100.0" : 5341.091848811855 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 5341.091848811855, + 5286.074182739819, + 5339.843283148004 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 2681.7260432423736, + "scoreError" : 600.1792162208859, + "scoreConfidence" : [ + 2081.546827021488, + 3281.9052594632594 + ], + "scorePercentiles" : { + "0.0" : 2652.1422998323765, + "50.0" : 2675.881296982052, + "90.0" : 2717.1545329126934, + "95.0" : 2717.1545329126934, + "99.0" : 2717.1545329126934, + "99.9" : 2717.1545329126934, + "99.99" : 2717.1545329126934, + "99.999" : 2717.1545329126934, + "99.9999" : 2717.1545329126934, + "100.0" : 2717.1545329126934 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 2675.881296982052, + 2652.1422998323765, + 2717.1545329126934 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 818214.1035481141, + "scoreError" : 291713.65919342265, + "scoreConfidence" : [ + 526500.4443546914, + 1109927.7627415368 + ], + "scorePercentiles" : { + "0.0" : 801338.0849189836, + "50.0" : 820165.6638813465, + "90.0" : 833138.5618440121, + "95.0" : 833138.5618440121, + "99.0" : 833138.5618440121, + "99.9" : 833138.5618440121, + "99.99" : 833138.5618440121, + "99.999" : 833138.5618440121, + "99.9999" : 833138.5618440121, + "100.0" : 833138.5618440121 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 801338.0849189836, + 833138.5618440121, + 820165.6638813465 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 274089.33581566723, + "scoreError" : 145109.74126588504, + "scoreConfidence" : [ + 128979.5945497822, + 419199.07708155224 + ], + "scorePercentiles" : { + "0.0" : 264931.72038884385, + "50.0" : 278060.72845909593, + "90.0" : 279275.5585990618, + "95.0" : 279275.5585990618, + "99.0" : 279275.5585990618, + "99.9" : 279275.5585990618, + "99.99" : 279275.5585990618, + "99.999" : 279275.5585990618, + "99.9999" : 279275.5585990618, + "100.0" : 279275.5585990618 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 264931.72038884385, + 279275.5585990618, + 278060.72845909593 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 147978.453074041, + "scoreError" : 111072.7383514034, + "scoreConfidence" : [ + 36905.7147226376, + 259051.19142544438 + ], + "scorePercentiles" : { + "0.0" : 143859.47043580844, + "50.0" : 145104.12868530286, + "90.0" : 154971.7601010117, + "95.0" : 154971.7601010117, + "99.0" : 154971.7601010117, + "99.9" : 154971.7601010117, + "99.99" : 154971.7601010117, + "99.999" : 154971.7601010117, + "99.9999" : 154971.7601010117, + "100.0" : 154971.7601010117 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 143859.47043580844, + 154971.7601010117, + 145104.12868530286 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 94626.83121525479, + "scoreError" : 71486.04781126571, + "scoreConfidence" : [ + 23140.783403989073, + 166112.8790265205 + ], + "scorePercentiles" : { + "0.0" : 90511.95842230871, + "50.0" : 95054.95537462512, + "90.0" : 98313.57984883054, + "95.0" : 98313.57984883054, + "99.0" : 98313.57984883054, + "99.9" : 98313.57984883054, + "99.99" : 98313.57984883054, + "99.999" : 98313.57984883054, + "99.9999" : 98313.57984883054, + "100.0" : 98313.57984883054 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 90511.95842230871, + 95054.95537462512, + 98313.57984883054 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 66487.34309652043, + "scoreError" : 35124.22040318486, + "scoreConfidence" : [ + 31363.122693335572, + 101611.56349970528 + ], + "scorePercentiles" : { + "0.0" : 64701.839092333445, + "50.0" : 66233.06708000985, + "90.0" : 68527.123117218, + "95.0" : 68527.123117218, + "99.0" : 68527.123117218, + "99.9" : 68527.123117218, + "99.99" : 68527.123117218, + "99.999" : 68527.123117218, + "99.9999" : 68527.123117218, + "100.0" : 68527.123117218 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 64701.839092333445, + 66233.06708000985, + 68527.123117218 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 40798.61830478508, + "scoreError" : 9174.422211828158, + "scoreConfidence" : [ + 31624.19609295692, + 49973.04051661324 + ], + "scorePercentiles" : { + "0.0" : 40220.812681567644, + "50.0" : 41037.572784572854, + "90.0" : 41137.46944821473, + "95.0" : 41137.46944821473, + "99.0" : 41137.46944821473, + "99.9" : 41137.46944821473, + "99.99" : 41137.46944821473, + "99.999" : 41137.46944821473, + "99.9999" : 41137.46944821473, + "100.0" : 41137.46944821473 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 41037.572784572854, + 41137.46944821473, + 40220.812681567644 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 30129.184561687725, + "scoreError" : 9992.399826778732, + "scoreConfidence" : [ + 20136.784734908993, + 40121.58438846646 + ], + "scorePercentiles" : { + "0.0" : 29501.772447090745, + "50.0" : 30373.900707986548, + "90.0" : 30511.880529985887, + "95.0" : 30511.880529985887, + "99.0" : 30511.880529985887, + "99.9" : 30511.880529985887, + "99.99" : 30511.880529985887, + "99.999" : 30511.880529985887, + "99.9999" : 30511.880529985887, + "100.0" : 30511.880529985887 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 29501.772447090745, + 30373.900707986548, + 30511.880529985887 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 19522.145940390063, + "scoreError" : 17428.3601650111, + "scoreConfidence" : [ + 2093.7857753789613, + 36950.50610540116 + ], + "scorePercentiles" : { + "0.0" : 18421.42337709082, + "50.0" : 20009.903047295466, + "90.0" : 20135.111396783905, + "95.0" : 20135.111396783905, + "99.0" : 20135.111396783905, + "99.9" : 20135.111396783905, + "99.99" : 20135.111396783905, + "99.999" : 20135.111396783905, + "99.9999" : 20135.111396783905, + "100.0" : 20135.111396783905 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 20009.903047295466, + 20135.111396783905, + 18421.42337709082 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 10232.181157150313, + "scoreError" : 4006.0617834994787, + "scoreConfidence" : [ + 6226.119373650834, + 14238.242940649792 + ], + "scorePercentiles" : { + "0.0" : 10057.018857798183, + "50.0" : 10160.996647739936, + "90.0" : 10478.527965912821, + "95.0" : 10478.527965912821, + "99.0" : 10478.527965912821, + "99.9" : 10478.527965912821, + "99.99" : 10478.527965912821, + "99.999" : 10478.527965912821, + "99.9999" : 10478.527965912821, + "100.0" : 10478.527965912821 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 10057.018857798183, + 10160.996647739936, + 10478.527965912821 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 466030.8811102958, + "scoreError" : 210336.48082475463, + "scoreConfidence" : [ + 255694.4002855412, + 676367.3619350505 + ], + "scorePercentiles" : { + "0.0" : 452933.06164095603, + "50.0" : 470516.05597882497, + "90.0" : 474643.5257111063, + "95.0" : 474643.5257111063, + "99.0" : 474643.5257111063, + "99.9" : 474643.5257111063, + "99.99" : 474643.5257111063, + "99.999" : 474643.5257111063, + "99.9999" : 474643.5257111063, + "100.0" : 474643.5257111063 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 452933.06164095603, + 470516.05597882497, + 474643.5257111063 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 165457.78961453322, + "scoreError" : 68467.8132064903, + "scoreConfidence" : [ + 96989.97640804292, + 233925.60282102352 + ], + "scorePercentiles" : { + "0.0" : 161125.39716193048, + "50.0" : 167537.79122347123, + "90.0" : 167710.18045819792, + "95.0" : 167710.18045819792, + "99.0" : 167710.18045819792, + "99.9" : 167710.18045819792, + "99.99" : 167710.18045819792, + "99.999" : 167710.18045819792, + "99.9999" : 167710.18045819792, + "100.0" : 167710.18045819792 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 161125.39716193048, + 167710.18045819792, + 167537.79122347123 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 88742.95870456668, + "scoreError" : 39031.69262222695, + "scoreConfidence" : [ + 49711.26608233974, + 127774.65132679362 + ], + "scorePercentiles" : { + "0.0" : 86283.74414160383, + "50.0" : 89768.89549785802, + "90.0" : 90176.2364742382, + "95.0" : 90176.2364742382, + "99.0" : 90176.2364742382, + "99.9" : 90176.2364742382, + "99.99" : 90176.2364742382, + "99.999" : 90176.2364742382, + "99.9999" : 90176.2364742382, + "100.0" : 90176.2364742382 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 86283.74414160383, + 90176.2364742382, + 89768.89549785802 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 56495.112043314126, + "scoreError" : 33471.692827499064, + "scoreConfidence" : [ + 23023.41921581506, + 89966.80487081318 + ], + "scorePercentiles" : { + "0.0" : 54702.416002343016, + "50.0" : 56413.81408223917, + "90.0" : 58369.10604536021, + "95.0" : 58369.10604536021, + "99.0" : 58369.10604536021, + "99.9" : 58369.10604536021, + "99.99" : 58369.10604536021, + "99.999" : 58369.10604536021, + "99.9999" : 58369.10604536021, + "100.0" : 58369.10604536021 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 54702.416002343016, + 56413.81408223917, + 58369.10604536021 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 42270.05929123773, + "scoreError" : 15895.149995448937, + "scoreConfidence" : [ + 26374.909295788795, + 58165.20928668667 + ], + "scorePercentiles" : { + "0.0" : 41351.57380513372, + "50.0" : 42373.78247379022, + "90.0" : 43084.82159478927, + "95.0" : 43084.82159478927, + "99.0" : 43084.82159478927, + "99.9" : 43084.82159478927, + "99.99" : 43084.82159478927, + "99.999" : 43084.82159478927, + "99.9999" : 43084.82159478927, + "100.0" : 43084.82159478927 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 41351.57380513372, + 42373.78247379022, + 43084.82159478927 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 24524.240644031222, + "scoreError" : 13337.888300690709, + "scoreConfidence" : [ + 11186.352343340513, + 37862.12894472193 + ], + "scorePercentiles" : { + "0.0" : 23691.624630331313, + "50.0" : 24819.87413541164, + "90.0" : 25061.223166350723, + "95.0" : 25061.223166350723, + "99.0" : 25061.223166350723, + "99.9" : 25061.223166350723, + "99.99" : 25061.223166350723, + "99.999" : 25061.223166350723, + "99.9999" : 25061.223166350723, + "100.0" : 25061.223166350723 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 23691.624630331313, + 25061.223166350723, + 24819.87413541164 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 16947.379519884507, + "scoreError" : 6728.129941894149, + "scoreConfidence" : [ + 10219.249577990358, + 23675.509461778656 + ], + "scorePercentiles" : { + "0.0" : 16521.638876066583, + "50.0" : 17152.1348902358, + "90.0" : 17168.36479335114, + "95.0" : 17168.36479335114, + "99.0" : 17168.36479335114, + "99.9" : 17168.36479335114, + "99.99" : 17168.36479335114, + "99.999" : 17168.36479335114, + "99.9999" : 17168.36479335114, + "100.0" : 17168.36479335114 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 16521.638876066583, + 17168.36479335114, + 17152.1348902358 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 12107.218666332852, + "scoreError" : 6358.570525876728, + "scoreConfidence" : [ + 5748.648140456124, + 18465.78919220958 + ], + "scorePercentiles" : { + "0.0" : 11735.06206011633, + "50.0" : 12160.628069495046, + "90.0" : 12425.96586938718, + "95.0" : 12425.96586938718, + "99.0" : 12425.96586938718, + "99.9" : 12425.96586938718, + "99.99" : 12425.96586938718, + "99.999" : 12425.96586938718, + "99.9999" : 12425.96586938718, + "100.0" : 12425.96586938718 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 11735.06206011633, + 12425.96586938718, + 12160.628069495046 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 5953.187860067043, + "scoreError" : 3150.3331240442326, + "scoreConfidence" : [ + 2802.854736022811, + 9103.520984111276 + ], + "scorePercentiles" : { + "0.0" : 5755.37042441803, + "50.0" : 6030.423707547085, + "90.0" : 6073.7694482360175, + "95.0" : 6073.7694482360175, + "99.0" : 6073.7694482360175, + "99.9" : 6073.7694482360175, + "99.99" : 6073.7694482360175, + "99.999" : 6073.7694482360175, + "99.9999" : 6073.7694482360175, + "100.0" : 6073.7694482360175 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 5755.37042441803, + 6073.7694482360175, + 6030.423707547085 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 834821.9272838525, + "scoreError" : 804936.1718277265, + "scoreConfidence" : [ + 29885.755456125946, + 1639758.099111579 + ], + "scorePercentiles" : { + "0.0" : 785490.7014192721, + "50.0" : 848464.4335462808, + "90.0" : 870510.6468860047, + "95.0" : 870510.6468860047, + "99.0" : 870510.6468860047, + "99.9" : 870510.6468860047, + "99.99" : 870510.6468860047, + "99.999" : 870510.6468860047, + "99.9999" : 870510.6468860047, + "100.0" : 870510.6468860047 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 785490.7014192721, + 870510.6468860047, + 848464.4335462808 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 272345.7858553221, + "scoreError" : 84319.95092920848, + "scoreConfidence" : [ + 188025.8349261136, + 356665.73678453057 + ], + "scorePercentiles" : { + "0.0" : 267300.821792471, + "50.0" : 273360.6695869373, + "90.0" : 276375.8661865579, + "95.0" : 276375.8661865579, + "99.0" : 276375.8661865579, + "99.9" : 276375.8661865579, + "99.99" : 276375.8661865579, + "99.999" : 276375.8661865579, + "99.9999" : 276375.8661865579, + "100.0" : 276375.8661865579 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 276375.8661865579, + 267300.821792471, + 273360.6695869373 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 154151.81499458625, + "scoreError" : 37481.061687208916, + "scoreConfidence" : [ + 116670.75330737734, + 191632.87668179517 + ], + "scorePercentiles" : { + "0.0" : 152728.14045444044, + "50.0" : 153220.27670415308, + "90.0" : 156507.02782516516, + "95.0" : 156507.02782516516, + "99.0" : 156507.02782516516, + "99.9" : 156507.02782516516, + "99.99" : 156507.02782516516, + "99.999" : 156507.02782516516, + "99.9999" : 156507.02782516516, + "100.0" : 156507.02782516516 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 152728.14045444044, + 153220.27670415308, + 156507.02782516516 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 96396.9379083308, + "scoreError" : 37386.006896120256, + "scoreConfidence" : [ + 59010.931012210545, + 133782.94480445105 + ], + "scorePercentiles" : { + "0.0" : 94031.24788060863, + "50.0" : 97534.26740790496, + "90.0" : 97625.29843647881, + "95.0" : 97625.29843647881, + "99.0" : 97625.29843647881, + "99.9" : 97625.29843647881, + "99.99" : 97625.29843647881, + "99.999" : 97625.29843647881, + "99.9999" : 97625.29843647881, + "100.0" : 97625.29843647881 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 94031.24788060863, + 97534.26740790496, + 97625.29843647881 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 70987.03813038876, + "scoreError" : 76432.62211520794, + "scoreConfidence" : [ + -5445.583984819183, + 147419.6602455967 + ], + "scorePercentiles" : { + "0.0" : 67898.779426876, + "50.0" : 69306.39545041209, + "90.0" : 75755.9395138782, + "95.0" : 75755.9395138782, + "99.0" : 75755.9395138782, + "99.9" : 75755.9395138782, + "99.99" : 75755.9395138782, + "99.999" : 75755.9395138782, + "99.9999" : 75755.9395138782, + "100.0" : 75755.9395138782 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 75755.9395138782, + 67898.779426876, + 69306.39545041209 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 43985.21315032349, + "scoreError" : 17903.343371588144, + "scoreConfidence" : [ + 26081.86977873535, + 61888.55652191164 + ], + "scorePercentiles" : { + "0.0" : 43318.537055973335, + "50.0" : 43525.020694107574, + "90.0" : 45112.081700889576, + "95.0" : 45112.081700889576, + "99.0" : 45112.081700889576, + "99.9" : 45112.081700889576, + "99.99" : 45112.081700889576, + "99.999" : 45112.081700889576, + "99.9999" : 45112.081700889576, + "100.0" : 45112.081700889576 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 43318.537055973335, + 43525.020694107574, + 45112.081700889576 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 31070.662389448615, + "scoreError" : 5185.658528682296, + "scoreConfidence" : [ + 25885.00386076632, + 36256.32091813091 + ], + "scorePercentiles" : { + "0.0" : 30742.982514780208, + "50.0" : 31218.261661026827, + "90.0" : 31250.742992538813, + "95.0" : 31250.742992538813, + "99.0" : 31250.742992538813, + "99.9" : 31250.742992538813, + "99.99" : 31250.742992538813, + "99.999" : 31250.742992538813, + "99.9999" : 31250.742992538813, + "100.0" : 31250.742992538813 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 31218.261661026827, + 31250.742992538813, + 30742.982514780208 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 20625.664541427115, + "scoreError" : 2484.989261483009, + "scoreConfidence" : [ + 18140.675279944106, + 23110.653802910125 + ], + "scorePercentiles" : { + "0.0" : 20529.36812895494, + "50.0" : 20566.115992988187, + "90.0" : 20781.50950233822, + "95.0" : 20781.50950233822, + "99.0" : 20781.50950233822, + "99.9" : 20781.50950233822, + "99.99" : 20781.50950233822, + "99.999" : 20781.50950233822, + "99.9999" : 20781.50950233822, + "100.0" : 20781.50950233822 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 20781.50950233822, + 20566.115992988187, + 20529.36812895494 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 10735.27572472515, + "scoreError" : 2111.6619301012684, + "scoreConfidence" : [ + 8623.613794623881, + 12846.937654826419 + ], + "scorePercentiles" : { + "0.0" : 10633.045741890051, + "50.0" : 10711.830578743888, + "90.0" : 10860.950853541512, + "95.0" : 10860.950853541512, + "99.0" : 10860.950853541512, + "99.9" : 10860.950853541512, + "99.99" : 10860.950853541512, + "99.999" : 10860.950853541512, + "99.9999" : 10860.950853541512, + "100.0" : 10860.950853541512 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 10633.045741890051, + 10711.830578743888, + 10860.950853541512 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 421692.77800161456, + "scoreError" : 29876.258460228448, + "scoreConfidence" : [ + 391816.5195413861, + 451569.036461843 + ], + "scorePercentiles" : { + "0.0" : 420179.5356247072, + "50.0" : 421467.376985008, + "90.0" : 423431.4213951284, + "95.0" : 423431.4213951284, + "99.0" : 423431.4213951284, + "99.9" : 423431.4213951284, + "99.99" : 423431.4213951284, + "99.999" : 423431.4213951284, + "99.9999" : 423431.4213951284, + "100.0" : 423431.4213951284 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 421467.376985008, + 420179.5356247072, + 423431.4213951284 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 160270.97137576292, + "scoreError" : 14740.488462594, + "scoreConfidence" : [ + 145530.48291316893, + 175011.4598383569 + ], + "scorePercentiles" : { + "0.0" : 159338.18089255443, + "50.0" : 160721.50753484466, + "90.0" : 160753.2256998896, + "95.0" : 160753.2256998896, + "99.0" : 160753.2256998896, + "99.9" : 160753.2256998896, + "99.99" : 160753.2256998896, + "99.999" : 160753.2256998896, + "99.9999" : 160753.2256998896, + "100.0" : 160753.2256998896 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 160753.2256998896, + 160721.50753484466, + 159338.18089255443 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 89508.51054333513, + "scoreError" : 15312.845006496436, + "scoreConfidence" : [ + 74195.66553683869, + 104821.35554983157 + ], + "scorePercentiles" : { + "0.0" : 88648.62717897058, + "50.0" : 89551.2097956293, + "90.0" : 90325.69465540555, + "95.0" : 90325.69465540555, + "99.0" : 90325.69465540555, + "99.9" : 90325.69465540555, + "99.99" : 90325.69465540555, + "99.999" : 90325.69465540555, + "99.9999" : 90325.69465540555, + "100.0" : 90325.69465540555 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 88648.62717897058, + 89551.2097956293, + 90325.69465540555 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 59138.1917614723, + "scoreError" : 6423.0026203300185, + "scoreConfidence" : [ + 52715.189141142284, + 65561.19438180231 + ], + "scorePercentiles" : { + "0.0" : 58734.54881766789, + "50.0" : 59298.11975426962, + "90.0" : 59381.90671247938, + "95.0" : 59381.90671247938, + "99.0" : 59381.90671247938, + "99.9" : 59381.90671247938, + "99.99" : 59381.90671247938, + "99.999" : 59381.90671247938, + "99.9999" : 59381.90671247938, + "100.0" : 59381.90671247938 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 59381.90671247938, + 59298.11975426962, + 58734.54881766789 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 42722.31868669877, + "scoreError" : 2142.030210521841, + "scoreConfidence" : [ + 40580.288476176924, + 44864.34889722061 + ], + "scorePercentiles" : { + "0.0" : 42588.370583999465, + "50.0" : 42771.15480844157, + "90.0" : 42807.43066765527, + "95.0" : 42807.43066765527, + "99.0" : 42807.43066765527, + "99.9" : 42807.43066765527, + "99.99" : 42807.43066765527, + "99.999" : 42807.43066765527, + "99.9999" : 42807.43066765527, + "100.0" : 42807.43066765527 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 42588.370583999465, + 42771.15480844157, + 42807.43066765527 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 25878.87167288823, + "scoreError" : 4610.213303653083, + "scoreConfidence" : [ + 21268.658369235145, + 30489.08497654131 + ], + "scorePercentiles" : { + "0.0" : 25588.648117394456, + "50.0" : 25997.797825244066, + "90.0" : 26050.16907602617, + "95.0" : 26050.16907602617, + "99.0" : 26050.16907602617, + "99.9" : 26050.16907602617, + "99.99" : 26050.16907602617, + "99.999" : 26050.16907602617, + "99.9999" : 26050.16907602617, + "100.0" : 26050.16907602617 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 25588.648117394456, + 25997.797825244066, + 26050.16907602617 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 17822.646552468355, + "scoreError" : 1579.0181878340352, + "scoreConfidence" : [ + 16243.62836463432, + 19401.66474030239 + ], + "scorePercentiles" : { + "0.0" : 17724.982126818104, + "50.0" : 17853.110991726207, + "90.0" : 17889.846538860747, + "95.0" : 17889.846538860747, + "99.0" : 17889.846538860747, + "99.9" : 17889.846538860747, + "99.99" : 17889.846538860747, + "99.999" : 17889.846538860747, + "99.9999" : 17889.846538860747, + "100.0" : 17889.846538860747 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 17724.982126818104, + 17889.846538860747, + 17853.110991726207 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 13007.913447692716, + "scoreError" : 904.561302005698, + "scoreConfidence" : [ + 12103.352145687018, + 13912.474749698413 + ], + "scorePercentiles" : { + "0.0" : 12951.742886815371, + "50.0" : 13026.40542468556, + "90.0" : 13045.59203157722, + "95.0" : 13045.59203157722, + "99.0" : 13045.59203157722, + "99.9" : 13045.59203157722, + "99.99" : 13045.59203157722, + "99.999" : 13045.59203157722, + "99.9999" : 13045.59203157722, + "100.0" : 13045.59203157722 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 12951.742886815371, + 13045.59203157722, + 13026.40542468556 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 6362.893403865363, + "scoreError" : 2367.269104494743, + "scoreConfidence" : [ + 3995.6242993706205, + 8730.162508360107 + ], + "scorePercentiles" : { + "0.0" : 6218.879724787497, + "50.0" : 6399.0926224620225, + "90.0" : 6470.707864346568, + "95.0" : 6470.707864346568, + "99.0" : 6470.707864346568, + "99.9" : 6470.707864346568, + "99.99" : 6470.707864346568, + "99.999" : 6470.707864346568, + "99.9999" : 6470.707864346568, + "100.0" : 6470.707864346568 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 6218.879724787497, + 6399.0926224620225, + 6470.707864346568 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1185230.745191008, + "scoreError" : 264639.97252115543, + "scoreConfidence" : [ + 920590.7726698527, + 1449870.7177121635 + ], + "scorePercentiles" : { + "0.0" : 1169845.490133218, + "50.0" : 1187188.4825359, + "90.0" : 1198658.262903906, + "95.0" : 1198658.262903906, + "99.0" : 1198658.262903906, + "99.9" : 1198658.262903906, + "99.99" : 1198658.262903906, + "99.999" : 1198658.262903906, + "99.9999" : 1198658.262903906, + "100.0" : 1198658.262903906 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1198658.262903906, + 1187188.4825359, + 1169845.490133218 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 408293.12893412565, + "scoreError" : 47312.80464406586, + "scoreConfidence" : [ + 360980.3242900598, + 455605.9335781915 + ], + "scorePercentiles" : { + "0.0" : 405655.2736067474, + "50.0" : 408384.50594377983, + "90.0" : 410839.60725184967, + "95.0" : 410839.60725184967, + "99.0" : 410839.60725184967, + "99.9" : 410839.60725184967, + "99.99" : 410839.60725184967, + "99.999" : 410839.60725184967, + "99.9999" : 410839.60725184967, + "100.0" : 410839.60725184967 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 408384.50594377983, + 405655.2736067474, + 410839.60725184967 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 219529.94254434272, + "scoreError" : 58560.90566075789, + "scoreConfidence" : [ + 160969.03688358483, + 278090.8482051006 + ], + "scorePercentiles" : { + "0.0" : 215981.33472843308, + "50.0" : 220377.35446688332, + "90.0" : 222231.13843771178, + "95.0" : 222231.13843771178, + "99.0" : 222231.13843771178, + "99.9" : 222231.13843771178, + "99.99" : 222231.13843771178, + "99.999" : 222231.13843771178, + "99.9999" : 222231.13843771178, + "100.0" : 222231.13843771178 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 215981.33472843308, + 222231.13843771178, + 220377.35446688332 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 145479.4093014997, + "scoreError" : 84231.27091678912, + "scoreConfidence" : [ + 61248.138384710575, + 229710.6802182888 + ], + "scorePercentiles" : { + "0.0" : 140152.82748493087, + "50.0" : 147949.47671602826, + "90.0" : 148335.92370353988, + "95.0" : 148335.92370353988, + "99.0" : 148335.92370353988, + "99.9" : 148335.92370353988, + "99.99" : 148335.92370353988, + "99.999" : 148335.92370353988, + "99.9999" : 148335.92370353988, + "100.0" : 148335.92370353988 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 140152.82748493087, + 147949.47671602826, + 148335.92370353988 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 96414.00128635805, + "scoreError" : 81293.95517205057, + "scoreConfidence" : [ + 15120.046114307479, + 177707.95645840862 + ], + "scorePercentiles" : { + "0.0" : 91290.76657988157, + "50.0" : 98563.00509965513, + "90.0" : 99388.23217953743, + "95.0" : 99388.23217953743, + "99.0" : 99388.23217953743, + "99.9" : 99388.23217953743, + "99.99" : 99388.23217953743, + "99.999" : 99388.23217953743, + "99.9999" : 99388.23217953743, + "100.0" : 99388.23217953743 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 91290.76657988157, + 99388.23217953743, + 98563.00509965513 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 57838.9601998754, + "scoreError" : 30367.715194386645, + "scoreConfidence" : [ + 27471.245005488756, + 88206.67539426204 + ], + "scorePercentiles" : { + "0.0" : 56121.242328968685, + "50.0" : 57950.936415593664, + "90.0" : 59444.70185506385, + "95.0" : 59444.70185506385, + "99.0" : 59444.70185506385, + "99.9" : 59444.70185506385, + "99.99" : 59444.70185506385, + "99.999" : 59444.70185506385, + "99.9999" : 59444.70185506385, + "100.0" : 59444.70185506385 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 57950.936415593664, + 56121.242328968685, + 59444.70185506385 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 38068.73876853278, + "scoreError" : 19170.868397282306, + "scoreConfidence" : [ + 18897.870371250472, + 57239.60716581508 + ], + "scorePercentiles" : { + "0.0" : 37235.88970926041, + "50.0" : 37720.967985149815, + "90.0" : 39249.358611188094, + "95.0" : 39249.358611188094, + "99.0" : 39249.358611188094, + "99.9" : 39249.358611188094, + "99.99" : 39249.358611188094, + "99.999" : 39249.358611188094, + "99.9999" : 39249.358611188094, + "100.0" : 39249.358611188094 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 39249.358611188094, + 37720.967985149815, + 37235.88970926041 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 26165.271519727772, + "scoreError" : 46039.46486994001, + "scoreConfidence" : [ + -19874.19335021224, + 72204.73638966779 + ], + "scorePercentiles" : { + "0.0" : 24486.319188802572, + "50.0" : 24942.15529730403, + "90.0" : 29067.340073076717, + "95.0" : 29067.340073076717, + "99.0" : 29067.340073076717, + "99.9" : 29067.340073076717, + "99.99" : 29067.340073076717, + "99.999" : 29067.340073076717, + "99.9999" : 29067.340073076717, + "100.0" : 29067.340073076717 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 24942.15529730403, + 24486.319188802572, + 29067.340073076717 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 14429.701478002686, + "scoreError" : 3595.0875178964975, + "scoreConfidence" : [ + 10834.613960106188, + 18024.788995899184 + ], + "scorePercentiles" : { + "0.0" : 14210.185615080296, + "50.0" : 14487.576938269498, + "90.0" : 14591.34188065826, + "95.0" : 14591.34188065826, + "99.0" : 14591.34188065826, + "99.9" : 14591.34188065826, + "99.99" : 14591.34188065826, + "99.999" : 14591.34188065826, + "99.9999" : 14591.34188065826, + "100.0" : 14591.34188065826 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 14591.34188065826, + 14487.576938269498, + 14210.185615080296 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 223420.14131026668, + "scoreError" : 178285.57001638372, + "scoreConfidence" : [ + 45134.57129388297, + 401705.7113266504 + ], + "scorePercentiles" : { + "0.0" : 212450.8024790955, + "50.0" : 226612.2871301823, + "90.0" : 231197.3343215223, + "95.0" : 231197.3343215223, + "99.0" : 231197.3343215223, + "99.9" : 231197.3343215223, + "99.99" : 231197.3343215223, + "99.999" : 231197.3343215223, + "99.9999" : 231197.3343215223, + "100.0" : 231197.3343215223 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 212450.8024790955, + 231197.3343215223, + 226612.2871301823 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 53415.84233796725, + "scoreError" : 9580.415144056997, + "scoreConfidence" : [ + 43835.427193910255, + 62996.25748202425 + ], + "scorePercentiles" : { + "0.0" : 53076.77832046494, + "50.0" : 53150.00859471944, + "90.0" : 54020.7400987174, + "95.0" : 54020.7400987174, + "99.0" : 54020.7400987174, + "99.9" : 54020.7400987174, + "99.99" : 54020.7400987174, + "99.999" : 54020.7400987174, + "99.9999" : 54020.7400987174, + "100.0" : 54020.7400987174 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 53150.00859471944, + 54020.7400987174, + 53076.77832046494 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 32292.679370823582, + "scoreError" : 3337.6419236884553, + "scoreConfidence" : [ + 28955.037447135128, + 35630.32129451204 + ], + "scorePercentiles" : { + "0.0" : 32135.865367425962, + "50.0" : 32248.502591580076, + "90.0" : 32493.67015346471, + "95.0" : 32493.67015346471, + "99.0" : 32493.67015346471, + "99.9" : 32493.67015346471, + "99.99" : 32493.67015346471, + "99.999" : 32493.67015346471, + "99.9999" : 32493.67015346471, + "100.0" : 32493.67015346471 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 32135.865367425962, + 32248.502591580076, + 32493.67015346471 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 20414.79950099543, + "scoreError" : 5074.842614741724, + "scoreConfidence" : [ + 15339.956886253705, + 25489.64211573715 + ], + "scorePercentiles" : { + "0.0" : 20209.68256039803, + "50.0" : 20303.293936377573, + "90.0" : 20731.422006210683, + "95.0" : 20731.422006210683, + "99.0" : 20731.422006210683, + "99.9" : 20731.422006210683, + "99.99" : 20731.422006210683, + "99.999" : 20731.422006210683, + "99.9999" : 20731.422006210683, + "100.0" : 20731.422006210683 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 20731.422006210683, + 20209.68256039803, + 20303.293936377573 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 15607.969870958876, + "scoreError" : 1692.4936377121317, + "scoreConfidence" : [ + 13915.476233246744, + 17300.463508671008 + ], + "scorePercentiles" : { + "0.0" : 15508.510558376658, + "50.0" : 15623.24092003028, + "90.0" : 15692.15813446969, + "95.0" : 15692.15813446969, + "99.0" : 15692.15813446969, + "99.9" : 15692.15813446969, + "99.99" : 15692.15813446969, + "99.999" : 15692.15813446969, + "99.9999" : 15692.15813446969, + "100.0" : 15692.15813446969 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 15692.15813446969, + 15508.510558376658, + 15623.24092003028 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 9438.804749057925, + "scoreError" : 799.1712190893144, + "scoreConfidence" : [ + 8639.63352996861, + 10237.975968147239 + ], + "scorePercentiles" : { + "0.0" : 9394.800010286792, + "50.0" : 9439.20644694381, + "90.0" : 9482.407789943176, + "95.0" : 9482.407789943176, + "99.0" : 9482.407789943176, + "99.9" : 9482.407789943176, + "99.99" : 9482.407789943176, + "99.999" : 9482.407789943176, + "99.9999" : 9482.407789943176, + "100.0" : 9482.407789943176 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 9394.800010286792, + 9439.20644694381, + 9482.407789943176 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 6714.287019461145, + "scoreError" : 545.9840711815303, + "scoreConfidence" : [ + 6168.302948279615, + 7260.2710906426755 + ], + "scorePercentiles" : { + "0.0" : 6683.95200979648, + "50.0" : 6715.119970097679, + "90.0" : 6743.789078489277, + "95.0" : 6743.789078489277, + "99.0" : 6743.789078489277, + "99.9" : 6743.789078489277, + "99.99" : 6743.789078489277, + "99.999" : 6743.789078489277, + "99.9999" : 6743.789078489277, + "100.0" : 6743.789078489277 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 6743.789078489277, + 6683.95200979648, + 6715.119970097679 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 4218.067980680196, + "scoreError" : 141.83562848363306, + "scoreConfidence" : [ + 4076.232352196563, + 4359.903609163829 + ], + "scorePercentiles" : { + "0.0" : 4210.271113654533, + "50.0" : 4218.112930850642, + "90.0" : 4225.819897535414, + "95.0" : 4225.819897535414, + "99.0" : 4225.819897535414, + "99.9" : 4225.819897535414, + "99.99" : 4225.819897535414, + "99.999" : 4225.819897535414, + "99.9999" : 4225.819897535414, + "100.0" : 4225.819897535414 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 4225.819897535414, + 4218.112930850642, + 4210.271113654533 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 2298.5467226109827, + "scoreError" : 449.5930048254175, + "scoreConfidence" : [ + 1848.9537177855652, + 2748.1397274364003 + ], + "scorePercentiles" : { + "0.0" : 2277.795440270708, + "50.0" : 2292.0596641862903, + "90.0" : 2325.785063375949, + "95.0" : 2325.785063375949, + "99.0" : 2325.785063375949, + "99.9" : 2325.785063375949, + "99.99" : 2325.785063375949, + "99.999" : 2325.785063375949, + "99.9999" : 2325.785063375949, + "100.0" : 2325.785063375949 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 2325.785063375949, + 2292.0596641862903, + 2277.795440270708 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1434788.2875436672, + "scoreError" : 163145.92955257426, + "scoreConfidence" : [ + 1271642.357991093, + 1597934.2170962414 + ], + "scorePercentiles" : { + "0.0" : 1425979.207229816, + "50.0" : 1434527.0163477072, + "90.0" : 1443858.6390534786, + "95.0" : 1443858.6390534786, + "99.0" : 1443858.6390534786, + "99.9" : 1443858.6390534786, + "99.99" : 1443858.6390534786, + "99.999" : 1443858.6390534786, + "99.9999" : 1443858.6390534786, + "100.0" : 1443858.6390534786 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1425979.207229816, + 1443858.6390534786, + 1434527.0163477072 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 311134.3738225592, + "scoreError" : 95451.89480768229, + "scoreConfidence" : [ + 215682.4790148769, + 406586.2686302415 + ], + "scorePercentiles" : { + "0.0" : 306586.11189460487, + "50.0" : 309964.7811816326, + "90.0" : 316852.22839144006, + "95.0" : 316852.22839144006, + "99.0" : 316852.22839144006, + "99.9" : 316852.22839144006, + "99.99" : 316852.22839144006, + "99.999" : 316852.22839144006, + "99.9999" : 316852.22839144006, + "100.0" : 316852.22839144006 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 316852.22839144006, + 309964.7811816326, + 306586.11189460487 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 175771.28407429997, + "scoreError" : 26538.526270965973, + "scoreConfidence" : [ + 149232.75780333398, + 202309.81034526596 + ], + "scorePercentiles" : { + "0.0" : 174245.78017117738, + "50.0" : 175925.19937920137, + "90.0" : 177142.8726725212, + "95.0" : 177142.8726725212, + "99.0" : 177142.8726725212, + "99.9" : 177142.8726725212, + "99.99" : 177142.8726725212, + "99.999" : 177142.8726725212, + "99.9999" : 177142.8726725212, + "100.0" : 177142.8726725212 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 174245.78017117738, + 175925.19937920137, + 177142.8726725212 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 108961.2731050774, + "scoreError" : 25742.45429587032, + "scoreConfidence" : [ + 83218.81880920708, + 134703.7274009477 + ], + "scorePercentiles" : { + "0.0" : 107346.9629703482, + "50.0" : 109577.35236283558, + "90.0" : 109959.50398204847, + "95.0" : 109959.50398204847, + "99.0" : 109959.50398204847, + "99.9" : 109959.50398204847, + "99.99" : 109959.50398204847, + "99.999" : 109959.50398204847, + "99.9999" : 109959.50398204847, + "100.0" : 109959.50398204847 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 109959.50398204847, + 109577.35236283558, + 107346.9629703482 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 78093.86817738712, + "scoreError" : 9913.694365803089, + "scoreConfidence" : [ + 68180.17381158403, + 88007.56254319022 + ], + "scorePercentiles" : { + "0.0" : 77529.26849872313, + "50.0" : 78139.08729942446, + "90.0" : 78613.24873401379, + "95.0" : 78613.24873401379, + "99.0" : 78613.24873401379, + "99.9" : 78613.24873401379, + "99.99" : 78613.24873401379, + "99.999" : 78613.24873401379, + "99.9999" : 78613.24873401379, + "100.0" : 78613.24873401379 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 78613.24873401379, + 78139.08729942446, + 77529.26849872313 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 46316.51497609521, + "scoreError" : 28167.097599983725, + "scoreConfidence" : [ + 18149.417376111487, + 74483.61257607894 + ], + "scorePercentiles" : { + "0.0" : 45167.571670901445, + "50.0" : 45710.44517528141, + "90.0" : 48071.52808210278, + "95.0" : 48071.52808210278, + "99.0" : 48071.52808210278, + "99.9" : 48071.52808210278, + "99.99" : 48071.52808210278, + "99.999" : 48071.52808210278, + "99.9999" : 48071.52808210278, + "100.0" : 48071.52808210278 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 48071.52808210278, + 45167.571670901445, + 45710.44517528141 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 32200.416693090592, + "scoreError" : 6079.365397372531, + "scoreConfidence" : [ + 26121.05129571806, + 38279.78209046312 + ], + "scorePercentiles" : { + "0.0" : 31885.65264634689, + "50.0" : 32166.134209658416, + "90.0" : 32549.463223266477, + "95.0" : 32549.463223266477, + "99.0" : 32549.463223266477, + "99.9" : 32549.463223266477, + "99.99" : 32549.463223266477, + "99.999" : 32549.463223266477, + "99.9999" : 32549.463223266477, + "100.0" : 32549.463223266477 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 32549.463223266477, + 31885.65264634689, + 32166.134209658416 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 23142.734037926697, + "scoreError" : 7303.042580714375, + "scoreConfidence" : [ + 15839.691457212322, + 30445.776618641074 + ], + "scorePercentiles" : { + "0.0" : 22734.81094259946, + "50.0" : 23158.433323367, + "90.0" : 23534.957847813635, + "95.0" : 23534.957847813635, + "99.0" : 23534.957847813635, + "99.9" : 23534.957847813635, + "99.99" : 23534.957847813635, + "99.999" : 23534.957847813635, + "99.9999" : 23534.957847813635, + "100.0" : 23534.957847813635 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 23534.957847813635, + 23158.433323367, + 22734.81094259946 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 10900.509370552581, + "scoreError" : 2252.093165457545, + "scoreConfidence" : [ + 8648.416205095036, + 13152.602536010127 + ], + "scorePercentiles" : { + "0.0" : 10787.19831135084, + "50.0" : 10882.271122704466, + "90.0" : 11032.058677602443, + "95.0" : 11032.058677602443, + "99.0" : 11032.058677602443, + "99.9" : 11032.058677602443, + "99.99" : 11032.058677602443, + "99.999" : 11032.058677602443, + "99.9999" : 11032.058677602443, + "100.0" : 11032.058677602443 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 10787.19831135084, + 10882.271122704466, + 11032.058677602443 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1494644.135769942, + "scoreError" : 294710.21334079537, + "scoreConfidence" : [ + 1199933.9224291467, + 1789354.3491107374 + ], + "scorePercentiles" : { + "0.0" : 1481896.7464038734, + "50.0" : 1489224.5381613534, + "90.0" : 1512811.1227445996, + "95.0" : 1512811.1227445996, + "99.0" : 1512811.1227445996, + "99.9" : 1512811.1227445996, + "99.99" : 1512811.1227445996, + "99.999" : 1512811.1227445996, + "99.9999" : 1512811.1227445996, + "100.0" : 1512811.1227445996 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1512811.1227445996, + 1481896.7464038734, + 1489224.5381613534 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 314489.6865695929, + "scoreError" : 176830.56877157543, + "scoreConfidence" : [ + 137659.11779801748, + 491320.2553411684 + ], + "scorePercentiles" : { + "0.0" : 303301.20129545376, + "50.0" : 319836.1456653523, + "90.0" : 320331.7127479727, + "95.0" : 320331.7127479727, + "99.0" : 320331.7127479727, + "99.9" : 320331.7127479727, + "99.99" : 320331.7127479727, + "99.999" : 320331.7127479727, + "99.9999" : 320331.7127479727, + "100.0" : 320331.7127479727 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 303301.20129545376, + 320331.7127479727, + 319836.1456653523 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 171712.9055267521, + "scoreError" : 175492.95179682848, + "scoreConfidence" : [ + -3780.046270076389, + 347205.85732358054 + ], + "scorePercentiles" : { + "0.0" : 160667.35262571956, + "50.0" : 176221.32295085798, + "90.0" : 178250.0410036787, + "95.0" : 178250.0410036787, + "99.0" : 178250.0410036787, + "99.9" : 178250.0410036787, + "99.99" : 178250.0410036787, + "99.999" : 178250.0410036787, + "99.9999" : 178250.0410036787, + "100.0" : 178250.0410036787 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 160667.35262571956, + 176221.32295085798, + 178250.0410036787 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 108233.09313746954, + "scoreError" : 5303.36591326775, + "scoreConfidence" : [ + 102929.72722420178, + 113536.45905073729 + ], + "scorePercentiles" : { + "0.0" : 108037.14054700788, + "50.0" : 108095.0487952151, + "90.0" : 108567.09007018557, + "95.0" : 108567.09007018557, + "99.0" : 108567.09007018557, + "99.9" : 108567.09007018557, + "99.99" : 108567.09007018557, + "99.999" : 108567.09007018557, + "99.9999" : 108567.09007018557, + "100.0" : 108567.09007018557 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 108095.0487952151, + 108037.14054700788, + 108567.09007018557 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 74764.15569045018, + "scoreError" : 158787.2993202488, + "scoreConfidence" : [ + -84023.14362979862, + 233551.455010699 + ], + "scorePercentiles" : { + "0.0" : 64714.245809638596, + "50.0" : 79731.53793241616, + "90.0" : 79846.68332929577, + "95.0" : 79846.68332929577, + "99.0" : 79846.68332929577, + "99.9" : 79846.68332929577, + "99.99" : 79846.68332929577, + "99.999" : 79846.68332929577, + "99.9999" : 79846.68332929577, + "100.0" : 79846.68332929577 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 64714.245809638596, + 79846.68332929577, + 79731.53793241616 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 46639.96591604024, + "scoreError" : 18258.63145745545, + "scoreConfidence" : [ + 28381.334458584788, + 64898.597373495686 + ], + "scorePercentiles" : { + "0.0" : 45999.687404102326, + "50.0" : 46126.937937576855, + "90.0" : 47793.27240644154, + "95.0" : 47793.27240644154, + "99.0" : 47793.27240644154, + "99.9" : 47793.27240644154, + "99.99" : 47793.27240644154, + "99.999" : 47793.27240644154, + "99.9999" : 47793.27240644154, + "100.0" : 47793.27240644154 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 47793.27240644154, + 46126.937937576855, + 45999.687404102326 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 32451.4819518828, + "scoreError" : 43484.232532175396, + "scoreConfidence" : [ + -11032.750580292595, + 75935.7144840582 + ], + "scorePercentiles" : { + "0.0" : 29699.616603885817, + "50.0" : 33787.62041485421, + "90.0" : 33867.20883690838, + "95.0" : 33867.20883690838, + "99.0" : 33867.20883690838, + "99.9" : 33867.20883690838, + "99.99" : 33867.20883690838, + "99.999" : 33867.20883690838, + "99.9999" : 33867.20883690838, + "100.0" : 33867.20883690838 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 29699.616603885817, + 33787.62041485421, + 33867.20883690838 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 20873.74989808187, + "scoreError" : 37625.87460051677, + "scoreConfidence" : [ + -16752.1247024349, + 58499.62449859864 + ], + "scorePercentiles" : { + "0.0" : 19579.852323360643, + "50.0" : 19789.262777935124, + "90.0" : 23252.134592949842, + "95.0" : 23252.134592949842, + "99.0" : 23252.134592949842, + "99.9" : 23252.134592949842, + "99.99" : 23252.134592949842, + "99.999" : 23252.134592949842, + "99.9999" : 23252.134592949842, + "100.0" : 23252.134592949842 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 19579.852323360643, + 19789.262777935124, + 23252.134592949842 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 10763.036439572053, + "scoreError" : 1649.743843557938, + "scoreConfidence" : [ + 9113.292596014115, + 12412.780283129992 + ], + "scorePercentiles" : { + "0.0" : 10677.987615775943, + "50.0" : 10753.098948883728, + "90.0" : 10858.022754056487, + "95.0" : 10858.022754056487, + "99.0" : 10858.022754056487, + "99.9" : 10858.022754056487, + "99.99" : 10858.022754056487, + "99.999" : 10858.022754056487, + "99.9999" : 10858.022754056487, + "100.0" : 10858.022754056487 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 10858.022754056487, + 10677.987615775943, + 10753.098948883728 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1212488.4822053928, + "scoreError" : 515609.1499495682, + "scoreConfidence" : [ + 696879.3322558246, + 1728097.6321549611 + ], + "scorePercentiles" : { + "0.0" : 1184749.807701307, + "50.0" : 1211468.8714155068, + "90.0" : 1241246.7674993647, + "95.0" : 1241246.7674993647, + "99.0" : 1241246.7674993647, + "99.9" : 1241246.7674993647, + "99.99" : 1241246.7674993647, + "99.999" : 1241246.7674993647, + "99.9999" : 1241246.7674993647, + "100.0" : 1241246.7674993647 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1184749.807701307, + 1211468.8714155068, + 1241246.7674993647 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 256463.34549548718, + "scoreError" : 180481.44663410602, + "scoreConfidence" : [ + 75981.89886138117, + 436944.7921295932 + ], + "scorePercentiles" : { + "0.0" : 245137.9462487968, + "50.0" : 260834.17309063874, + "90.0" : 263417.917147026, + "95.0" : 263417.917147026, + "99.0" : 263417.917147026, + "99.9" : 263417.917147026, + "99.99" : 263417.917147026, + "99.999" : 263417.917147026, + "99.9999" : 263417.917147026, + "100.0" : 263417.917147026 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 245137.9462487968, + 263417.917147026, + 260834.17309063874 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 137623.1331595727, + "scoreError" : 41225.70273722531, + "scoreConfidence" : [ + 96397.43042234739, + 178848.835896798 + ], + "scorePercentiles" : { + "0.0" : 135196.263779021, + "50.0" : 138006.46985593418, + "90.0" : 139666.6658437629, + "95.0" : 139666.6658437629, + "99.0" : 139666.6658437629, + "99.9" : 139666.6658437629, + "99.99" : 139666.6658437629, + "99.999" : 139666.6658437629, + "99.9999" : 139666.6658437629, + "100.0" : 139666.6658437629 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 135196.263779021, + 139666.6658437629, + 138006.46985593418 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 92600.39751271835, + "scoreError" : 94205.26821269648, + "scoreConfidence" : [ + -1604.870699978128, + 186805.66572541482 + ], + "scorePercentiles" : { + "0.0" : 86826.47322570473, + "50.0" : 94198.85836251097, + "90.0" : 96775.86094993935, + "95.0" : 96775.86094993935, + "99.0" : 96775.86094993935, + "99.9" : 96775.86094993935, + "99.99" : 96775.86094993935, + "99.999" : 96775.86094993935, + "99.9999" : 96775.86094993935, + "100.0" : 96775.86094993935 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 86826.47322570473, + 94198.85836251097, + 96775.86094993935 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 63616.38514136167, + "scoreError" : 23744.527616483974, + "scoreConfidence" : [ + 39871.8575248777, + 87360.91275784565 + ], + "scorePercentiles" : { + "0.0" : 62755.88586726631, + "50.0" : 62979.580879413246, + "90.0" : 65113.688677405444, + "95.0" : 65113.688677405444, + "99.0" : 65113.688677405444, + "99.9" : 65113.688677405444, + "99.99" : 65113.688677405444, + "99.999" : 65113.688677405444, + "99.9999" : 65113.688677405444, + "100.0" : 65113.688677405444 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 65113.688677405444, + 62979.580879413246, + 62755.88586726631 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 39410.45818185903, + "scoreError" : 21413.540905476282, + "scoreConfidence" : [ + 17996.91727638275, + 60823.99908733531 + ], + "scorePercentiles" : { + "0.0" : 38245.56190850501, + "50.0" : 39392.94974505679, + "90.0" : 40592.86289201529, + "95.0" : 40592.86289201529, + "99.0" : 40592.86289201529, + "99.9" : 40592.86289201529, + "99.99" : 40592.86289201529, + "99.999" : 40592.86289201529, + "99.9999" : 40592.86289201529, + "100.0" : 40592.86289201529 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 40592.86289201529, + 39392.94974505679, + 38245.56190850501 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 28593.406011989562, + "scoreError" : 2196.1484180082007, + "scoreConfidence" : [ + 26397.25759398136, + 30789.554429997763 + ], + "scorePercentiles" : { + "0.0" : 28473.30413664976, + "50.0" : 28592.855043280935, + "90.0" : 28714.058856037995, + "95.0" : 28714.058856037995, + "99.0" : 28714.058856037995, + "99.9" : 28714.058856037995, + "99.99" : 28714.058856037995, + "99.999" : 28714.058856037995, + "99.9999" : 28714.058856037995, + "100.0" : 28714.058856037995 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 28592.855043280935, + 28714.058856037995, + 28473.30413664976 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 18858.24354127939, + "scoreError" : 5669.472219349919, + "scoreConfidence" : [ + 13188.771321929471, + 24527.715760629308 + ], + "scorePercentiles" : { + "0.0" : 18639.643538984514, + "50.0" : 18721.100625703897, + "90.0" : 19213.98645914976, + "95.0" : 19213.98645914976, + "99.0" : 19213.98645914976, + "99.9" : 19213.98645914976, + "99.99" : 19213.98645914976, + "99.999" : 19213.98645914976, + "99.9999" : 19213.98645914976, + "100.0" : 19213.98645914976 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 18639.643538984514, + 18721.100625703897, + 19213.98645914976 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 9418.406689600326, + "scoreError" : 335.2649967558348, + "scoreConfidence" : [ + 9083.14169284449, + 9753.671686356161 + ], + "scorePercentiles" : { + "0.0" : 9397.623050872962, + "50.0" : 9425.091136292167, + "90.0" : 9432.505881635843, + "95.0" : 9432.505881635843, + "99.0" : 9432.505881635843, + "99.9" : 9432.505881635843, + "99.99" : 9432.505881635843, + "99.999" : 9432.505881635843, + "99.9999" : 9432.505881635843, + "100.0" : 9432.505881635843 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 9432.505881635843, + 9425.091136292167, + 9397.623050872962 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 190648.36332708457, + "scoreError" : 330779.988080545, + "scoreConfidence" : [ + -140131.6247534604, + 521428.35140762955 + ], + "scorePercentiles" : { + "0.0" : 169727.85895125804, + "50.0" : 200409.6157612311, + "90.0" : 201807.61526876452, + "95.0" : 201807.61526876452, + "99.0" : 201807.61526876452, + "99.9" : 201807.61526876452, + "99.99" : 201807.61526876452, + "99.999" : 201807.61526876452, + "99.9999" : 201807.61526876452, + "100.0" : 201807.61526876452 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 169727.85895125804, + 201807.61526876452, + 200409.6157612311 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 46878.70756940893, + "scoreError" : 31150.027256868954, + "scoreConfidence" : [ + 15728.680312539975, + 78028.73482627788 + ], + "scorePercentiles" : { + "0.0" : 45004.84810729282, + "50.0" : 47284.757917167786, + "90.0" : 48346.51668376619, + "95.0" : 48346.51668376619, + "99.0" : 48346.51668376619, + "99.9" : 48346.51668376619, + "99.99" : 48346.51668376619, + "99.999" : 48346.51668376619, + "99.9999" : 48346.51668376619, + "100.0" : 48346.51668376619 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 47284.757917167786, + 48346.51668376619, + 45004.84810729282 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 27568.636819540825, + "scoreError" : 15673.025766730017, + "scoreConfidence" : [ + 11895.611052810807, + 43241.662586270846 + ], + "scorePercentiles" : { + "0.0" : 27008.789141129324, + "50.0" : 27139.359689127457, + "90.0" : 28557.761628365686, + "95.0" : 28557.761628365686, + "99.0" : 28557.761628365686, + "99.9" : 28557.761628365686, + "99.99" : 28557.761628365686, + "99.999" : 28557.761628365686, + "99.9999" : 28557.761628365686, + "100.0" : 28557.761628365686 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 27008.789141129324, + 27139.359689127457, + 28557.761628365686 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 17795.674692048495, + "scoreError" : 12269.010861268549, + "scoreConfidence" : [ + 5526.663830779946, + 30064.685553317046 + ], + "scorePercentiles" : { + "0.0" : 17238.764063345927, + "50.0" : 17605.459461777828, + "90.0" : 18542.800551021726, + "95.0" : 18542.800551021726, + "99.0" : 18542.800551021726, + "99.9" : 18542.800551021726, + "99.99" : 18542.800551021726, + "99.999" : 18542.800551021726, + "99.9999" : 18542.800551021726, + "100.0" : 18542.800551021726 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 17238.764063345927, + 18542.800551021726, + 17605.459461777828 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 13664.71347153865, + "scoreError" : 8998.488577302638, + "scoreConfidence" : [ + 4666.224894236011, + 22663.20204884129 + ], + "scorePercentiles" : { + "0.0" : 13123.924530079115, + "50.0" : 13780.370278289409, + "90.0" : 14089.845606247422, + "95.0" : 14089.845606247422, + "99.0" : 14089.845606247422, + "99.9" : 14089.845606247422, + "99.99" : 14089.845606247422, + "99.999" : 14089.845606247422, + "99.9999" : 14089.845606247422, + "100.0" : 14089.845606247422 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 13123.924530079115, + 13780.370278289409, + 14089.845606247422 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 8443.892055069306, + "scoreError" : 4295.068505616148, + "scoreConfidence" : [ + 4148.823549453157, + 12738.960560685453 + ], + "scorePercentiles" : { + "0.0" : 8279.408921149396, + "50.0" : 8338.690458695604, + "90.0" : 8713.576785362917, + "95.0" : 8713.576785362917, + "99.0" : 8713.576785362917, + "99.9" : 8713.576785362917, + "99.99" : 8713.576785362917, + "99.999" : 8713.576785362917, + "99.9999" : 8713.576785362917, + "100.0" : 8713.576785362917 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 8279.408921149396, + 8338.690458695604, + 8713.576785362917 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 5469.914566259783, + "scoreError" : 579.9833522397448, + "scoreConfidence" : [ + 4889.931214020038, + 6049.897918499528 + ], + "scorePercentiles" : { + "0.0" : 5437.260510821487, + "50.0" : 5471.717741249362, + "90.0" : 5500.7654467084985, + "95.0" : 5500.7654467084985, + "99.0" : 5500.7654467084985, + "99.9" : 5500.7654467084985, + "99.99" : 5500.7654467084985, + "99.999" : 5500.7654467084985, + "99.9999" : 5500.7654467084985, + "100.0" : 5500.7654467084985 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 5500.7654467084985, + 5471.717741249362, + 5437.260510821487 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 3742.091763885817, + "scoreError" : 1028.9508158564606, + "scoreConfidence" : [ + 2713.140948029356, + 4771.042579742278 + ], + "scorePercentiles" : { + "0.0" : 3685.2777113655166, + "50.0" : 3742.928650303638, + "90.0" : 3798.068929988296, + "95.0" : 3798.068929988296, + "99.0" : 3798.068929988296, + "99.9" : 3798.068929988296, + "99.99" : 3798.068929988296, + "99.999" : 3798.068929988296, + "99.9999" : 3798.068929988296, + "100.0" : 3798.068929988296 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 3685.2777113655166, + 3742.928650303638, + 3798.068929988296 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 1856.2533984656632, + "scoreError" : 130.15059468076498, + "scoreConfidence" : [ + 1726.1028037848982, + 1986.403993146428 + ], + "scorePercentiles" : { + "0.0" : 1848.2559827059058, + "50.0" : 1858.5418824357728, + "90.0" : 1861.9623302553111, + "95.0" : 1861.9623302553111, + "99.0" : 1861.9623302553111, + "99.9" : 1861.9623302553111, + "99.99" : 1861.9623302553111, + "99.999" : 1861.9623302553111, + "99.9999" : 1861.9623302553111, + "100.0" : 1861.9623302553111 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1848.2559827059058, + 1861.9623302553111, + 1858.5418824357728 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1187123.8962674525, + "scoreError" : 322760.69092911197, + "scoreConfidence" : [ + 864363.2053383405, + 1509884.5871965645 + ], + "scorePercentiles" : { + "0.0" : 1176469.5365898912, + "50.0" : 1177356.1674732456, + "90.0" : 1207545.9847392202, + "95.0" : 1207545.9847392202, + "99.0" : 1207545.9847392202, + "99.9" : 1207545.9847392202, + "99.99" : 1207545.9847392202, + "99.999" : 1207545.9847392202, + "99.9999" : 1207545.9847392202, + "100.0" : 1207545.9847392202 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1177356.1674732456, + 1207545.9847392202, + 1176469.5365898912 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 321705.35167651885, + "scoreError" : 332868.6945110177, + "scoreConfidence" : [ + -11163.34283449885, + 654574.0461875366 + ], + "scorePercentiles" : { + "0.0" : 300637.12300643115, + "50.0" : 332203.6668284384, + "90.0" : 332275.26519468694, + "95.0" : 332275.26519468694, + "99.0" : 332275.26519468694, + "99.9" : 332275.26519468694, + "99.99" : 332275.26519468694, + "99.999" : 332275.26519468694, + "99.9999" : 332275.26519468694, + "100.0" : 332275.26519468694 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 300637.12300643115, + 332275.26519468694, + 332203.6668284384 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 136422.32746768853, + "scoreError" : 25918.657494105755, + "scoreConfidence" : [ + 110503.66997358279, + 162340.98496179428 + ], + "scorePercentiles" : { + "0.0" : 135421.15941582306, + "50.0" : 135797.47631149544, + "90.0" : 138048.34667574713, + "95.0" : 138048.34667574713, + "99.0" : 138048.34667574713, + "99.9" : 138048.34667574713, + "99.99" : 138048.34667574713, + "99.999" : 138048.34667574713, + "99.9999" : 138048.34667574713, + "100.0" : 138048.34667574713 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 135421.15941582306, + 135797.47631149544, + 138048.34667574713 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 106438.30693386267, + "scoreError" : 92956.06478970416, + "scoreConfidence" : [ + 13482.242144158503, + 199394.37172356684 + ], + "scorePercentiles" : { + "0.0" : 103467.24881068358, + "50.0" : 103525.9915450584, + "90.0" : 112321.68044584601, + "95.0" : 112321.68044584601, + "99.0" : 112321.68044584601, + "99.9" : 112321.68044584601, + "99.99" : 112321.68044584601, + "99.999" : 112321.68044584601, + "99.9999" : 112321.68044584601, + "100.0" : 112321.68044584601 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 112321.68044584601, + 103467.24881068358, + 103525.9915450584 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 73208.10526571149, + "scoreError" : 37195.025981469116, + "scoreConfidence" : [ + 36013.079284242376, + 110403.1312471806 + ], + "scorePercentiles" : { + "0.0" : 70902.60512121102, + "50.0" : 73948.36823260492, + "90.0" : 74773.34244331854, + "95.0" : 74773.34244331854, + "99.0" : 74773.34244331854, + "99.9" : 74773.34244331854, + "99.99" : 74773.34244331854, + "99.999" : 74773.34244331854, + "99.9999" : 74773.34244331854, + "100.0" : 74773.34244331854 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 70902.60512121102, + 73948.36823260492, + 74773.34244331854 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 49940.45683634541, + "scoreError" : 46776.561627321345, + "scoreConfidence" : [ + 3163.8952090240637, + 96717.01846366675 + ], + "scorePercentiles" : { + "0.0" : 47225.68172707799, + "50.0" : 50274.86023296891, + "90.0" : 52320.82854898933, + "95.0" : 52320.82854898933, + "99.0" : 52320.82854898933, + "99.9" : 52320.82854898933, + "99.99" : 52320.82854898933, + "99.999" : 52320.82854898933, + "99.9999" : 52320.82854898933, + "100.0" : 52320.82854898933 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 52320.82854898933, + 50274.86023296891, + 47225.68172707799 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 35342.11392425184, + "scoreError" : 26464.208866969842, + "scoreConfidence" : [ + 8877.905057281998, + 61806.32279122168 + ], + "scorePercentiles" : { + "0.0" : 33721.74620404684, + "50.0" : 35784.84004077516, + "90.0" : 36519.75552793352, + "95.0" : 36519.75552793352, + "99.0" : 36519.75552793352, + "99.9" : 36519.75552793352, + "99.99" : 36519.75552793352, + "99.999" : 36519.75552793352, + "99.9999" : 36519.75552793352, + "100.0" : 36519.75552793352 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 36519.75552793352, + 35784.84004077516, + 33721.74620404684 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 24359.077518365793, + "scoreError" : 4989.768845003392, + "scoreConfidence" : [ + 19369.3086733624, + 29348.846363369186 + ], + "scorePercentiles" : { + "0.0" : 24058.47702097591, + "50.0" : 24425.502414607243, + "90.0" : 24593.25311951423, + "95.0" : 24593.25311951423, + "99.0" : 24593.25311951423, + "99.9" : 24593.25311951423, + "99.99" : 24593.25311951423, + "99.999" : 24593.25311951423, + "99.9999" : 24593.25311951423, + "100.0" : 24593.25311951423 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 24058.47702097591, + 24425.502414607243, + 24593.25311951423 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 12626.933631658574, + "scoreError" : 1746.5270332035968, + "scoreConfidence" : [ + 10880.406598454978, + 14373.46066486217 + ], + "scorePercentiles" : { + "0.0" : 12516.573124087252, + "50.0" : 12676.61536385406, + "90.0" : 12687.612407034407, + "95.0" : 12687.612407034407, + "99.0" : 12687.612407034407, + "99.9" : 12687.612407034407, + "99.99" : 12687.612407034407, + "99.999" : 12687.612407034407, + "99.9999" : 12687.612407034407, + "100.0" : 12687.612407034407 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 12516.573124087252, + 12676.61536385406, + 12687.612407034407 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1118612.4261076932, + "scoreError" : 662518.8608040491, + "scoreConfidence" : [ + 456093.56530364417, + 1781131.2869117423 + ], + "scorePercentiles" : { + "0.0" : 1095794.936064342, + "50.0" : 1099553.2673399397, + "90.0" : 1160489.0749187982, + "95.0" : 1160489.0749187982, + "99.0" : 1160489.0749187982, + "99.9" : 1160489.0749187982, + "99.99" : 1160489.0749187982, + "99.999" : 1160489.0749187982, + "99.9999" : 1160489.0749187982, + "100.0" : 1160489.0749187982 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1099553.2673399397, + 1095794.936064342, + 1160489.0749187982 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 371262.3930417322, + "scoreError" : 113397.6197825631, + "scoreConfidence" : [ + 257864.7732591691, + 484660.0128242953 + ], + "scorePercentiles" : { + "0.0" : 367653.22211052285, + "50.0" : 367694.3239259879, + "90.0" : 378439.63308868586, + "95.0" : 378439.63308868586, + "99.0" : 378439.63308868586, + "99.9" : 378439.63308868586, + "99.99" : 378439.63308868586, + "99.999" : 378439.63308868586, + "99.9999" : 378439.63308868586, + "100.0" : 378439.63308868586 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 367653.22211052285, + 378439.63308868586, + 367694.3239259879 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 197500.19146253323, + "scoreError" : 228549.3491405493, + "scoreConfidence" : [ + -31049.157678016083, + 426049.5406030825 + ], + "scorePercentiles" : { + "0.0" : 183063.78672332823, + "50.0" : 203923.1271752083, + "90.0" : 205513.66048906313, + "95.0" : 205513.66048906313, + "99.0" : 205513.66048906313, + "99.9" : 205513.66048906313, + "99.99" : 205513.66048906313, + "99.999" : 205513.66048906313, + "99.9999" : 205513.66048906313, + "100.0" : 205513.66048906313 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 183063.78672332823, + 203923.1271752083, + 205513.66048906313 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 128942.92940413271, + "scoreError" : 248027.5991167225, + "scoreConfidence" : [ + -119084.66971258979, + 376970.52852085524 + ], + "scorePercentiles" : { + "0.0" : 113247.17223546686, + "50.0" : 136540.45999018068, + "90.0" : 137041.1559867506, + "95.0" : 137041.1559867506, + "99.0" : 137041.1559867506, + "99.9" : 137041.1559867506, + "99.99" : 137041.1559867506, + "99.999" : 137041.1559867506, + "99.9999" : 137041.1559867506, + "100.0" : 137041.1559867506 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 113247.17223546686, + 137041.1559867506, + 136540.45999018068 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 79824.58838288537, + "scoreError" : 19643.845986875545, + "scoreConfidence" : [ + 60180.742396009824, + 99468.43436976091 + ], + "scorePercentiles" : { + "0.0" : 78646.14060522917, + "50.0" : 80070.55367643002, + "90.0" : 80757.07086699692, + "95.0" : 80757.07086699692, + "99.0" : 80757.07086699692, + "99.9" : 80757.07086699692, + "99.99" : 80757.07086699692, + "99.999" : 80757.07086699692, + "99.9999" : 80757.07086699692, + "100.0" : 80757.07086699692 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 80070.55367643002, + 80757.07086699692, + 78646.14060522917 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 53942.263441086594, + "scoreError" : 24070.436727481232, + "scoreConfidence" : [ + 29871.826713605362, + 78012.70016856783 + ], + "scorePercentiles" : { + "0.0" : 52904.547810728116, + "50.0" : 53495.13564924958, + "90.0" : 55427.10686328205, + "95.0" : 55427.10686328205, + "99.0" : 55427.10686328205, + "99.9" : 55427.10686328205, + "99.99" : 55427.10686328205, + "99.999" : 55427.10686328205, + "99.9999" : 55427.10686328205, + "100.0" : 55427.10686328205 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 53495.13564924958, + 52904.547810728116, + 55427.10686328205 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 38300.36873763687, + "scoreError" : 40003.25439898508, + "scoreConfidence" : [ + -1702.885661348213, + 78303.62313662196 + ], + "scorePercentiles" : { + "0.0" : 35783.35170373691, + "50.0" : 39321.262417018945, + "90.0" : 39796.49209215475, + "95.0" : 39796.49209215475, + "99.0" : 39796.49209215475, + "99.9" : 39796.49209215475, + "99.99" : 39796.49209215475, + "99.999" : 39796.49209215475, + "99.9999" : 39796.49209215475, + "100.0" : 39796.49209215475 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 39796.49209215475, + 39321.262417018945, + 35783.35170373691 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 23905.869524941267, + "scoreError" : 15023.11692640968, + "scoreConfidence" : [ + 8882.752598531586, + 38928.986451350946 + ], + "scorePercentiles" : { + "0.0" : 23122.75075754281, + "50.0" : 23830.371254047663, + "90.0" : 24764.486563233328, + "95.0" : 24764.486563233328, + "99.0" : 24764.486563233328, + "99.9" : 24764.486563233328, + "99.99" : 24764.486563233328, + "99.999" : 24764.486563233328, + "99.9999" : 24764.486563233328, + "100.0" : 24764.486563233328 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 24764.486563233328, + 23830.371254047663, + 23122.75075754281 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 13191.281475030866, + "scoreError" : 597.6590717550305, + "scoreConfidence" : [ + 12593.622403275836, + 13788.940546785896 + ], + "scorePercentiles" : { + "0.0" : 13153.463359796455, + "50.0" : 13209.45483722987, + "90.0" : 13210.926228066275, + "95.0" : 13210.926228066275, + "99.0" : 13210.926228066275, + "99.9" : 13210.926228066275, + "99.99" : 13210.926228066275, + "99.999" : 13210.926228066275, + "99.9999" : 13210.926228066275, + "100.0" : 13210.926228066275 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 13210.926228066275, + 13153.463359796455, + 13209.45483722987 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1113365.564212594, + "scoreError" : 170265.63766700053, + "scoreConfidence" : [ + 943099.9265455934, + 1283631.2018795945 + ], + "scorePercentiles" : { + "0.0" : 1103341.0400385936, + "50.0" : 1114952.4096348234, + "90.0" : 1121803.2429643646, + "95.0" : 1121803.2429643646, + "99.0" : 1121803.2429643646, + "99.9" : 1121803.2429643646, + "99.99" : 1121803.2429643646, + "99.999" : 1121803.2429643646, + "99.9999" : 1121803.2429643646, + "100.0" : 1121803.2429643646 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1103341.0400385936, + 1121803.2429643646, + 1114952.4096348234 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 372095.2538524459, + "scoreError" : 135111.73554014112, + "scoreConfidence" : [ + 236983.5183123048, + 507206.98939258704 + ], + "scorePercentiles" : { + "0.0" : 363844.8879203312, + "50.0" : 374272.0021353067, + "90.0" : 378168.87150169973, + "95.0" : 378168.87150169973, + "99.0" : 378168.87150169973, + "99.9" : 378168.87150169973, + "99.99" : 378168.87150169973, + "99.999" : 378168.87150169973, + "99.9999" : 378168.87150169973, + "100.0" : 378168.87150169973 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 363844.8879203312, + 378168.87150169973, + 374272.0021353067 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 201495.6358080142, + "scoreError" : 45752.71298627291, + "scoreConfidence" : [ + 155742.9228217413, + 247248.3487942871 + ], + "scorePercentiles" : { + "0.0" : 198780.77193711037, + "50.0" : 201980.42787926277, + "90.0" : 203725.70760766938, + "95.0" : 203725.70760766938, + "99.0" : 203725.70760766938, + "99.9" : 203725.70760766938, + "99.99" : 203725.70760766938, + "99.999" : 203725.70760766938, + "99.9999" : 203725.70760766938, + "100.0" : 203725.70760766938 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 198780.77193711037, + 201980.42787926277, + 203725.70760766938 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 131871.0735139161, + "scoreError" : 37165.62264841954, + "scoreConfidence" : [ + 94705.45086549656, + 169036.69616233566 + ], + "scorePercentiles" : { + "0.0" : 129627.92764234131, + "50.0" : 132379.21589657178, + "90.0" : 133606.07700283526, + "95.0" : 133606.07700283526, + "99.0" : 133606.07700283526, + "99.9" : 133606.07700283526, + "99.99" : 133606.07700283526, + "99.999" : 133606.07700283526, + "99.9999" : 133606.07700283526, + "100.0" : 133606.07700283526 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 132379.21589657178, + 133606.07700283526, + 129627.92764234131 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 84768.22069129029, + "scoreError" : 33659.204228973715, + "scoreConfidence" : [ + 51109.01646231658, + 118427.424920264 + ], + "scorePercentiles" : { + "0.0" : 82647.58524719266, + "50.0" : 85652.15780725612, + "90.0" : 86004.91901942206, + "95.0" : 86004.91901942206, + "99.0" : 86004.91901942206, + "99.9" : 86004.91901942206, + "99.99" : 86004.91901942206, + "99.999" : 86004.91901942206, + "99.9999" : 86004.91901942206, + "100.0" : 86004.91901942206 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 86004.91901942206, + 82647.58524719266, + 85652.15780725612 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 52855.45278719665, + "scoreError" : 68419.13536469685, + "scoreConfidence" : [ + -15563.6825775002, + 121274.58815189349 + ], + "scorePercentiles" : { + "0.0" : 48546.343185906604, + "50.0" : 54638.10906833997, + "90.0" : 55381.906107343384, + "95.0" : 55381.906107343384, + "99.0" : 55381.906107343384, + "99.9" : 55381.906107343384, + "99.99" : 55381.906107343384, + "99.999" : 55381.906107343384, + "99.9999" : 55381.906107343384, + "100.0" : 55381.906107343384 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 55381.906107343384, + 54638.10906833997, + 48546.343185906604 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 37453.41740924473, + "scoreError" : 22389.781662537527, + "scoreConfidence" : [ + 15063.635746707201, + 59843.199071782255 + ], + "scorePercentiles" : { + "0.0" : 36414.94837270195, + "50.0" : 37137.57565206227, + "90.0" : 38807.72820296999, + "95.0" : 38807.72820296999, + "99.0" : 38807.72820296999, + "99.9" : 38807.72820296999, + "99.99" : 38807.72820296999, + "99.999" : 38807.72820296999, + "99.9999" : 38807.72820296999, + "100.0" : 38807.72820296999 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 38807.72820296999, + 37137.57565206227, + 36414.94837270195 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 24958.68975735542, + "scoreError" : 28135.29754174218, + "scoreConfidence" : [ + -3176.6077843867606, + 53093.9872990976 + ], + "scorePercentiles" : { + "0.0" : 23848.84756393361, + "50.0" : 24307.567917255492, + "90.0" : 26719.653790877153, + "95.0" : 26719.653790877153, + "99.0" : 26719.653790877153, + "99.9" : 26719.653790877153, + "99.99" : 26719.653790877153, + "99.999" : 26719.653790877153, + "99.9999" : 26719.653790877153, + "100.0" : 26719.653790877153 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 26719.653790877153, + 24307.567917255492, + 23848.84756393361 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 13309.88380978118, + "scoreError" : 1396.5307985154766, + "scoreConfidence" : [ + 11913.353011265704, + 14706.414608296656 + ], + "scorePercentiles" : { + "0.0" : 13221.600504275682, + "50.0" : 13350.253679264877, + "90.0" : 13357.797245802978, + "95.0" : 13357.797245802978, + "99.0" : 13357.797245802978, + "99.9" : 13357.797245802978, + "99.99" : 13357.797245802978, + "99.999" : 13357.797245802978, + "99.9999" : 13357.797245802978, + "100.0" : 13357.797245802978 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 13221.600504275682, + 13350.253679264877, + 13357.797245802978 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 157724.77926344774, + "scoreError" : 64422.08999169074, + "scoreConfidence" : [ + 93302.689271757, + 222146.86925513847 + ], + "scorePercentiles" : { + "0.0" : 153650.88196213142, + "50.0" : 159613.94943667893, + "90.0" : 159909.50639153284, + "95.0" : 159909.50639153284, + "99.0" : 159909.50639153284, + "99.9" : 159909.50639153284, + "99.99" : 159909.50639153284, + "99.999" : 159909.50639153284, + "99.9999" : 159909.50639153284, + "100.0" : 159909.50639153284 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 153650.88196213142, + 159613.94943667893, + 159909.50639153284 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 48051.9398214335, + "scoreError" : 39373.36072955155, + "scoreConfidence" : [ + 8678.579091881955, + 87425.30055098505 + ], + "scorePercentiles" : { + "0.0" : 45900.256317325984, + "50.0" : 48038.991571168226, + "90.0" : 50216.571575806294, + "95.0" : 50216.571575806294, + "99.0" : 50216.571575806294, + "99.9" : 50216.571575806294, + "99.99" : 50216.571575806294, + "99.999" : 50216.571575806294, + "99.9999" : 50216.571575806294, + "100.0" : 50216.571575806294 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 45900.256317325984, + 48038.991571168226, + 50216.571575806294 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 26538.325116310836, + "scoreError" : 14270.154882063938, + "scoreConfidence" : [ + 12268.170234246898, + 40808.47999837477 + ], + "scorePercentiles" : { + "0.0" : 26008.67780754893, + "50.0" : 26169.559906672028, + "90.0" : 27436.737634711546, + "95.0" : 27436.737634711546, + "99.0" : 27436.737634711546, + "99.9" : 27436.737634711546, + "99.99" : 27436.737634711546, + "99.999" : 27436.737634711546, + "99.9999" : 27436.737634711546, + "100.0" : 27436.737634711546 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 26169.559906672028, + 26008.67780754893, + 27436.737634711546 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 17364.75443447521, + "scoreError" : 15477.563414481074, + "scoreConfidence" : [ + 1887.1910199941358, + 32842.317848956285 + ], + "scorePercentiles" : { + "0.0" : 16448.149188460717, + "50.0" : 17523.690290001327, + "90.0" : 18122.423824963586, + "95.0" : 18122.423824963586, + "99.0" : 18122.423824963586, + "99.9" : 18122.423824963586, + "99.99" : 18122.423824963586, + "99.999" : 18122.423824963586, + "99.9999" : 18122.423824963586, + "100.0" : 18122.423824963586 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 16448.149188460717, + 18122.423824963586, + 17523.690290001327 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 13159.131747291432, + "scoreError" : 7265.282645713064, + "scoreConfidence" : [ + 5893.849101578368, + 20424.414393004496 + ], + "scorePercentiles" : { + "0.0" : 12722.921545367584, + "50.0" : 13251.215670805064, + "90.0" : 13503.258025701653, + "95.0" : 13503.258025701653, + "99.0" : 13503.258025701653, + "99.9" : 13503.258025701653, + "99.99" : 13503.258025701653, + "99.999" : 13503.258025701653, + "99.9999" : 13503.258025701653, + "100.0" : 13503.258025701653 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 12722.921545367584, + 13251.215670805064, + 13503.258025701653 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 7996.954525211713, + "scoreError" : 4315.863416818884, + "scoreConfidence" : [ + 3681.0911083928295, + 12312.817942030597 + ], + "scorePercentiles" : { + "0.0" : 7839.018288383672, + "50.0" : 7882.904323596446, + "90.0" : 8268.94096365502, + "95.0" : 8268.94096365502, + "99.0" : 8268.94096365502, + "99.9" : 8268.94096365502, + "99.99" : 8268.94096365502, + "99.999" : 8268.94096365502, + "99.9999" : 8268.94096365502, + "100.0" : 8268.94096365502 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 7882.904323596446, + 7839.018288383672, + 8268.94096365502 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 6616.701504652191, + "scoreError" : 1176.3925205451837, + "scoreConfidence" : [ + 5440.308984107007, + 7793.094025197375 + ], + "scorePercentiles" : { + "0.0" : 6578.291071810492, + "50.0" : 6580.6671253577615, + "90.0" : 6691.1463167883185, + "95.0" : 6691.1463167883185, + "99.0" : 6691.1463167883185, + "99.9" : 6691.1463167883185, + "99.99" : 6691.1463167883185, + "99.999" : 6691.1463167883185, + "99.9999" : 6691.1463167883185, + "100.0" : 6691.1463167883185 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 6578.291071810492, + 6580.6671253577615, + 6691.1463167883185 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 4020.9579828828937, + "scoreError" : 225.80855322179153, + "scoreConfidence" : [ + 3795.149429661102, + 4246.766536104686 + ], + "scorePercentiles" : { + "0.0" : 4009.9812562418892, + "50.0" : 4018.5196904525183, + "90.0" : 4034.373001954274, + "95.0" : 4034.373001954274, + "99.0" : 4034.373001954274, + "99.9" : 4034.373001954274, + "99.99" : 4034.373001954274, + "99.999" : 4034.373001954274, + "99.9999" : 4034.373001954274, + "100.0" : 4034.373001954274 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 4034.373001954274, + 4009.9812562418892, + 4018.5196904525183 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/graalvm-jdk-25+37.1/bin/java", + "jvmArgs" : [ + "-XX:ThreadPriorityPolicy=1", + "-XX:+UnlockExperimentalVMOptions", + "-XX:+EnableJVMCIProduct", + "-XX:+EnableJVMCI", + "-XX:-UnlockExperimentalVMOptions", + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "Java HotSpot(TM) 64-Bit Server VM", + "vmVersion" : "25+37-LTS-jvmci-b01", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 2060.0435553455586, + "scoreError" : 87.81467649025123, + "scoreConfidence" : [ + 1972.2288788553074, + 2147.85823183581 + ], + "scorePercentiles" : { + "0.0" : 2054.611998851689, + "50.0" : 2061.738233466926, + "90.0" : 2063.7804337180596, + "95.0" : 2063.7804337180596, + "99.0" : 2063.7804337180596, + "99.9" : 2063.7804337180596, + "99.99" : 2063.7804337180596, + "99.999" : 2063.7804337180596, + "99.9999" : 2063.7804337180596, + "100.0" : 2063.7804337180596 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 2063.7804337180596, + 2061.738233466926, + 2054.611998851689 + ] + ] + }, + "secondaryMetrics" : { + } + } +] + + diff --git a/benchmark/jmh/results/jmh-results-5.0.0.jdk25.json b/benchmark/jmh/results/jmh-results-5.0.0.jdk25.json new file mode 100644 index 00000000..61ca3787 --- /dev/null +++ b/benchmark/jmh/results/jmh-results-5.0.0.jdk25.json @@ -0,0 +1,9076 @@ +[ + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 719392.5759295939, + "scoreError" : 181291.69308359397, + "scoreConfidence" : [ + 538100.8828459999, + 900684.2690131878 + ], + "scorePercentiles" : { + "0.0" : 709059.6655040953, + "50.0" : 720237.9950345228, + "90.0" : 728880.0672501636, + "95.0" : 728880.0672501636, + "99.0" : 728880.0672501636, + "99.9" : 728880.0672501636, + "99.99" : 728880.0672501636, + "99.999" : 728880.0672501636, + "99.9999" : 728880.0672501636, + "100.0" : 728880.0672501636 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 720237.9950345228, + 709059.6655040953, + 728880.0672501636 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 241469.10471168347, + "scoreError" : 80489.57968867301, + "scoreConfidence" : [ + 160979.52502301044, + 321958.6844003565 + ], + "scorePercentiles" : { + "0.0" : 238645.18663671546, + "50.0" : 239209.00372231146, + "90.0" : 246553.12377602348, + "95.0" : 246553.12377602348, + "99.0" : 246553.12377602348, + "99.9" : 246553.12377602348, + "99.99" : 246553.12377602348, + "99.999" : 246553.12377602348, + "99.9999" : 246553.12377602348, + "100.0" : 246553.12377602348 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 246553.12377602348, + 238645.18663671546, + 239209.00372231146 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 119287.09244973086, + "scoreError" : 1502.83690769999, + "scoreConfidence" : [ + 117784.25554203086, + 120789.92935743085 + ], + "scorePercentiles" : { + "0.0" : 119195.38371534128, + "50.0" : 119311.0867107166, + "90.0" : 119354.80692313473, + "95.0" : 119354.80692313473, + "99.0" : 119354.80692313473, + "99.9" : 119354.80692313473, + "99.99" : 119354.80692313473, + "99.999" : 119354.80692313473, + "99.9999" : 119354.80692313473, + "100.0" : 119354.80692313473 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 119354.80692313473, + 119311.0867107166, + 119195.38371534128 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 72340.15121821144, + "scoreError" : 11151.613930631667, + "scoreConfidence" : [ + 61188.53728757977, + 83491.7651488431 + ], + "scorePercentiles" : { + "0.0" : 71650.66883198556, + "50.0" : 72554.13932573484, + "90.0" : 72815.64549691392, + "95.0" : 72815.64549691392, + "99.0" : 72815.64549691392, + "99.9" : 72815.64549691392, + "99.99" : 72815.64549691392, + "99.999" : 72815.64549691392, + "99.9999" : 72815.64549691392, + "100.0" : 72815.64549691392 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 71650.66883198556, + 72554.13932573484, + 72815.64549691392 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 52455.110732953326, + "scoreError" : 14004.18619270526, + "scoreConfidence" : [ + 38450.92454024807, + 66459.2969256586 + ], + "scorePercentiles" : { + "0.0" : 51622.14078717586, + "50.0" : 52609.19105544765, + "90.0" : 53134.00035623648, + "95.0" : 53134.00035623648, + "99.0" : 53134.00035623648, + "99.9" : 53134.00035623648, + "99.99" : 53134.00035623648, + "99.999" : 53134.00035623648, + "99.9999" : 53134.00035623648, + "100.0" : 53134.00035623648 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 53134.00035623648, + 51622.14078717586, + 52609.19105544765 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 34603.46776817581, + "scoreError" : 5688.846698567695, + "scoreConfidence" : [ + 28914.621069608118, + 40292.314466743504 + ], + "scorePercentiles" : { + "0.0" : 34279.200322040306, + "50.0" : 34630.05546353243, + "90.0" : 34901.147518954705, + "95.0" : 34901.147518954705, + "99.0" : 34901.147518954705, + "99.9" : 34901.147518954705, + "99.99" : 34901.147518954705, + "99.999" : 34901.147518954705, + "99.9999" : 34901.147518954705, + "100.0" : 34901.147518954705 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 34901.147518954705, + 34279.200322040306, + 34630.05546353243 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 23590.975929949975, + "scoreError" : 2744.7951953148436, + "scoreConfidence" : [ + 20846.18073463513, + 26335.77112526482 + ], + "scorePercentiles" : { + "0.0" : 23484.00332375587, + "50.0" : 23525.915634830697, + "90.0" : 23763.008831263363, + "95.0" : 23763.008831263363, + "99.0" : 23763.008831263363, + "99.9" : 23763.008831263363, + "99.99" : 23763.008831263363, + "99.999" : 23763.008831263363, + "99.9999" : 23763.008831263363, + "100.0" : 23763.008831263363 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 23763.008831263363, + 23525.915634830697, + 23484.00332375587 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 17541.987426722175, + "scoreError" : 324.26720363631654, + "scoreConfidence" : [ + 17217.720223085857, + 17866.254630358493 + ], + "scorePercentiles" : { + "0.0" : 17526.95810878543, + "50.0" : 17537.39790612308, + "90.0" : 17561.606265258015, + "95.0" : 17561.606265258015, + "99.0" : 17561.606265258015, + "99.9" : 17561.606265258015, + "99.99" : 17561.606265258015, + "99.999" : 17561.606265258015, + "99.9999" : 17561.606265258015, + "100.0" : 17561.606265258015 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 17526.95810878543, + 17537.39790612308, + 17561.606265258015 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 8711.662574390642, + "scoreError" : 1540.0289804350214, + "scoreConfidence" : [ + 7171.633593955621, + 10251.691554825664 + ], + "scorePercentiles" : { + "0.0" : 8657.884561442526, + "50.0" : 8668.14775551501, + "90.0" : 8808.955406214396, + "95.0" : 8808.955406214396, + "99.0" : 8808.955406214396, + "99.9" : 8808.955406214396, + "99.99" : 8808.955406214396, + "99.999" : 8808.955406214396, + "99.9999" : 8808.955406214396, + "100.0" : 8808.955406214396 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 8668.14775551501, + 8657.884561442526, + 8808.955406214396 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 207097.21077861032, + "scoreError" : 50023.17321693147, + "scoreConfidence" : [ + 157074.03756167885, + 257120.38399554178 + ], + "scorePercentiles" : { + "0.0" : 204089.49595613783, + "50.0" : 207744.640902131, + "90.0" : 209457.49547756204, + "95.0" : 209457.49547756204, + "99.0" : 209457.49547756204, + "99.9" : 209457.49547756204, + "99.99" : 209457.49547756204, + "99.999" : 209457.49547756204, + "99.9999" : 209457.49547756204, + "100.0" : 209457.49547756204 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 204089.49595613783, + 207744.640902131, + 209457.49547756204 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 76993.04103410686, + "scoreError" : 31310.66007436075, + "scoreConfidence" : [ + 45682.380959746115, + 108303.70110846762 + ], + "scorePercentiles" : { + "0.0" : 75013.55016801758, + "50.0" : 77900.92234718056, + "90.0" : 78064.65058712244, + "95.0" : 78064.65058712244, + "99.0" : 78064.65058712244, + "99.9" : 78064.65058712244, + "99.99" : 78064.65058712244, + "99.999" : 78064.65058712244, + "99.9999" : 78064.65058712244, + "100.0" : 78064.65058712244 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 75013.55016801758, + 78064.65058712244, + 77900.92234718056 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 44101.78511197464, + "scoreError" : 27901.11716833131, + "scoreConfidence" : [ + 16200.66794364333, + 72002.90228030595 + ], + "scorePercentiles" : { + "0.0" : 42369.44769572671, + "50.0" : 44671.00243160297, + "90.0" : 45264.905208594246, + "95.0" : 45264.905208594246, + "99.0" : 45264.905208594246, + "99.9" : 45264.905208594246, + "99.99" : 45264.905208594246, + "99.999" : 45264.905208594246, + "99.9999" : 45264.905208594246, + "100.0" : 45264.905208594246 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 42369.44769572671, + 44671.00243160297, + 45264.905208594246 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 26835.199441165794, + "scoreError" : 11881.19705134094, + "scoreConfidence" : [ + 14954.002389824855, + 38716.396492506734 + ], + "scorePercentiles" : { + "0.0" : 26261.91193947794, + "50.0" : 26700.380629903713, + "90.0" : 27543.30575411573, + "95.0" : 27543.30575411573, + "99.0" : 27543.30575411573, + "99.9" : 27543.30575411573, + "99.99" : 27543.30575411573, + "99.999" : 27543.30575411573, + "99.9999" : 27543.30575411573, + "100.0" : 27543.30575411573 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 26700.380629903713, + 26261.91193947794, + 27543.30575411573 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 18971.488099588765, + "scoreError" : 9647.19132732595, + "scoreConfidence" : [ + 9324.296772262815, + 28618.679426914714 + ], + "scorePercentiles" : { + "0.0" : 18568.376566916744, + "50.0" : 18775.866214049543, + "90.0" : 19570.22151780001, + "95.0" : 19570.22151780001, + "99.0" : 19570.22151780001, + "99.9" : 19570.22151780001, + "99.99" : 19570.22151780001, + "99.999" : 19570.22151780001, + "99.9999" : 19570.22151780001, + "100.0" : 19570.22151780001 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 18568.376566916744, + 19570.22151780001, + 18775.866214049543 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 11958.182546979757, + "scoreError" : 5649.731900561486, + "scoreConfidence" : [ + 6308.4506464182705, + 17607.914447541243 + ], + "scorePercentiles" : { + "0.0" : 11637.705479830951, + "50.0" : 11981.04175862976, + "90.0" : 12255.800402478566, + "95.0" : 12255.800402478566, + "99.0" : 12255.800402478566, + "99.9" : 12255.800402478566, + "99.99" : 12255.800402478566, + "99.999" : 12255.800402478566, + "99.9999" : 12255.800402478566, + "100.0" : 12255.800402478566 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 11637.705479830951, + 11981.04175862976, + 12255.800402478566 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 8409.1893061838, + "scoreError" : 3874.291872520486, + "scoreConfidence" : [ + 4534.897433663315, + 12283.481178704285 + ], + "scorePercentiles" : { + "0.0" : 8275.301783944407, + "50.0" : 8298.218349322586, + "90.0" : 8654.047785284405, + "95.0" : 8654.047785284405, + "99.0" : 8654.047785284405, + "99.9" : 8654.047785284405, + "99.99" : 8654.047785284405, + "99.999" : 8654.047785284405, + "99.9999" : 8654.047785284405, + "100.0" : 8654.047785284405 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 8275.301783944407, + 8298.218349322586, + 8654.047785284405 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 5851.501799222879, + "scoreError" : 769.8269713258779, + "scoreConfidence" : [ + 5081.674827897001, + 6621.328770548756 + ], + "scorePercentiles" : { + "0.0" : 5818.097874834018, + "50.0" : 5837.483987895892, + "90.0" : 5898.923534938726, + "95.0" : 5898.923534938726, + "99.0" : 5898.923534938726, + "99.9" : 5898.923534938726, + "99.99" : 5898.923534938726, + "99.999" : 5898.923534938726, + "99.9999" : 5898.923534938726, + "100.0" : 5898.923534938726 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 5818.097874834018, + 5837.483987895892, + 5898.923534938726 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 2848.153897224467, + "scoreError" : 339.8907934950514, + "scoreConfidence" : [ + 2508.263103729416, + 3188.0446907195183 + ], + "scorePercentiles" : { + "0.0" : 2826.9476348195667, + "50.0" : 2855.6235574245425, + "90.0" : 2861.8904994292907, + "95.0" : 2861.8904994292907, + "99.0" : 2861.8904994292907, + "99.9" : 2861.8904994292907, + "99.99" : 2861.8904994292907, + "99.999" : 2861.8904994292907, + "99.9999" : 2861.8904994292907, + "100.0" : 2861.8904994292907 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 2855.6235574245425, + 2861.8904994292907, + 2826.9476348195667 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 534352.6056768589, + "scoreError" : 168971.62802705265, + "scoreConfidence" : [ + 365380.9776498063, + 703324.2337039115 + ], + "scorePercentiles" : { + "0.0" : 526335.911328367, + "50.0" : 532230.5087481717, + "90.0" : 544491.396954038, + "95.0" : 544491.396954038, + "99.0" : 544491.396954038, + "99.9" : 544491.396954038, + "99.99" : 544491.396954038, + "99.999" : 544491.396954038, + "99.9999" : 544491.396954038, + "100.0" : 544491.396954038 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 526335.911328367, + 532230.5087481717, + 544491.396954038 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 220274.4013654018, + "scoreError" : 57848.389799799166, + "scoreConfidence" : [ + 162426.01156560265, + 278122.791165201 + ], + "scorePercentiles" : { + "0.0" : 217785.62216638282, + "50.0" : 219193.09295187469, + "90.0" : 223844.48897794788, + "95.0" : 223844.48897794788, + "99.0" : 223844.48897794788, + "99.9" : 223844.48897794788, + "99.99" : 223844.48897794788, + "99.999" : 223844.48897794788, + "99.9999" : 223844.48897794788, + "100.0" : 223844.48897794788 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 223844.48897794788, + 217785.62216638282, + 219193.09295187469 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 110367.56012918412, + "scoreError" : 1833.9489255456624, + "scoreConfidence" : [ + 108533.61120363846, + 112201.50905472977 + ], + "scorePercentiles" : { + "0.0" : 110294.73613324956, + "50.0" : 110325.69211334795, + "90.0" : 110482.25214095484, + "95.0" : 110482.25214095484, + "99.0" : 110482.25214095484, + "99.9" : 110482.25214095484, + "99.99" : 110482.25214095484, + "99.999" : 110482.25214095484, + "99.9999" : 110482.25214095484, + "100.0" : 110482.25214095484 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 110325.69211334795, + 110294.73613324956, + 110482.25214095484 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 73660.67809393577, + "scoreError" : 18618.17341107538, + "scoreConfidence" : [ + 55042.504682860395, + 92278.85150501115 + ], + "scorePercentiles" : { + "0.0" : 72485.54202452887, + "50.0" : 74172.33497389122, + "90.0" : 74324.1572833872, + "95.0" : 74324.1572833872, + "99.0" : 74324.1572833872, + "99.9" : 74324.1572833872, + "99.99" : 74324.1572833872, + "99.999" : 74324.1572833872, + "99.9999" : 74324.1572833872, + "100.0" : 74324.1572833872 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 72485.54202452887, + 74324.1572833872, + 74172.33497389122 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 52495.41636693765, + "scoreError" : 4261.453012739569, + "scoreConfidence" : [ + 48233.96335419808, + 56756.86937967722 + ], + "scorePercentiles" : { + "0.0" : 52231.668081253934, + "50.0" : 52578.408962107584, + "90.0" : 52676.172057451404, + "95.0" : 52676.172057451404, + "99.0" : 52676.172057451404, + "99.9" : 52676.172057451404, + "99.99" : 52676.172057451404, + "99.999" : 52676.172057451404, + "99.9999" : 52676.172057451404, + "100.0" : 52676.172057451404 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 52231.668081253934, + 52578.408962107584, + 52676.172057451404 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 34705.348423536794, + "scoreError" : 1917.0884377042653, + "scoreConfidence" : [ + 32788.25998583253, + 36622.43686124106 + ], + "scorePercentiles" : { + "0.0" : 34629.52005159944, + "50.0" : 34661.22732230386, + "90.0" : 34825.29789670709, + "95.0" : 34825.29789670709, + "99.0" : 34825.29789670709, + "99.9" : 34825.29789670709, + "99.99" : 34825.29789670709, + "99.999" : 34825.29789670709, + "99.9999" : 34825.29789670709, + "100.0" : 34825.29789670709 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 34661.22732230386, + 34825.29789670709, + 34629.52005159944 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 25161.70857786907, + "scoreError" : 802.849421402648, + "scoreConfidence" : [ + 24358.859156466424, + 25964.557999271718 + ], + "scorePercentiles" : { + "0.0" : 25119.245046799493, + "50.0" : 25158.769236648477, + "90.0" : 25207.111450159253, + "95.0" : 25207.111450159253, + "99.0" : 25207.111450159253, + "99.9" : 25207.111450159253, + "99.99" : 25207.111450159253, + "99.999" : 25207.111450159253, + "99.9999" : 25207.111450159253, + "100.0" : 25207.111450159253 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 25207.111450159253, + 25158.769236648477, + 25119.245046799493 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 17562.997546496885, + "scoreError" : 802.3012690046476, + "scoreConfidence" : [ + 16760.696277492236, + 18365.298815501534 + ], + "scorePercentiles" : { + "0.0" : 17525.235674476124, + "50.0" : 17552.47621720711, + "90.0" : 17611.280747807417, + "95.0" : 17611.280747807417, + "99.0" : 17611.280747807417, + "99.9" : 17611.280747807417, + "99.99" : 17611.280747807417, + "99.999" : 17611.280747807417, + "99.9999" : 17611.280747807417, + "100.0" : 17611.280747807417 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 17552.47621720711, + 17525.235674476124, + 17611.280747807417 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 8175.384335873114, + "scoreError" : 63.129105427155494, + "scoreConfidence" : [ + 8112.255230445959, + 8238.513441300269 + ], + "scorePercentiles" : { + "0.0" : 8172.263851578316, + "50.0" : 8174.783387862301, + "90.0" : 8179.105768178724, + "95.0" : 8179.105768178724, + "99.0" : 8179.105768178724, + "99.9" : 8179.105768178724, + "99.99" : 8179.105768178724, + "99.999" : 8179.105768178724, + "99.9999" : 8179.105768178724, + "100.0" : 8179.105768178724 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 8174.783387862301, + 8172.263851578316, + 8179.105768178724 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 191616.4653578687, + "scoreError" : 21412.005517569294, + "scoreConfidence" : [ + 170204.45984029942, + 213028.47087543798 + ], + "scorePercentiles" : { + "0.0" : 190263.4984873514, + "50.0" : 192225.13792738313, + "90.0" : 192360.7596588716, + "95.0" : 192360.7596588716, + "99.0" : 192360.7596588716, + "99.9" : 192360.7596588716, + "99.99" : 192360.7596588716, + "99.999" : 192360.7596588716, + "99.9999" : 192360.7596588716, + "100.0" : 192360.7596588716 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 190263.4984873514, + 192360.7596588716, + 192225.13792738313 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 74539.55772807433, + "scoreError" : 39482.76112102407, + "scoreConfidence" : [ + 35056.79660705026, + 114022.3188490984 + ], + "scorePercentiles" : { + "0.0" : 72058.33418804496, + "50.0" : 75522.60989629854, + "90.0" : 76037.72909987949, + "95.0" : 76037.72909987949, + "99.0" : 76037.72909987949, + "99.9" : 76037.72909987949, + "99.99" : 76037.72909987949, + "99.999" : 76037.72909987949, + "99.9999" : 76037.72909987949, + "100.0" : 76037.72909987949 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 72058.33418804496, + 75522.60989629854, + 76037.72909987949 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 39848.90751888927, + "scoreError" : 11096.073108821964, + "scoreConfidence" : [ + 28752.834410067306, + 50944.98062771123 + ], + "scorePercentiles" : { + "0.0" : 39389.36479991426, + "50.0" : 39618.74554101008, + "90.0" : 40538.612215743466, + "95.0" : 40538.612215743466, + "99.0" : 40538.612215743466, + "99.9" : 40538.612215743466, + "99.99" : 40538.612215743466, + "99.999" : 40538.612215743466, + "99.9999" : 40538.612215743466, + "100.0" : 40538.612215743466 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 39389.36479991426, + 39618.74554101008, + 40538.612215743466 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 25885.315466902626, + "scoreError" : 11581.023610419312, + "scoreConfidence" : [ + 14304.291856483314, + 37466.339077321936 + ], + "scorePercentiles" : { + "0.0" : 25392.27477410987, + "50.0" : 25662.10415985608, + "90.0" : 26601.56746674193, + "95.0" : 26601.56746674193, + "99.0" : 26601.56746674193, + "99.9" : 26601.56746674193, + "99.99" : 26601.56746674193, + "99.999" : 26601.56746674193, + "99.9999" : 26601.56746674193, + "100.0" : 26601.56746674193 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 25392.27477410987, + 25662.10415985608, + 26601.56746674193 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 17935.694842555058, + "scoreError" : 6590.568539207528, + "scoreConfidence" : [ + 11345.12630334753, + 24526.263381762587 + ], + "scorePercentiles" : { + "0.0" : 17621.534130621432, + "50.0" : 17855.12043330724, + "90.0" : 18330.429963736504, + "95.0" : 18330.429963736504, + "99.0" : 18330.429963736504, + "99.9" : 18330.429963736504, + "99.99" : 18330.429963736504, + "99.999" : 18330.429963736504, + "99.9999" : 18330.429963736504, + "100.0" : 18330.429963736504 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 17621.534130621432, + 18330.429963736504, + 17855.12043330724 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 11446.003490491397, + "scoreError" : 6157.01822187185, + "scoreConfidence" : [ + 5288.985268619547, + 17603.021712363246 + ], + "scorePercentiles" : { + "0.0" : 11134.435222146056, + "50.0" : 11399.077613954873, + "90.0" : 11804.497635373264, + "95.0" : 11804.497635373264, + "99.0" : 11804.497635373264, + "99.9" : 11804.497635373264, + "99.99" : 11804.497635373264, + "99.999" : 11804.497635373264, + "99.9999" : 11804.497635373264, + "100.0" : 11804.497635373264 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 11134.435222146056, + 11399.077613954873, + 11804.497635373264 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 8082.750794187424, + "scoreError" : 2352.089704800267, + "scoreConfidence" : [ + 5730.661089387157, + 10434.84049898769 + ], + "scorePercentiles" : { + "0.0" : 7995.711379171287, + "50.0" : 8021.675990291098, + "90.0" : 8230.865013099883, + "95.0" : 8230.865013099883, + "99.0" : 8230.865013099883, + "99.9" : 8230.865013099883, + "99.99" : 8230.865013099883, + "99.999" : 8230.865013099883, + "99.9999" : 8230.865013099883, + "100.0" : 8230.865013099883 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 8021.675990291098, + 7995.711379171287, + 8230.865013099883 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 5562.683504826076, + "scoreError" : 639.2783176407941, + "scoreConfidence" : [ + 4923.405187185283, + 6201.96182246687 + ], + "scorePercentiles" : { + "0.0" : 5522.386292456708, + "50.0" : 5579.674135513223, + "90.0" : 5585.9900865083, + "95.0" : 5585.9900865083, + "99.0" : 5585.9900865083, + "99.9" : 5585.9900865083, + "99.99" : 5585.9900865083, + "99.999" : 5585.9900865083, + "99.9999" : 5585.9900865083, + "100.0" : 5585.9900865083 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 5522.386292456708, + 5579.674135513223, + 5585.9900865083 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.all_maxsize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 2736.1249243336606, + "scoreError" : 114.51465961513804, + "scoreConfidence" : [ + 2621.6102647185226, + 2850.6395839487986 + ], + "scorePercentiles" : { + "0.0" : 2732.2724969281503, + "50.0" : 2732.7342767323116, + "90.0" : 2743.36799934052, + "95.0" : 2743.36799934052, + "99.0" : 2743.36799934052, + "99.9" : 2743.36799934052, + "99.99" : 2743.36799934052, + "99.999" : 2743.36799934052, + "99.9999" : 2743.36799934052, + "100.0" : 2743.36799934052 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 2732.2724969281503, + 2732.7342767323116, + 2743.36799934052 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 757791.1036524433, + "scoreError" : 13017.10286196022, + "scoreConfidence" : [ + 744774.0007904831, + 770808.2065144035 + ], + "scorePercentiles" : { + "0.0" : 757334.736741254, + "50.0" : 757425.2371498453, + "90.0" : 758613.3370662304, + "95.0" : 758613.3370662304, + "99.0" : 758613.3370662304, + "99.9" : 758613.3370662304, + "99.99" : 758613.3370662304, + "99.999" : 758613.3370662304, + "99.9999" : 758613.3370662304, + "100.0" : 758613.3370662304 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 757425.2371498453, + 758613.3370662304, + 757334.736741254 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 262904.7268484603, + "scoreError" : 106719.12255373565, + "scoreConfidence" : [ + 156185.60429472468, + 369623.849402196 + ], + "scorePercentiles" : { + "0.0" : 256211.83388531487, + "50.0" : 265462.4275007544, + "90.0" : 267039.9191593118, + "95.0" : 267039.9191593118, + "99.0" : 267039.9191593118, + "99.9" : 267039.9191593118, + "99.99" : 267039.9191593118, + "99.999" : 267039.9191593118, + "99.9999" : 267039.9191593118, + "100.0" : 267039.9191593118 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 256211.83388531487, + 265462.4275007544, + 267039.9191593118 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 146517.59747242022, + "scoreError" : 37338.08918866563, + "scoreConfidence" : [ + 109179.50828375459, + 183855.68666108587 + ], + "scorePercentiles" : { + "0.0" : 144367.43311521286, + "50.0" : 146743.40018355558, + "90.0" : 148441.95911849232, + "95.0" : 148441.95911849232, + "99.0" : 148441.95911849232, + "99.9" : 148441.95911849232, + "99.99" : 148441.95911849232, + "99.999" : 148441.95911849232, + "99.9999" : 148441.95911849232, + "100.0" : 148441.95911849232 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 144367.43311521286, + 148441.95911849232, + 146743.40018355558 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 92471.52955425747, + "scoreError" : 47206.601725123066, + "scoreConfidence" : [ + 45264.92782913441, + 139678.13127938053 + ], + "scorePercentiles" : { + "0.0" : 89904.11036463208, + "50.0" : 92431.72101924263, + "90.0" : 95078.75727889774, + "95.0" : 95078.75727889774, + "99.0" : 95078.75727889774, + "99.9" : 95078.75727889774, + "99.99" : 95078.75727889774, + "99.999" : 95078.75727889774, + "99.9999" : 95078.75727889774, + "100.0" : 95078.75727889774 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 89904.11036463208, + 92431.72101924263, + 95078.75727889774 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 66495.96524305163, + "scoreError" : 23295.393564800146, + "scoreConfidence" : [ + 43200.57167825148, + 89791.35880785178 + ], + "scorePercentiles" : { + "0.0" : 65280.29659859988, + "50.0" : 66381.24597318728, + "90.0" : 67826.35315736773, + "95.0" : 67826.35315736773, + "99.0" : 67826.35315736773, + "99.9" : 67826.35315736773, + "99.99" : 67826.35315736773, + "99.999" : 67826.35315736773, + "99.9999" : 67826.35315736773, + "100.0" : 67826.35315736773 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 66381.24597318728, + 65280.29659859988, + 67826.35315736773 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 40560.0402014162, + "scoreError" : 4796.733555852553, + "scoreConfidence" : [ + 35763.30664556365, + 45356.773757268755 + ], + "scorePercentiles" : { + "0.0" : 40277.54058076198, + "50.0" : 40604.98264531943, + "90.0" : 40797.59737816719, + "95.0" : 40797.59737816719, + "99.0" : 40797.59737816719, + "99.9" : 40797.59737816719, + "99.99" : 40797.59737816719, + "99.999" : 40797.59737816719, + "99.9999" : 40797.59737816719, + "100.0" : 40797.59737816719 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 40277.54058076198, + 40797.59737816719, + 40604.98264531943 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 29186.38704167282, + "scoreError" : 3599.9172194573844, + "scoreConfidence" : [ + 25586.469822215437, + 32786.30426113021 + ], + "scorePercentiles" : { + "0.0" : 29015.66813484148, + "50.0" : 29141.064062182442, + "90.0" : 29402.42892799455, + "95.0" : 29402.42892799455, + "99.0" : 29402.42892799455, + "99.9" : 29402.42892799455, + "99.99" : 29402.42892799455, + "99.999" : 29402.42892799455, + "99.9999" : 29402.42892799455, + "100.0" : 29402.42892799455 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 29141.064062182442, + 29015.66813484148, + 29402.42892799455 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 20323.363159489538, + "scoreError" : 4797.973350607197, + "scoreConfidence" : [ + 15525.38980888234, + 25121.336510096735 + ], + "scorePercentiles" : { + "0.0" : 20106.447587011065, + "50.0" : 20247.766330478193, + "90.0" : 20615.875560979355, + "95.0" : 20615.875560979355, + "99.0" : 20615.875560979355, + "99.9" : 20615.875560979355, + "99.99" : 20615.875560979355, + "99.999" : 20615.875560979355, + "99.9999" : 20615.875560979355, + "100.0" : 20615.875560979355 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 20106.447587011065, + 20247.766330478193, + 20615.875560979355 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 10195.82545940484, + "scoreError" : 3710.58174027932, + "scoreConfidence" : [ + 6485.243719125519, + 13906.40719968416 + ], + "scorePercentiles" : { + "0.0" : 10055.780887404115, + "50.0" : 10102.575183309022, + "90.0" : 10429.120307501378, + "95.0" : 10429.120307501378, + "99.0" : 10429.120307501378, + "99.9" : 10429.120307501378, + "99.99" : 10429.120307501378, + "99.999" : 10429.120307501378, + "99.9999" : 10429.120307501378, + "100.0" : 10429.120307501378 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 10102.575183309022, + 10055.780887404115, + 10429.120307501378 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 502444.16400655237, + "scoreError" : 96580.3489938057, + "scoreConfidence" : [ + 405863.81501274667, + 599024.5130003581 + ], + "scorePercentiles" : { + "0.0" : 496334.52430795005, + "50.0" : 505327.0842513753, + "90.0" : 505670.88346033165, + "95.0" : 505670.88346033165, + "99.0" : 505670.88346033165, + "99.9" : 505670.88346033165, + "99.99" : 505670.88346033165, + "99.999" : 505670.88346033165, + "99.9999" : 505670.88346033165, + "100.0" : 505670.88346033165 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 496334.52430795005, + 505670.88346033165, + 505327.0842513753 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 185577.42859273255, + "scoreError" : 25807.687105465004, + "scoreConfidence" : [ + 159769.74148726754, + 211385.11569819757 + ], + "scorePercentiles" : { + "0.0" : 183944.94790202106, + "50.0" : 186345.0232448094, + "90.0" : 186442.31463136722, + "95.0" : 186442.31463136722, + "99.0" : 186442.31463136722, + "99.9" : 186442.31463136722, + "99.99" : 186442.31463136722, + "99.999" : 186442.31463136722, + "99.9999" : 186442.31463136722, + "100.0" : 186442.31463136722 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 183944.94790202106, + 186442.31463136722, + 186345.0232448094 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 104377.78854181372, + "scoreError" : 14623.5964665086, + "scoreConfidence" : [ + 89754.19207530512, + 119001.38500832231 + ], + "scorePercentiles" : { + "0.0" : 103452.58517251637, + "50.0" : 104817.77667497305, + "90.0" : 104863.0037779517, + "95.0" : 104863.0037779517, + "99.0" : 104863.0037779517, + "99.9" : 104863.0037779517, + "99.99" : 104863.0037779517, + "99.999" : 104863.0037779517, + "99.9999" : 104863.0037779517, + "100.0" : 104863.0037779517 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 103452.58517251637, + 104817.77667497305, + 104863.0037779517 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 61917.08497477614, + "scoreError" : 11261.88365383625, + "scoreConfidence" : [ + 50655.20132093989, + 73178.96862861239 + ], + "scorePercentiles" : { + "0.0" : 61204.59936271447, + "50.0" : 62255.03142080288, + "90.0" : 62291.624140811065, + "95.0" : 62291.624140811065, + "99.0" : 62291.624140811065, + "99.9" : 62291.624140811065, + "99.99" : 62291.624140811065, + "99.999" : 62291.624140811065, + "99.9999" : 62291.624140811065, + "100.0" : 62291.624140811065 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 61204.59936271447, + 62291.624140811065, + 62255.03142080288 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 47963.63681987446, + "scoreError" : 4653.024873849212, + "scoreConfidence" : [ + 43310.61194602525, + 52616.66169372367 + ], + "scorePercentiles" : { + "0.0" : 47672.50914951675, + "50.0" : 48070.691058293436, + "90.0" : 48147.71025181319, + "95.0" : 48147.71025181319, + "99.0" : 48147.71025181319, + "99.9" : 48147.71025181319, + "99.99" : 48147.71025181319, + "99.999" : 48147.71025181319, + "99.9999" : 48147.71025181319, + "100.0" : 48147.71025181319 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 47672.50914951675, + 48147.71025181319, + 48070.691058293436 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 27321.4410079938, + "scoreError" : 4728.714629853746, + "scoreConfidence" : [ + 22592.726378140054, + 32050.155637847543 + ], + "scorePercentiles" : { + "0.0" : 27047.45827057676, + "50.0" : 27354.110382274193, + "90.0" : 27562.754371130442, + "95.0" : 27562.754371130442, + "99.0" : 27562.754371130442, + "99.9" : 27562.754371130442, + "99.99" : 27562.754371130442, + "99.999" : 27562.754371130442, + "99.9999" : 27562.754371130442, + "100.0" : 27562.754371130442 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 27047.45827057676, + 27354.110382274193, + 27562.754371130442 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 19678.296486031308, + "scoreError" : 7635.906496154026, + "scoreConfidence" : [ + 12042.389989877282, + 27314.202982185336 + ], + "scorePercentiles" : { + "0.0" : 19195.842379907717, + "50.0" : 19894.775554252046, + "90.0" : 19944.271523934167, + "95.0" : 19944.271523934167, + "99.0" : 19944.271523934167, + "99.9" : 19944.271523934167, + "99.99" : 19944.271523934167, + "99.999" : 19944.271523934167, + "99.9999" : 19944.271523934167, + "100.0" : 19944.271523934167 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 19195.842379907717, + 19894.775554252046, + 19944.271523934167 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 14297.627941686083, + "scoreError" : 3575.7263639652797, + "scoreConfidence" : [ + 10721.901577720804, + 17873.354305651363 + ], + "scorePercentiles" : { + "0.0" : 14081.98213645174, + "50.0" : 14345.971981670811, + "90.0" : 14464.929706935694, + "95.0" : 14464.929706935694, + "99.0" : 14464.929706935694, + "99.9" : 14464.929706935694, + "99.99" : 14464.929706935694, + "99.999" : 14464.929706935694, + "99.9999" : 14464.929706935694, + "100.0" : 14464.929706935694 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 14081.98213645174, + 14345.971981670811, + 14464.929706935694 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_any_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 6598.01262154345, + "scoreError" : 2108.3476290374747, + "scoreConfidence" : [ + 4489.6649925059755, + 8706.360250580925 + ], + "scorePercentiles" : { + "0.0" : 6464.624625252479, + "50.0" : 6661.3673388334555, + "90.0" : 6668.045900544415, + "95.0" : 6668.045900544415, + "99.0" : 6668.045900544415, + "99.9" : 6668.045900544415, + "99.99" : 6668.045900544415, + "99.999" : 6668.045900544415, + "99.9999" : 6668.045900544415, + "100.0" : 6668.045900544415 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 6464.624625252479, + 6661.3673388334555, + 6668.045900544415 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 739978.3033417693, + "scoreError" : 63989.863433960694, + "scoreConfidence" : [ + 675988.4399078086, + 803968.16677573 + ], + "scorePercentiles" : { + "0.0" : 736061.8116304004, + "50.0" : 741043.0291172449, + "90.0" : 742830.0692776629, + "95.0" : 742830.0692776629, + "99.0" : 742830.0692776629, + "99.9" : 742830.0692776629, + "99.99" : 742830.0692776629, + "99.999" : 742830.0692776629, + "99.9999" : 742830.0692776629, + "100.0" : 742830.0692776629 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 741043.0291172449, + 736061.8116304004, + 742830.0692776629 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 244569.74481068933, + "scoreError" : 11706.16420915159, + "scoreConfidence" : [ + 232863.58060153775, + 256275.9090198409 + ], + "scorePercentiles" : { + "0.0" : 243830.1926818856, + "50.0" : 244900.56826852687, + "90.0" : 244978.47348165544, + "95.0" : 244978.47348165544, + "99.0" : 244978.47348165544, + "99.9" : 244978.47348165544, + "99.99" : 244978.47348165544, + "99.999" : 244978.47348165544, + "99.9999" : 244978.47348165544, + "100.0" : 244978.47348165544 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 243830.1926818856, + 244900.56826852687, + 244978.47348165544 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 132079.2464112975, + "scoreError" : 33964.710430484476, + "scoreConfidence" : [ + 98114.53598081303, + 166043.95684178197 + ], + "scorePercentiles" : { + "0.0" : 130900.83301025486, + "50.0" : 131111.36955807812, + "90.0" : 134225.53666555948, + "95.0" : 134225.53666555948, + "99.0" : 134225.53666555948, + "99.9" : 134225.53666555948, + "99.99" : 134225.53666555948, + "99.999" : 134225.53666555948, + "99.9999" : 134225.53666555948, + "100.0" : 134225.53666555948 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 130900.83301025486, + 131111.36955807812, + 134225.53666555948 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 93591.68101170631, + "scoreError" : 6951.134175359031, + "scoreConfidence" : [ + 86640.54683634729, + 100542.81518706534 + ], + "scorePercentiles" : { + "0.0" : 93157.06010064708, + "50.0" : 93749.82205626267, + "90.0" : 93868.16087820924, + "95.0" : 93868.16087820924, + "99.0" : 93868.16087820924, + "99.9" : 93868.16087820924, + "99.99" : 93868.16087820924, + "99.999" : 93868.16087820924, + "99.9999" : 93868.16087820924, + "100.0" : 93868.16087820924 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 93157.06010064708, + 93749.82205626267, + 93868.16087820924 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 66488.08013136098, + "scoreError" : 21927.88123969313, + "scoreConfidence" : [ + 44560.19889166785, + 88415.96137105412 + ], + "scorePercentiles" : { + "0.0" : 65180.40251163217, + "50.0" : 66739.24414486441, + "90.0" : 67544.59373758639, + "95.0" : 67544.59373758639, + "99.0" : 67544.59373758639, + "99.9" : 67544.59373758639, + "99.99" : 67544.59373758639, + "99.999" : 67544.59373758639, + "99.9999" : 67544.59373758639, + "100.0" : 67544.59373758639 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 65180.40251163217, + 66739.24414486441, + 67544.59373758639 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 42527.14600498805, + "scoreError" : 4347.971868391326, + "scoreConfidence" : [ + 38179.174136596725, + 46875.11787337937 + ], + "scorePercentiles" : { + "0.0" : 42255.37813321627, + "50.0" : 42625.527521649135, + "90.0" : 42700.53236009874, + "95.0" : 42700.53236009874, + "99.0" : 42700.53236009874, + "99.9" : 42700.53236009874, + "99.99" : 42700.53236009874, + "99.999" : 42700.53236009874, + "99.9999" : 42700.53236009874, + "100.0" : 42700.53236009874 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 42255.37813321627, + 42625.527521649135, + 42700.53236009874 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 28787.80375962298, + "scoreError" : 3073.159761489152, + "scoreConfidence" : [ + 25714.64399813383, + 31860.96352111213 + ], + "scorePercentiles" : { + "0.0" : 28603.14815705343, + "50.0" : 28827.195559693206, + "90.0" : 28933.067562122294, + "95.0" : 28933.067562122294, + "99.0" : 28933.067562122294, + "99.9" : 28933.067562122294, + "99.99" : 28933.067562122294, + "99.999" : 28933.067562122294, + "99.9999" : 28933.067562122294, + "100.0" : 28933.067562122294 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 28603.14815705343, + 28933.067562122294, + 28827.195559693206 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 17183.693329576377, + "scoreError" : 1178.2951061009267, + "scoreConfidence" : [ + 16005.398223475451, + 18361.988435677304 + ], + "scorePercentiles" : { + "0.0" : 17115.40607463236, + "50.0" : 17191.874826393334, + "90.0" : 17243.799087703443, + "95.0" : 17243.799087703443, + "99.0" : 17243.799087703443, + "99.9" : 17243.799087703443, + "99.99" : 17243.799087703443, + "99.999" : 17243.799087703443, + "99.9999" : 17243.799087703443, + "100.0" : 17243.799087703443 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 17115.40607463236, + 17243.799087703443, + 17191.874826393334 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 10564.379989906696, + "scoreError" : 983.7782320892599, + "scoreConfidence" : [ + 9580.601757817436, + 11548.158221995956 + ], + "scorePercentiles" : { + "0.0" : 10510.622740549192, + "50.0" : 10564.047616103877, + "90.0" : 10618.469613067016, + "95.0" : 10618.469613067016, + "99.0" : 10618.469613067016, + "99.9" : 10618.469613067016, + "99.99" : 10618.469613067016, + "99.999" : 10618.469613067016, + "99.9999" : 10618.469613067016, + "100.0" : 10618.469613067016 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 10510.622740549192, + 10564.047616103877, + 10618.469613067016 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 442367.0043420638, + "scoreError" : 65452.089202235766, + "scoreConfidence" : [ + 376914.91513982805, + 507819.09354429954 + ], + "scorePercentiles" : { + "0.0" : 438499.2353670583, + "50.0" : 443015.78029806475, + "90.0" : 445585.9973610684, + "95.0" : 445585.9973610684, + "99.0" : 445585.9973610684, + "99.9" : 445585.9973610684, + "99.99" : 445585.9973610684, + "99.999" : 445585.9973610684, + "99.9999" : 445585.9973610684, + "100.0" : 445585.9973610684 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 445585.9973610684, + 438499.2353670583, + 443015.78029806475 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 179526.81326178295, + "scoreError" : 14166.248821445537, + "scoreConfidence" : [ + 165360.56444033742, + 193693.0620832285 + ], + "scorePercentiles" : { + "0.0" : 178769.67545926283, + "50.0" : 179489.4388311604, + "90.0" : 180321.32549492564, + "95.0" : 180321.32549492564, + "99.0" : 180321.32549492564, + "99.9" : 180321.32549492564, + "99.99" : 180321.32549492564, + "99.999" : 180321.32549492564, + "99.9999" : 180321.32549492564, + "100.0" : 180321.32549492564 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 179489.4388311604, + 180321.32549492564, + 178769.67545926283 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 101794.75146379175, + "scoreError" : 14229.907444781617, + "scoreConfidence" : [ + 87564.84401901014, + 116024.65890857336 + ], + "scorePercentiles" : { + "0.0" : 101011.08624743254, + "50.0" : 101802.15613097174, + "90.0" : 102571.01201297098, + "95.0" : 102571.01201297098, + "99.0" : 102571.01201297098, + "99.9" : 102571.01201297098, + "99.99" : 102571.01201297098, + "99.999" : 102571.01201297098, + "99.9999" : 102571.01201297098, + "100.0" : 102571.01201297098 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 101011.08624743254, + 102571.01201297098, + 101802.15613097174 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 66020.09242158721, + "scoreError" : 4398.705999734752, + "scoreConfidence" : [ + 61621.386421852454, + 70418.79842132196 + ], + "scorePercentiles" : { + "0.0" : 65753.9527024985, + "50.0" : 66082.3790496361, + "90.0" : 66223.94551262703, + "95.0" : 66223.94551262703, + "99.0" : 66223.94551262703, + "99.9" : 66223.94551262703, + "99.99" : 66223.94551262703, + "99.999" : 66223.94551262703, + "99.9999" : 66223.94551262703, + "100.0" : 66223.94551262703 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 66082.3790496361, + 65753.9527024985, + 66223.94551262703 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 48652.18476182045, + "scoreError" : 4072.109822207142, + "scoreConfidence" : [ + 44580.0749396133, + 52724.29458402759 + ], + "scorePercentiles" : { + "0.0" : 48395.24024048278, + "50.0" : 48763.17592132066, + "90.0" : 48798.138123657896, + "95.0" : 48798.138123657896, + "99.0" : 48798.138123657896, + "99.9" : 48798.138123657896, + "99.99" : 48798.138123657896, + "99.999" : 48798.138123657896, + "99.9999" : 48798.138123657896, + "100.0" : 48798.138123657896 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 48395.24024048278, + 48763.17592132066, + 48798.138123657896 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 28544.558390451566, + "scoreError" : 1872.094307122226, + "scoreConfidence" : [ + 26672.46408332934, + 30416.65269757379 + ], + "scorePercentiles" : { + "0.0" : 28437.297321702226, + "50.0" : 28554.585014405202, + "90.0" : 28641.792835247274, + "95.0" : 28641.792835247274, + "99.0" : 28641.792835247274, + "99.9" : 28641.792835247274, + "99.99" : 28641.792835247274, + "99.999" : 28641.792835247274, + "99.9999" : 28641.792835247274, + "100.0" : 28641.792835247274 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 28641.792835247274, + 28554.585014405202, + 28437.297321702226 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 21716.36718158875, + "scoreError" : 1982.8284853745395, + "scoreConfidence" : [ + 19733.53869621421, + 23699.19566696329 + ], + "scorePercentiles" : { + "0.0" : 21597.02619747774, + "50.0" : 21742.409718018243, + "90.0" : 21809.66562927027, + "95.0" : 21809.66562927027, + "99.0" : 21809.66562927027, + "99.9" : 21809.66562927027, + "99.99" : 21809.66562927027, + "99.999" : 21809.66562927027, + "99.9999" : 21809.66562927027, + "100.0" : 21809.66562927027 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 21742.409718018243, + 21809.66562927027, + 21597.02619747774 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 15242.211850366475, + "scoreError" : 603.3857078648385, + "scoreConfidence" : [ + 14638.826142501637, + 15845.597558231313 + ], + "scorePercentiles" : { + "0.0" : 15220.227361000174, + "50.0" : 15226.160146938644, + "90.0" : 15280.24804316061, + "95.0" : 15280.24804316061, + "99.0" : 15280.24804316061, + "99.9" : 15280.24804316061, + "99.99" : 15280.24804316061, + "99.999" : 15280.24804316061, + "99.9999" : 15280.24804316061, + "100.0" : 15280.24804316061 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 15220.227361000174, + 15226.160146938644, + 15280.24804316061 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.anon_full_jsonMask", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 7362.902366029962, + "scoreError" : 206.63355362468954, + "scoreConfidence" : [ + 7156.268812405272, + 7569.5359196546515 + ], + "scorePercentiles" : { + "0.0" : 7351.83654245981, + "50.0" : 7362.3982808044175, + "90.0" : 7374.472274825658, + "95.0" : 7374.472274825658, + "99.0" : 7374.472274825658, + "99.9" : 7374.472274825658, + "99.99" : 7374.472274825658, + "99.999" : 7374.472274825658, + "99.9999" : 7374.472274825658, + "100.0" : 7374.472274825658 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 7362.3982808044175, + 7374.472274825658, + 7351.83654245981 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1107113.814594768, + "scoreError" : 101947.90587865293, + "scoreConfidence" : [ + 1005165.908716115, + 1209061.7204734208 + ], + "scorePercentiles" : { + "0.0" : 1103337.6119743674, + "50.0" : 1104470.6710986823, + "90.0" : 1113533.160711254, + "95.0" : 1113533.160711254, + "99.0" : 1113533.160711254, + "99.9" : 1113533.160711254, + "99.99" : 1113533.160711254, + "99.999" : 1113533.160711254, + "99.9999" : 1113533.160711254, + "100.0" : 1113533.160711254 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1103337.6119743674, + 1113533.160711254, + 1104470.6710986823 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 287822.0955187106, + "scoreError" : 27784.72868210226, + "scoreConfidence" : [ + 260037.36683660836, + 315606.8242008129 + ], + "scorePercentiles" : { + "0.0" : 286824.04803969845, + "50.0" : 287067.1742977215, + "90.0" : 289575.06421871204, + "95.0" : 289575.06421871204, + "99.0" : 289575.06421871204, + "99.9" : 289575.06421871204, + "99.99" : 289575.06421871204, + "99.999" : 289575.06421871204, + "99.9999" : 289575.06421871204, + "100.0" : 289575.06421871204 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 287067.1742977215, + 286824.04803969845, + 289575.06421871204 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 154137.57373430426, + "scoreError" : 27890.319538033396, + "scoreConfidence" : [ + 126247.25419627086, + 182027.89327233765 + ], + "scorePercentiles" : { + "0.0" : 152661.21566264398, + "50.0" : 154037.665666844, + "90.0" : 155713.83987342476, + "95.0" : 155713.83987342476, + "99.0" : 155713.83987342476, + "99.9" : 155713.83987342476, + "99.99" : 155713.83987342476, + "99.999" : 155713.83987342476, + "99.9999" : 155713.83987342476, + "100.0" : 155713.83987342476 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 155713.83987342476, + 152661.21566264398, + 154037.665666844 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 101449.92198270063, + "scoreError" : 11704.968316105842, + "scoreConfidence" : [ + 89744.95366659478, + 113154.89029880648 + ], + "scorePercentiles" : { + "0.0" : 100742.37016881164, + "50.0" : 101613.52947959461, + "90.0" : 101993.86629969566, + "95.0" : 101993.86629969566, + "99.0" : 101993.86629969566, + "99.9" : 101993.86629969566, + "99.99" : 101993.86629969566, + "99.999" : 101993.86629969566, + "99.9999" : 101993.86629969566, + "100.0" : 101993.86629969566 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 100742.37016881164, + 101993.86629969566, + 101613.52947959461 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 69603.09872099444, + "scoreError" : 3682.019764803987, + "scoreConfidence" : [ + 65921.07895619045, + 73285.11848579843 + ], + "scorePercentiles" : { + "0.0" : 69409.46803157656, + "50.0" : 69587.60527312565, + "90.0" : 69812.22285828114, + "95.0" : 69812.22285828114, + "99.0" : 69812.22285828114, + "99.9" : 69812.22285828114, + "99.99" : 69812.22285828114, + "99.999" : 69812.22285828114, + "99.9999" : 69812.22285828114, + "100.0" : 69812.22285828114 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 69587.60527312565, + 69409.46803157656, + 69812.22285828114 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 37069.144680935606, + "scoreError" : 19754.131028792897, + "scoreConfidence" : [ + 17315.01365214271, + 56823.27570972851 + ], + "scorePercentiles" : { + "0.0" : 36404.72841330211, + "50.0" : 36484.10219170128, + "90.0" : 38318.60343780344, + "95.0" : 38318.60343780344, + "99.0" : 38318.60343780344, + "99.9" : 38318.60343780344, + "99.99" : 38318.60343780344, + "99.999" : 38318.60343780344, + "99.9999" : 38318.60343780344, + "100.0" : 38318.60343780344 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 38318.60343780344, + 36404.72841330211, + 36484.10219170128 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 29652.590575416078, + "scoreError" : 77341.02174912463, + "scoreConfidence" : [ + -47688.43117370855, + 106993.6123245407 + ], + "scorePercentiles" : { + "0.0" : 27077.984460260584, + "50.0" : 27334.285953896015, + "90.0" : 34545.501312091634, + "95.0" : 34545.501312091634, + "99.0" : 34545.501312091634, + "99.9" : 34545.501312091634, + "99.99" : 34545.501312091634, + "99.999" : 34545.501312091634, + "99.9999" : 34545.501312091634, + "100.0" : 34545.501312091634 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 34545.501312091634, + 27077.984460260584, + 27334.285953896015 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 18290.4779066214, + "scoreError" : 9492.37473398264, + "scoreConfidence" : [ + 8798.10317263876, + 27782.85264060404 + ], + "scorePercentiles" : { + "0.0" : 17943.856523438797, + "50.0" : 18038.80417329744, + "90.0" : 18888.773023127957, + "95.0" : 18888.773023127957, + "99.0" : 18888.773023127957, + "99.9" : 18888.773023127957, + "99.99" : 18888.773023127957, + "99.999" : 18888.773023127957, + "99.9999" : 18888.773023127957, + "100.0" : 18888.773023127957 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 17943.856523438797, + 18038.80417329744, + 18888.773023127957 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 13893.901676673448, + "scoreError" : 910.6129058683181, + "scoreConfidence" : [ + 12983.28877080513, + 14804.514582541766 + ], + "scorePercentiles" : { + "0.0" : 13839.940298564947, + "50.0" : 13903.346365602622, + "90.0" : 13938.41836585277, + "95.0" : 13938.41836585277, + "99.0" : 13938.41836585277, + "99.9" : 13938.41836585277, + "99.99" : 13938.41836585277, + "99.999" : 13938.41836585277, + "99.9999" : 13938.41836585277, + "100.0" : 13938.41836585277 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 13938.41836585277, + 13903.346365602622, + 13839.940298564947 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 182596.9464807112, + "scoreError" : 229170.78548850073, + "scoreConfidence" : [ + -46573.83900778953, + 411767.73196921195 + ], + "scorePercentiles" : { + "0.0" : 169475.87021116278, + "50.0" : 183802.82150369507, + "90.0" : 194512.14772727573, + "95.0" : 194512.14772727573, + "99.0" : 194512.14772727573, + "99.9" : 194512.14772727573, + "99.99" : 194512.14772727573, + "99.999" : 194512.14772727573, + "99.9999" : 194512.14772727573, + "100.0" : 194512.14772727573 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 169475.87021116278, + 194512.14772727573, + 183802.82150369507 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 51732.10166955424, + "scoreError" : 4551.841539288026, + "scoreConfidence" : [ + 47180.260130266215, + 56283.94320884227 + ], + "scorePercentiles" : { + "0.0" : 51580.36965296333, + "50.0" : 51595.872907287696, + "90.0" : 52020.06244841169, + "95.0" : 52020.06244841169, + "99.0" : 52020.06244841169, + "99.9" : 52020.06244841169, + "99.99" : 52020.06244841169, + "99.999" : 52020.06244841169, + "99.9999" : 52020.06244841169, + "100.0" : 52020.06244841169 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 51580.36965296333, + 51595.872907287696, + 52020.06244841169 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 32205.406487385964, + "scoreError" : 3566.977973201734, + "scoreConfidence" : [ + 28638.42851418423, + 35772.384460587695 + ], + "scorePercentiles" : { + "0.0" : 32004.054412155852, + "50.0" : 32217.64987626076, + "90.0" : 32394.515173741285, + "95.0" : 32394.515173741285, + "99.0" : 32394.515173741285, + "99.9" : 32394.515173741285, + "99.99" : 32394.515173741285, + "99.999" : 32394.515173741285, + "99.9999" : 32394.515173741285, + "100.0" : 32394.515173741285 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 32004.054412155852, + 32217.64987626076, + 32394.515173741285 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 19987.69081160566, + "scoreError" : 680.4194064017171, + "scoreConfidence" : [ + 19307.27140520394, + 20668.110218007376 + ], + "scorePercentiles" : { + "0.0" : 19955.226941843255, + "50.0" : 19979.416201958513, + "90.0" : 20028.42929101521, + "95.0" : 20028.42929101521, + "99.0" : 20028.42929101521, + "99.9" : 20028.42929101521, + "99.99" : 20028.42929101521, + "99.999" : 20028.42929101521, + "99.9999" : 20028.42929101521, + "100.0" : 20028.42929101521 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 19979.416201958513, + 19955.226941843255, + 20028.42929101521 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 15008.151430510385, + "scoreError" : 1694.0320172411898, + "scoreConfidence" : [ + 13314.119413269194, + 16702.183447751573 + ], + "scorePercentiles" : { + "0.0" : 14915.921257549862, + "50.0" : 15006.912943596195, + "90.0" : 15101.620090385097, + "95.0" : 15101.620090385097, + "99.0" : 15101.620090385097, + "99.9" : 15101.620090385097, + "99.99" : 15101.620090385097, + "99.999" : 15101.620090385097, + "99.9999" : 15101.620090385097, + "100.0" : 15101.620090385097 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 15101.620090385097, + 14915.921257549862, + 15006.912943596195 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 9167.518281233713, + "scoreError" : 2165.9332836104554, + "scoreConfidence" : [ + 7001.5849976232585, + 11333.451564844168 + ], + "scorePercentiles" : { + "0.0" : 9063.529687023582, + "50.0" : 9142.151612360558, + "90.0" : 9296.873544317003, + "95.0" : 9296.873544317003, + "99.0" : 9296.873544317003, + "99.9" : 9296.873544317003, + "99.99" : 9296.873544317003, + "99.999" : 9296.873544317003, + "99.9999" : 9296.873544317003, + "100.0" : 9296.873544317003 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 9296.873544317003, + 9063.529687023582, + 9142.151612360558 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 6924.054256029259, + "scoreError" : 1197.2036125965346, + "scoreConfidence" : [ + 5726.850643432725, + 8121.257868625793 + ], + "scorePercentiles" : { + "0.0" : 6868.486515259389, + "50.0" : 6907.222909793756, + "90.0" : 6996.453343034629, + "95.0" : 6996.453343034629, + "99.0" : 6996.453343034629, + "99.9" : 6996.453343034629, + "99.99" : 6996.453343034629, + "99.999" : 6996.453343034629, + "99.9999" : 6996.453343034629, + "100.0" : 6996.453343034629 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 6996.453343034629, + 6907.222909793756, + 6868.486515259389 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 4736.601692575902, + "scoreError" : 520.5075546683443, + "scoreConfidence" : [ + 4216.0941379075575, + 5257.109247244247 + ], + "scorePercentiles" : { + "0.0" : 4716.460726444396, + "50.0" : 4724.094282471881, + "90.0" : 4769.25006881143, + "95.0" : 4769.25006881143, + "99.0" : 4769.25006881143, + "99.9" : 4769.25006881143, + "99.99" : 4769.25006881143, + "99.999" : 4769.25006881143, + "99.9999" : 4769.25006881143, + "100.0" : 4769.25006881143 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 4769.25006881143, + 4724.094282471881, + 4716.460726444396 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSizeJackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 2207.5804023019778, + "scoreError" : 149.41592006560322, + "scoreConfidence" : [ + 2058.1644822363746, + 2356.996322367581 + ], + "scorePercentiles" : { + "0.0" : 2198.232858498808, + "50.0" : 2211.0117904912518, + "90.0" : 2213.4965579158743, + "95.0" : 2213.4965579158743, + "99.0" : 2213.4965579158743, + "99.9" : 2213.4965579158743, + "99.99" : 2213.4965579158743, + "99.999" : 2213.4965579158743, + "99.9999" : 2213.4965579158743, + "100.0" : 2213.4965579158743 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 2213.4965579158743, + 2211.0117904912518, + 2198.232858498808 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1095952.700429394, + "scoreError" : 86856.29761594908, + "scoreConfidence" : [ + 1009096.4028134448, + 1182808.998045343 + ], + "scorePercentiles" : { + "0.0" : 1090465.386938187, + "50.0" : 1098408.1112933774, + "90.0" : 1098984.6030566173, + "95.0" : 1098984.6030566173, + "99.0" : 1098984.6030566173, + "99.9" : 1098984.6030566173, + "99.99" : 1098984.6030566173, + "99.999" : 1098984.6030566173, + "99.9999" : 1098984.6030566173, + "100.0" : 1098984.6030566173 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1098408.1112933774, + 1090465.386938187, + 1098984.6030566173 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 345942.75979210786, + "scoreError" : 8234.05265499864, + "scoreConfidence" : [ + 337708.7071371092, + 354176.8124471065 + ], + "scorePercentiles" : { + "0.0" : 345442.40757543803, + "50.0" : 346066.6817146034, + "90.0" : 346319.19008628215, + "95.0" : 346319.19008628215, + "99.0" : 346319.19008628215, + "99.9" : 346319.19008628215, + "99.99" : 346319.19008628215, + "99.999" : 346319.19008628215, + "99.9999" : 346319.19008628215, + "100.0" : 346319.19008628215 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 346066.6817146034, + 345442.40757543803, + 346319.19008628215 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 199319.78977740672, + "scoreError" : 2692.4429385967196, + "scoreConfidence" : [ + 196627.34683881002, + 202012.23271600343 + ], + "scorePercentiles" : { + "0.0" : 199166.1092285336, + "50.0" : 199332.85600714898, + "90.0" : 199460.40409653756, + "95.0" : 199460.40409653756, + "99.0" : 199460.40409653756, + "99.9" : 199460.40409653756, + "99.99" : 199460.40409653756, + "99.999" : 199460.40409653756, + "99.9999" : 199460.40409653756, + "100.0" : 199460.40409653756 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 199166.1092285336, + 199332.85600714898, + 199460.40409653756 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 115163.20545324961, + "scoreError" : 16216.297039286977, + "scoreConfidence" : [ + 98946.90841396264, + 131379.5024925366 + ], + "scorePercentiles" : { + "0.0" : 114390.86632707353, + "50.0" : 114963.96147727301, + "90.0" : 116134.78855540227, + "95.0" : 116134.78855540227, + "99.0" : 116134.78855540227, + "99.9" : 116134.78855540227, + "99.99" : 116134.78855540227, + "99.999" : 116134.78855540227, + "99.9999" : 116134.78855540227, + "100.0" : 116134.78855540227 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 116134.78855540227, + 114390.86632707353, + 114963.96147727301 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 85750.275488099, + "scoreError" : 3896.1897789887375, + "scoreConfidence" : [ + 81854.08570911025, + 89646.46526708774 + ], + "scorePercentiles" : { + "0.0" : 85516.13910826869, + "50.0" : 85800.30336451557, + "90.0" : 85934.38399151272, + "95.0" : 85934.38399151272, + "99.0" : 85934.38399151272, + "99.9" : 85934.38399151272, + "99.99" : 85934.38399151272, + "99.999" : 85934.38399151272, + "99.9999" : 85934.38399151272, + "100.0" : 85934.38399151272 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 85800.30336451557, + 85934.38399151272, + 85516.13910826869 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 51131.51476294568, + "scoreError" : 1473.3784837042124, + "scoreConfidence" : [ + 49658.136279241466, + 52604.89324664989 + ], + "scorePercentiles" : { + "0.0" : 51084.34935578036, + "50.0" : 51085.42765539042, + "90.0" : 51224.76727766626, + "95.0" : 51224.76727766626, + "99.0" : 51224.76727766626, + "99.9" : 51224.76727766626, + "99.99" : 51224.76727766626, + "99.999" : 51224.76727766626, + "99.9999" : 51224.76727766626, + "100.0" : 51224.76727766626 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 51085.42765539042, + 51084.34935578036, + 51224.76727766626 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 35106.50225967222, + "scoreError" : 5384.753900032314, + "scoreConfidence" : [ + 29721.748359639903, + 40491.256159704535 + ], + "scorePercentiles" : { + "0.0" : 34788.522925830584, + "50.0" : 35159.26464475985, + "90.0" : 35371.719208426235, + "95.0" : 35371.719208426235, + "99.0" : 35371.719208426235, + "99.9" : 35371.719208426235, + "99.99" : 35371.719208426235, + "99.999" : 35371.719208426235, + "99.9999" : 35371.719208426235, + "100.0" : 35371.719208426235 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 34788.522925830584, + 35371.719208426235, + 35159.26464475985 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 24269.923543392575, + "scoreError" : 3914.314034729892, + "scoreConfidence" : [ + 20355.609508662685, + 28184.237578122465 + ], + "scorePercentiles" : { + "0.0" : 24128.86725264912, + "50.0" : 24164.065902461858, + "90.0" : 24516.837475066743, + "95.0" : 24516.837475066743, + "99.0" : 24516.837475066743, + "99.9" : 24516.837475066743, + "99.99" : 24516.837475066743, + "99.999" : 24516.837475066743, + "99.9999" : 24516.837475066743, + "100.0" : 24516.837475066743 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 24516.837475066743, + 24128.86725264912, + 24164.065902461858 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 12792.609162876011, + "scoreError" : 374.1134345505212, + "scoreConfidence" : [ + 12418.49572832549, + 13166.722597426533 + ], + "scorePercentiles" : { + "0.0" : 12778.526435080908, + "50.0" : 12783.16505335558, + "90.0" : 12816.136000191547, + "95.0" : 12816.136000191547, + "99.0" : 12816.136000191547, + "99.9" : 12816.136000191547, + "99.99" : 12816.136000191547, + "99.999" : 12816.136000191547, + "99.9999" : 12816.136000191547, + "100.0" : 12816.136000191547 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 12816.136000191547, + 12783.16505335558, + 12778.526435080908 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1362652.8272664824, + "scoreError" : 112981.08881498469, + "scoreConfidence" : [ + 1249671.7384514976, + 1475633.9160814672 + ], + "scorePercentiles" : { + "0.0" : 1357396.5866958331, + "50.0" : 1361082.0609684142, + "90.0" : 1369479.8341351997, + "95.0" : 1369479.8341351997, + "99.0" : 1369479.8341351997, + "99.9" : 1369479.8341351997, + "99.99" : 1369479.8341351997, + "99.999" : 1369479.8341351997, + "99.9999" : 1369479.8341351997, + "100.0" : 1369479.8341351997 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1369479.8341351997, + 1361082.0609684142, + 1357396.5866958331 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 329101.03875421366, + "scoreError" : 49449.96831365673, + "scoreConfidence" : [ + 279651.0704405569, + 378551.0070678704 + ], + "scorePercentiles" : { + "0.0" : 326162.8503928024, + "50.0" : 329636.21457627055, + "90.0" : 331504.051293568, + "95.0" : 331504.051293568, + "99.0" : 331504.051293568, + "99.9" : 331504.051293568, + "99.99" : 331504.051293568, + "99.999" : 331504.051293568, + "99.9999" : 331504.051293568, + "100.0" : 331504.051293568 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 331504.051293568, + 326162.8503928024, + 329636.21457627055 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 177947.6219005464, + "scoreError" : 43123.747951040554, + "scoreConfidence" : [ + 134823.87394950585, + 221071.36985158693 + ], + "scorePercentiles" : { + "0.0" : 175420.03537888342, + "50.0" : 178319.32081382093, + "90.0" : 180103.50950893486, + "95.0" : 180103.50950893486, + "99.0" : 180103.50950893486, + "99.9" : 180103.50950893486, + "99.99" : 180103.50950893486, + "99.999" : 180103.50950893486, + "99.9999" : 180103.50950893486, + "100.0" : 180103.50950893486 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 175420.03537888342, + 180103.50950893486, + 178319.32081382093 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 112537.006416881, + "scoreError" : 7664.494586235341, + "scoreConfidence" : [ + 104872.51183064567, + 120201.50100311634 + ], + "scorePercentiles" : { + "0.0" : 112145.0700122735, + "50.0" : 112485.41144361044, + "90.0" : 112980.53779475909, + "95.0" : 112980.53779475909, + "99.0" : 112980.53779475909, + "99.9" : 112980.53779475909, + "99.99" : 112980.53779475909, + "99.999" : 112980.53779475909, + "99.9999" : 112980.53779475909, + "100.0" : 112980.53779475909 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 112485.41144361044, + 112980.53779475909, + 112145.0700122735 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 79866.09028505826, + "scoreError" : 13698.494085156852, + "scoreConfidence" : [ + 66167.59619990141, + 93564.58437021512 + ], + "scorePercentiles" : { + "0.0" : 79008.22108052285, + "50.0" : 80186.22650421326, + "90.0" : 80403.82327043868, + "95.0" : 80403.82327043868, + "99.0" : 80403.82327043868, + "99.9" : 80403.82327043868, + "99.99" : 80403.82327043868, + "99.999" : 80403.82327043868, + "99.9999" : 80403.82327043868, + "100.0" : 80403.82327043868 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 80186.22650421326, + 80403.82327043868, + 79008.22108052285 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 46995.610683163046, + "scoreError" : 163.0518386790041, + "scoreConfidence" : [ + 46832.55884448404, + 47158.66252184205 + ], + "scorePercentiles" : { + "0.0" : 46988.95327353695, + "50.0" : 46992.110282956615, + "90.0" : 47005.76849299557, + "95.0" : 47005.76849299557, + "99.0" : 47005.76849299557, + "99.9" : 47005.76849299557, + "99.99" : 47005.76849299557, + "99.999" : 47005.76849299557, + "99.9999" : 47005.76849299557, + "100.0" : 47005.76849299557 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 46992.110282956615, + 47005.76849299557, + 46988.95327353695 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 33211.69249281298, + "scoreError" : 2398.755737733959, + "scoreConfidence" : [ + 30812.936755079023, + 35610.44823054694 + ], + "scorePercentiles" : { + "0.0" : 33119.359845208244, + "50.0" : 33153.48436281585, + "90.0" : 33362.233270414836, + "95.0" : 33362.233270414836, + "99.0" : 33362.233270414836, + "99.9" : 33362.233270414836, + "99.99" : 33362.233270414836, + "99.999" : 33362.233270414836, + "99.9999" : 33362.233270414836, + "100.0" : 33362.233270414836 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 33119.359845208244, + 33153.48436281585, + 33362.233270414836 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 23744.800349223486, + "scoreError" : 2634.991796310252, + "scoreConfidence" : [ + 21109.808552913233, + 26379.79214553374 + ], + "scorePercentiles" : { + "0.0" : 23589.707985481502, + "50.0" : 23769.237206482543, + "90.0" : 23875.455855706412, + "95.0" : 23875.455855706412, + "99.0" : 23875.455855706412, + "99.9" : 23875.455855706412, + "99.99" : 23875.455855706412, + "99.999" : 23875.455855706412, + "99.9999" : 23875.455855706412, + "100.0" : 23875.455855706412 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 23875.455855706412, + 23589.707985481502, + 23769.237206482543 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxSize_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 11483.623434033128, + "scoreError" : 824.3041169694583, + "scoreConfidence" : [ + 10659.31931706367, + 12307.927551002587 + ], + "scorePercentiles" : { + "0.0" : 11451.449782888541, + "50.0" : 11464.1415136268, + "90.0" : 11535.279005584041, + "95.0" : 11535.279005584041, + "99.0" : 11535.279005584041, + "99.9" : 11535.279005584041, + "99.99" : 11535.279005584041, + "99.999" : 11535.279005584041, + "99.9999" : 11535.279005584041, + "100.0" : 11535.279005584041 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 11464.1415136268, + 11451.449782888541, + 11535.279005584041 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 888806.8721197271, + "scoreError" : 451225.5826086511, + "scoreConfidence" : [ + 437581.289511076, + 1340032.4547283782 + ], + "scorePercentiles" : { + "0.0" : 867655.5008484526, + "50.0" : 882763.4229182295, + "90.0" : 916001.6925924993, + "95.0" : 916001.6925924993, + "99.0" : 916001.6925924993, + "99.9" : 916001.6925924993, + "99.99" : 916001.6925924993, + "99.999" : 916001.6925924993, + "99.9999" : 916001.6925924993, + "100.0" : 916001.6925924993 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 867655.5008484526, + 882763.4229182295, + 916001.6925924993 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 243730.99761819266, + "scoreError" : 14714.385886825205, + "scoreConfidence" : [ + 229016.61173136745, + 258445.38350501787 + ], + "scorePercentiles" : { + "0.0" : 242817.20051490873, + "50.0" : 244032.1842355121, + "90.0" : 244343.6081041571, + "95.0" : 244343.6081041571, + "99.0" : 244343.6081041571, + "99.9" : 244343.6081041571, + "99.99" : 244343.6081041571, + "99.999" : 244343.6081041571, + "99.9999" : 244343.6081041571, + "100.0" : 244343.6081041571 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 244032.1842355121, + 242817.20051490873, + 244343.6081041571 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 151410.64942373722, + "scoreError" : 16854.632124818978, + "scoreConfidence" : [ + 134556.01729891825, + 168265.2815485562 + ], + "scorePercentiles" : { + "0.0" : 150348.54375049233, + "50.0" : 151855.3044204108, + "90.0" : 152028.10010030854, + "95.0" : 152028.10010030854, + "99.0" : 152028.10010030854, + "99.9" : 152028.10010030854, + "99.99" : 152028.10010030854, + "99.999" : 152028.10010030854, + "99.9999" : 152028.10010030854, + "100.0" : 152028.10010030854 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 150348.54375049233, + 152028.10010030854, + 151855.3044204108 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 96877.36842083395, + "scoreError" : 14314.415672909952, + "scoreConfidence" : [ + 82562.952747924, + 111191.7840937439 + ], + "scorePercentiles" : { + "0.0" : 96044.74814774728, + "50.0" : 96984.34315528086, + "90.0" : 97603.01395947373, + "95.0" : 97603.01395947373, + "99.0" : 97603.01395947373, + "99.9" : 97603.01395947373, + "99.99" : 97603.01395947373, + "99.999" : 97603.01395947373, + "99.9999" : 97603.01395947373, + "100.0" : 97603.01395947373 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 96044.74814774728, + 97603.01395947373, + 96984.34315528086 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 69720.91991163777, + "scoreError" : 3559.3222846353156, + "scoreConfidence" : [ + 66161.59762700245, + 73280.24219627309 + ], + "scorePercentiles" : { + "0.0" : 69502.001992814, + "50.0" : 69784.33954452383, + "90.0" : 69876.41819757548, + "95.0" : 69876.41819757548, + "99.0" : 69876.41819757548, + "99.9" : 69876.41819757548, + "99.99" : 69876.41819757548, + "99.999" : 69876.41819757548, + "99.9999" : 69876.41819757548, + "100.0" : 69876.41819757548 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 69876.41819757548, + 69784.33954452383, + 69502.001992814 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 42339.67579261543, + "scoreError" : 2994.2835804829506, + "scoreConfidence" : [ + 39345.39221213248, + 45333.95937309838 + ], + "scorePercentiles" : { + "0.0" : 42171.26315503738, + "50.0" : 42348.61266358862, + "90.0" : 42499.15155922029, + "95.0" : 42499.15155922029, + "99.0" : 42499.15155922029, + "99.9" : 42499.15155922029, + "99.99" : 42499.15155922029, + "99.999" : 42499.15155922029, + "99.9999" : 42499.15155922029, + "100.0" : 42499.15155922029 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 42171.26315503738, + 42348.61266358862, + 42499.15155922029 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 27489.948025301655, + "scoreError" : 809.1934366550046, + "scoreConfidence" : [ + 26680.75458864665, + 28299.14146195666 + ], + "scorePercentiles" : { + "0.0" : 27439.606159751736, + "50.0" : 27506.95777003482, + "90.0" : 27523.28014611841, + "95.0" : 27523.28014611841, + "99.0" : 27523.28014611841, + "99.9" : 27523.28014611841, + "99.99" : 27523.28014611841, + "99.999" : 27523.28014611841, + "99.9999" : 27523.28014611841, + "100.0" : 27523.28014611841 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 27523.28014611841, + 27439.606159751736, + 27506.95777003482 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 19236.608325086814, + "scoreError" : 934.2516410199249, + "scoreConfidence" : [ + 18302.35668406689, + 20170.85996610674 + ], + "scorePercentiles" : { + "0.0" : 19186.963797287826, + "50.0" : 19233.610147004794, + "90.0" : 19289.251030967825, + "95.0" : 19289.251030967825, + "99.0" : 19289.251030967825, + "99.9" : 19289.251030967825, + "99.99" : 19289.251030967825, + "99.999" : 19289.251030967825, + "99.9999" : 19289.251030967825, + "100.0" : 19289.251030967825 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 19289.251030967825, + 19233.610147004794, + 19186.963797287826 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 9756.820095910085, + "scoreError" : 779.034997961678, + "scoreConfidence" : [ + 8977.785097948406, + 10535.855093871764 + ], + "scorePercentiles" : { + "0.0" : 9721.951662560312, + "50.0" : 9744.06216912424, + "90.0" : 9804.4464560457, + "95.0" : 9804.4464560457, + "99.0" : 9804.4464560457, + "99.9" : 9804.4464560457, + "99.99" : 9804.4464560457, + "99.999" : 9804.4464560457, + "99.9999" : 9804.4464560457, + "100.0" : 9804.4464560457 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 9804.4464560457, + 9721.951662560312, + 9744.06216912424 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 142231.22472636696, + "scoreError" : 18447.271667192355, + "scoreConfidence" : [ + 123783.9530591746, + 160678.49639355933 + ], + "scorePercentiles" : { + "0.0" : 141603.37575760685, + "50.0" : 141692.62756713913, + "90.0" : 143397.67085435486, + "95.0" : 143397.67085435486, + "99.0" : 143397.67085435486, + "99.9" : 143397.67085435486, + "99.99" : 143397.67085435486, + "99.999" : 143397.67085435486, + "99.9999" : 143397.67085435486, + "100.0" : 143397.67085435486 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 141692.62756713913, + 141603.37575760685, + 143397.67085435486 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 43203.40977837035, + "scoreError" : 16042.584256877117, + "scoreConfidence" : [ + 27160.82552149323, + 59245.994035247466 + ], + "scorePercentiles" : { + "0.0" : 42198.02763761135, + "50.0" : 43582.981887529044, + "90.0" : 43829.219809970644, + "95.0" : 43829.219809970644, + "99.0" : 43829.219809970644, + "99.9" : 43829.219809970644, + "99.99" : 43829.219809970644, + "99.999" : 43829.219809970644, + "99.9999" : 43829.219809970644, + "100.0" : 43829.219809970644 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 42198.02763761135, + 43582.981887529044, + 43829.219809970644 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 24090.962042958596, + "scoreError" : 5770.6492393897015, + "scoreConfidence" : [ + 18320.312803568893, + 29861.611282348298 + ], + "scorePercentiles" : { + "0.0" : 23744.20584211587, + "50.0" : 24164.985563040926, + "90.0" : 24363.694723719, + "95.0" : 24363.694723719, + "99.0" : 24363.694723719, + "99.9" : 24363.694723719, + "99.99" : 24363.694723719, + "99.999" : 24363.694723719, + "99.9999" : 24363.694723719, + "100.0" : 24363.694723719 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 23744.20584211587, + 24164.985563040926, + 24363.694723719 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 16023.378038179251, + "scoreError" : 9655.186378972658, + "scoreConfidence" : [ + 6368.191659206594, + 25678.56441715191 + ], + "scorePercentiles" : { + "0.0" : 15452.095467425257, + "50.0" : 16121.096195265916, + "90.0" : 16496.94245184658, + "95.0" : 16496.94245184658, + "99.0" : 16496.94245184658, + "99.9" : 16496.94245184658, + "99.99" : 16496.94245184658, + "99.999" : 16496.94245184658, + "99.9999" : 16496.94245184658, + "100.0" : 16496.94245184658 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 15452.095467425257, + 16496.94245184658, + 16121.096195265916 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 11959.710367446969, + "scoreError" : 6294.855232205091, + "scoreConfidence" : [ + 5664.855135241878, + 18254.565599652058 + ], + "scorePercentiles" : { + "0.0" : 11599.401103753655, + "50.0" : 11992.599645203214, + "90.0" : 12287.130353384038, + "95.0" : 12287.130353384038, + "99.0" : 12287.130353384038, + "99.9" : 12287.130353384038, + "99.99" : 12287.130353384038, + "99.999" : 12287.130353384038, + "99.9999" : 12287.130353384038, + "100.0" : 12287.130353384038 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 11599.401103753655, + 11992.599645203214, + 12287.130353384038 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 7342.433594141025, + "scoreError" : 3060.368953466553, + "scoreConfidence" : [ + 4282.064640674473, + 10402.802547607578 + ], + "scorePercentiles" : { + "0.0" : 7243.536791081128, + "50.0" : 7247.644886092713, + "90.0" : 7536.119105249236, + "95.0" : 7536.119105249236, + "99.0" : 7536.119105249236, + "99.9" : 7536.119105249236, + "99.99" : 7536.119105249236, + "99.999" : 7536.119105249236, + "99.9999" : 7536.119105249236, + "100.0" : 7536.119105249236 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 7247.644886092713, + 7243.536791081128, + 7536.119105249236 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 5361.081637388553, + "scoreError" : 205.80497983354684, + "scoreConfidence" : [ + 5155.276657555006, + 5566.8866172221 + ], + "scorePercentiles" : { + "0.0" : 5349.551015262455, + "50.0" : 5361.598949855215, + "90.0" : 5372.094947047986, + "95.0" : 5372.094947047986, + "99.0" : 5372.094947047986, + "99.9" : 5372.094947047986, + "99.99" : 5372.094947047986, + "99.999" : 5372.094947047986, + "99.9999" : 5372.094947047986, + "100.0" : 5372.094947047986 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 5361.598949855215, + 5349.551015262455, + 5372.094947047986 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 3727.523959206741, + "scoreError" : 444.6168215557502, + "scoreConfidence" : [ + 3282.907137650991, + 4172.140780762491 + ], + "scorePercentiles" : { + "0.0" : 3711.8289142657204, + "50.0" : 3715.1429796720204, + "90.0" : 3755.599983682483, + "95.0" : 3755.599983682483, + "99.0" : 3755.599983682483, + "99.9" : 3755.599983682483, + "99.99" : 3755.599983682483, + "99.999" : 3755.599983682483, + "99.9999" : 3755.599983682483, + "100.0" : 3755.599983682483 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 3711.8289142657204, + 3715.1429796720204, + 3755.599983682483 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 1835.2641126586925, + "scoreError" : 54.8436106262621, + "scoreConfidence" : [ + 1780.4205020324305, + 1890.1077232849545 + ], + "scorePercentiles" : { + "0.0" : 1832.0798214209728, + "50.0" : 1835.6594980127352, + "90.0" : 1838.0530185423697, + "95.0" : 1838.0530185423697, + "99.0" : 1838.0530185423697, + "99.9" : 1838.0530185423697, + "99.99" : 1838.0530185423697, + "99.999" : 1838.0530185423697, + "99.9999" : 1838.0530185423697, + "100.0" : 1838.0530185423697 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1832.0798214209728, + 1838.0530185423697, + 1835.6594980127352 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1173966.717008927, + "scoreError" : 197974.6411470419, + "scoreConfidence" : [ + 975992.075861885, + 1371941.3581559688 + ], + "scorePercentiles" : { + "0.0" : 1167204.3677012117, + "50.0" : 1168212.1674022945, + "90.0" : 1186483.6159232743, + "95.0" : 1186483.6159232743, + "99.0" : 1186483.6159232743, + "99.9" : 1186483.6159232743, + "99.99" : 1186483.6159232743, + "99.999" : 1186483.6159232743, + "99.9999" : 1186483.6159232743, + "100.0" : 1186483.6159232743 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1186483.6159232743, + 1167204.3677012117, + 1168212.1674022945 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 247971.5513367604, + "scoreError" : 6829.446277405141, + "scoreConfidence" : [ + 241142.10505935526, + 254800.99761416554 + ], + "scorePercentiles" : { + "0.0" : 247621.76829127572, + "50.0" : 247926.504137585, + "90.0" : 248366.3815814204, + "95.0" : 248366.3815814204, + "99.0" : 248366.3815814204, + "99.9" : 248366.3815814204, + "99.99" : 248366.3815814204, + "99.999" : 248366.3815814204, + "99.9999" : 248366.3815814204, + "100.0" : 248366.3815814204 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 247621.76829127572, + 248366.3815814204, + 247926.504137585 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 152642.5131435438, + "scoreError" : 19012.027281986295, + "scoreConfidence" : [ + 133630.4858615575, + 171654.54042553008 + ], + "scorePercentiles" : { + "0.0" : 151510.89853841893, + "50.0" : 152853.93850245298, + "90.0" : 153562.70238975945, + "95.0" : 153562.70238975945, + "99.0" : 153562.70238975945, + "99.9" : 153562.70238975945, + "99.99" : 153562.70238975945, + "99.999" : 153562.70238975945, + "99.9999" : 153562.70238975945, + "100.0" : 153562.70238975945 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 151510.89853841893, + 153562.70238975945, + 152853.93850245298 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 86569.59264736688, + "scoreError" : 11903.522229472745, + "scoreConfidence" : [ + 74666.07041789414, + 98473.11487683962 + ], + "scorePercentiles" : { + "0.0" : 85827.44288121584, + "50.0" : 86828.28296136038, + "90.0" : 87053.05209952439, + "95.0" : 87053.05209952439, + "99.0" : 87053.05209952439, + "99.9" : 87053.05209952439, + "99.99" : 87053.05209952439, + "99.999" : 87053.05209952439, + "99.9999" : 87053.05209952439, + "100.0" : 87053.05209952439 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 85827.44288121584, + 87053.05209952439, + 86828.28296136038 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 67790.18198553943, + "scoreError" : 11738.195951829312, + "scoreConfidence" : [ + 56051.98603371011, + 79528.37793736874 + ], + "scorePercentiles" : { + "0.0" : 67058.22835368318, + "50.0" : 68045.88865788843, + "90.0" : 68266.42894504666, + "95.0" : 68266.42894504666, + "99.0" : 68266.42894504666, + "99.9" : 68266.42894504666, + "99.99" : 68266.42894504666, + "99.999" : 68266.42894504666, + "99.9999" : 68266.42894504666, + "100.0" : 68266.42894504666 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 67058.22835368318, + 68266.42894504666, + 68045.88865788843 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 41480.89276725144, + "scoreError" : 13641.013778070042, + "scoreConfidence" : [ + 27839.878989181398, + 55121.906545321486 + ], + "scorePercentiles" : { + "0.0" : 40622.15837113759, + "50.0" : 41832.7895587293, + "90.0" : 41987.73037188741, + "95.0" : 41987.73037188741, + "99.0" : 41987.73037188741, + "99.9" : 41987.73037188741, + "99.99" : 41987.73037188741, + "99.999" : 41987.73037188741, + "99.9999" : 41987.73037188741, + "100.0" : 41987.73037188741 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 40622.15837113759, + 41832.7895587293, + 41987.73037188741 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 25689.601526029423, + "scoreError" : 2825.572246852403, + "scoreConfidence" : [ + 22864.02927917702, + 28515.173772881826 + ], + "scorePercentiles" : { + "0.0" : 25575.13142889467, + "50.0" : 25627.840782488554, + "90.0" : 25865.832366705043, + "95.0" : 25865.832366705043, + "99.0" : 25865.832366705043, + "99.9" : 25865.832366705043, + "99.99" : 25865.832366705043, + "99.999" : 25865.832366705043, + "99.9999" : 25865.832366705043, + "100.0" : 25865.832366705043 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 25865.832366705043, + 25627.840782488554, + 25575.13142889467 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 18222.90842921025, + "scoreError" : 2089.18011910183, + "scoreConfidence" : [ + 16133.72831010842, + 20312.08854831208 + ], + "scorePercentiles" : { + "0.0" : 18115.97854664985, + "50.0" : 18209.00729502404, + "90.0" : 18343.739445956857, + "95.0" : 18343.739445956857, + "99.0" : 18343.739445956857, + "99.9" : 18343.739445956857, + "99.99" : 18343.739445956857, + "99.999" : 18343.739445956857, + "99.9999" : 18343.739445956857, + "100.0" : 18343.739445956857 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 18343.739445956857, + 18209.00729502404, + 18115.97854664985 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLengthMaxSize_remove_whitespace_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 10284.601979448236, + "scoreError" : 718.2459542299264, + "scoreConfidence" : [ + 9566.35602521831, + 11002.847933678162 + ], + "scorePercentiles" : { + "0.0" : 10245.941764480525, + "50.0" : 10283.219840963671, + "90.0" : 10324.644332900512, + "95.0" : 10324.644332900512, + "99.0" : 10324.644332900512, + "99.9" : 10324.644332900512, + "99.99" : 10324.644332900512, + "99.999" : 10324.644332900512, + "99.9999" : 10324.644332900512, + "100.0" : 10324.644332900512 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 10283.219840963671, + 10324.644332900512, + 10245.941764480525 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1030671.4019437408, + "scoreError" : 508504.65321034496, + "scoreConfidence" : [ + 522166.7487333958, + 1539176.0551540856 + ], + "scorePercentiles" : { + "0.0" : 1000952.1457948372, + "50.0" : 1034831.9432674162, + "90.0" : 1056230.1167689688, + "95.0" : 1056230.1167689688, + "99.0" : 1056230.1167689688, + "99.9" : 1056230.1167689688, + "99.99" : 1056230.1167689688, + "99.999" : 1056230.1167689688, + "99.9999" : 1056230.1167689688, + "100.0" : 1056230.1167689688 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1000952.1457948372, + 1034831.9432674162, + 1056230.1167689688 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 268874.5314795769, + "scoreError" : 9963.895498634292, + "scoreConfidence" : [ + 258910.6359809426, + 278838.4269782112 + ], + "scorePercentiles" : { + "0.0" : 268414.82223516377, + "50.0" : 268730.50704198534, + "90.0" : 269478.2651615815, + "95.0" : 269478.2651615815, + "99.0" : 269478.2651615815, + "99.9" : 269478.2651615815, + "99.99" : 269478.2651615815, + "99.999" : 269478.2651615815, + "99.9999" : 269478.2651615815, + "100.0" : 269478.2651615815 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 268414.82223516377, + 268730.50704198534, + 269478.2651615815 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 187874.7978672049, + "scoreError" : 24792.794416322296, + "scoreConfidence" : [ + 163082.00345088262, + 212667.5922835272 + ], + "scorePercentiles" : { + "0.0" : 186306.34533333097, + "50.0" : 188616.7723139767, + "90.0" : 188701.27595430703, + "95.0" : 188701.27595430703, + "99.0" : 188701.27595430703, + "99.9" : 188701.27595430703, + "99.99" : 188701.27595430703, + "99.999" : 188701.27595430703, + "99.9999" : 188701.27595430703, + "100.0" : 188701.27595430703 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 186306.34533333097, + 188616.7723139767, + 188701.27595430703 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 124074.81846097606, + "scoreError" : 9592.97854140655, + "scoreConfidence" : [ + 114481.83991956951, + 133667.7970023826 + ], + "scorePercentiles" : { + "0.0" : 123527.97842168265, + "50.0" : 124119.73277638957, + "90.0" : 124576.74418485595, + "95.0" : 124576.74418485595, + "99.0" : 124576.74418485595, + "99.9" : 124576.74418485595, + "99.99" : 124576.74418485595, + "99.999" : 124576.74418485595, + "99.9999" : 124576.74418485595, + "100.0" : 124576.74418485595 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 123527.97842168265, + 124576.74418485595, + 124119.73277638957 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 87721.6015610111, + "scoreError" : 7995.385385686171, + "scoreConfidence" : [ + 79726.21617532494, + 95716.98694669727 + ], + "scorePercentiles" : { + "0.0" : 87397.7988359078, + "50.0" : 87546.70853422496, + "90.0" : 88220.29731290055, + "95.0" : 88220.29731290055, + "99.0" : 88220.29731290055, + "99.9" : 88220.29731290055, + "99.99" : 88220.29731290055, + "99.999" : 88220.29731290055, + "99.9999" : 88220.29731290055, + "100.0" : 88220.29731290055 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 87546.70853422496, + 87397.7988359078, + 88220.29731290055 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 35894.385625284376, + "scoreError" : 819.6454382917509, + "scoreConfidence" : [ + 35074.740186992625, + 36714.03106357613 + ], + "scorePercentiles" : { + "0.0" : 35844.12904912747, + "50.0" : 35908.36983116049, + "90.0" : 35930.65799556518, + "95.0" : 35930.65799556518, + "99.0" : 35930.65799556518, + "99.9" : 35930.65799556518, + "99.99" : 35930.65799556518, + "99.999" : 35930.65799556518, + "99.9999" : 35930.65799556518, + "100.0" : 35930.65799556518 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 35844.12904912747, + 35908.36983116049, + 35930.65799556518 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 31406.808876851686, + "scoreError" : 652.8803248338209, + "scoreConfidence" : [ + 30753.928552017867, + 32059.689201685505 + ], + "scorePercentiles" : { + "0.0" : 31365.800025279215, + "50.0" : 31422.910528155135, + "90.0" : 31431.7160771207, + "95.0" : 31431.7160771207, + "99.0" : 31431.7160771207, + "99.9" : 31431.7160771207, + "99.99" : 31431.7160771207, + "99.999" : 31431.7160771207, + "99.9999" : 31431.7160771207, + "100.0" : 31431.7160771207 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 31422.910528155135, + 31365.800025279215, + 31431.7160771207 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 21948.948958161734, + "scoreError" : 1742.0415230971214, + "scoreConfidence" : [ + 20206.90743506461, + 23690.990481258857 + ], + "scorePercentiles" : { + "0.0" : 21848.973611269208, + "50.0" : 21958.668804066416, + "90.0" : 22039.204459149583, + "95.0" : 22039.204459149583, + "99.0" : 22039.204459149583, + "99.9" : 22039.204459149583, + "99.99" : 22039.204459149583, + "99.999" : 22039.204459149583, + "99.9999" : 22039.204459149583, + "100.0" : 22039.204459149583 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 21848.973611269208, + 21958.668804066416, + 22039.204459149583 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 11240.624305461459, + "scoreError" : 1473.2732870210602, + "scoreConfidence" : [ + 9767.351018440399, + 12713.897592482519 + ], + "scorePercentiles" : { + "0.0" : 11164.359475525587, + "50.0" : 11232.29017586027, + "90.0" : 11325.223264998518, + "95.0" : 11325.223264998518, + "99.0" : 11325.223264998518, + "99.9" : 11325.223264998518, + "99.99" : 11325.223264998518, + "99.999" : 11325.223264998518, + "99.9999" : 11325.223264998518, + "100.0" : 11325.223264998518 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 11325.223264998518, + 11164.359475525587, + 11232.29017586027 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 1026893.3343553991, + "scoreError" : 285672.52368963504, + "scoreConfidence" : [ + 741220.8106657641, + 1312565.858045034 + ], + "scorePercentiles" : { + "0.0" : 1009034.0913865346, + "50.0" : 1033377.6168792766, + "90.0" : 1038268.2948003861, + "95.0" : 1038268.2948003861, + "99.0" : 1038268.2948003861, + "99.9" : 1038268.2948003861, + "99.99" : 1038268.2948003861, + "99.999" : 1038268.2948003861, + "99.9999" : 1038268.2948003861, + "100.0" : 1038268.2948003861 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1033377.6168792766, + 1038268.2948003861, + 1009034.0913865346 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 333496.6571916673, + "scoreError" : 108466.04469563313, + "scoreConfidence" : [ + 225030.61249603418, + 441962.7018873004 + ], + "scorePercentiles" : { + "0.0" : 326639.704308381, + "50.0" : 336634.77338549687, + "90.0" : 337215.4938811241, + "95.0" : 337215.4938811241, + "99.0" : 337215.4938811241, + "99.9" : 337215.4938811241, + "99.99" : 337215.4938811241, + "99.999" : 337215.4938811241, + "99.9999" : 337215.4938811241, + "100.0" : 337215.4938811241 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 326639.704308381, + 337215.4938811241, + 336634.77338549687 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 183398.6001349707, + "scoreError" : 4168.941937213643, + "scoreConfidence" : [ + 179229.65819775706, + 187567.54207218435 + ], + "scorePercentiles" : { + "0.0" : 183234.17241244554, + "50.0" : 183302.09301695725, + "90.0" : 183659.53497550928, + "95.0" : 183659.53497550928, + "99.0" : 183659.53497550928, + "99.9" : 183659.53497550928, + "99.99" : 183659.53497550928, + "99.999" : 183659.53497550928, + "99.9999" : 183659.53497550928, + "100.0" : 183659.53497550928 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 183234.17241244554, + 183302.09301695725, + 183659.53497550928 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 118765.79234568572, + "scoreError" : 12196.0226832325, + "scoreConfidence" : [ + 106569.76966245323, + 130961.81502891822 + ], + "scorePercentiles" : { + "0.0" : 118121.10811753629, + "50.0" : 118720.45820367665, + "90.0" : 119455.81071584424, + "95.0" : 119455.81071584424, + "99.0" : 119455.81071584424, + "99.9" : 119455.81071584424, + "99.99" : 119455.81071584424, + "99.999" : 119455.81071584424, + "99.9999" : 119455.81071584424, + "100.0" : 119455.81071584424 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 118121.10811753629, + 119455.81071584424, + 118720.45820367665 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 64201.211564112025, + "scoreError" : 5937.029628611814, + "scoreConfidence" : [ + 58264.18193550021, + 70138.24119272384 + ], + "scorePercentiles" : { + "0.0" : 63949.560384667355, + "50.0" : 64085.360604404406, + "90.0" : 64568.71370326432, + "95.0" : 64568.71370326432, + "99.0" : 64568.71370326432, + "99.9" : 64568.71370326432, + "99.99" : 64568.71370326432, + "99.999" : 64568.71370326432, + "99.9999" : 64568.71370326432, + "100.0" : 64568.71370326432 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 63949.560384667355, + 64085.360604404406, + 64568.71370326432 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 34428.4118785292, + "scoreError" : 27599.6823552772, + "scoreConfidence" : [ + 6828.729523252001, + 62028.094233806405 + ], + "scorePercentiles" : { + "0.0" : 32681.585624023515, + "50.0" : 35291.41620969702, + "90.0" : 35312.23380186706, + "95.0" : 35312.23380186706, + "99.0" : 35312.23380186706, + "99.9" : 35312.23380186706, + "99.99" : 35312.23380186706, + "99.999" : 35312.23380186706, + "99.9999" : 35312.23380186706, + "100.0" : 35312.23380186706 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 32681.585624023515, + 35291.41620969702, + 35312.23380186706 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 23770.372129531086, + "scoreError" : 27112.820422082452, + "scoreConfidence" : [ + -3342.4482925513657, + 50883.19255161354 + ], + "scorePercentiles" : { + "0.0" : 22416.995584583772, + "50.0" : 23533.328259524966, + "90.0" : 25360.79254448452, + "95.0" : 25360.79254448452, + "99.0" : 25360.79254448452, + "99.9" : 25360.79254448452, + "99.99" : 25360.79254448452, + "99.999" : 25360.79254448452, + "99.9999" : 25360.79254448452, + "100.0" : 25360.79254448452 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 22416.995584583772, + 23533.328259524966, + 25360.79254448452 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 15604.98795205981, + "scoreError" : 401.8241823385011, + "scoreConfidence" : [ + 15203.163769721308, + 16006.812134398311 + ], + "scorePercentiles" : { + "0.0" : 15592.262575605439, + "50.0" : 15592.280659476146, + "90.0" : 15630.420621097845, + "95.0" : 15630.420621097845, + "99.0" : 15630.420621097845, + "99.9" : 15630.420621097845, + "99.99" : 15630.420621097845, + "99.999" : 15630.420621097845, + "99.9999" : 15630.420621097845, + "100.0" : 15630.420621097845 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 15592.280659476146, + 15592.262575605439, + 15630.420621097845 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_core_remove_whitespace", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 7802.321475899895, + "scoreError" : 402.0095464007938, + "scoreConfidence" : [ + 7400.311929499101, + 8204.331022300688 + ], + "scorePercentiles" : { + "0.0" : 7777.595265186369, + "50.0" : 7809.486107689566, + "90.0" : 7819.883054823747, + "95.0" : 7819.883054823747, + "99.0" : 7819.883054823747, + "99.9" : 7819.883054823747, + "99.99" : 7819.883054823747, + "99.999" : 7819.883054823747, + "99.9999" : 7819.883054823747, + "100.0" : 7819.883054823747 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 7819.883054823747, + 7809.486107689566, + 7777.595265186369 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "2KB" + }, + "primaryMetric" : { + "score" : 125281.1984463901, + "scoreError" : 10278.385764256096, + "scoreConfidence" : [ + 115002.81268213401, + 135559.5842106462 + ], + "scorePercentiles" : { + "0.0" : 124803.8758919078, + "50.0" : 125137.06204322993, + "90.0" : 125902.6574040326, + "95.0" : 125902.6574040326, + "99.0" : 125902.6574040326, + "99.9" : 125902.6574040326, + "99.99" : 125902.6574040326, + "99.999" : 125902.6574040326, + "99.9999" : 125902.6574040326, + "100.0" : 125902.6574040326 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 125902.6574040326, + 124803.8758919078, + 125137.06204322993 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "8KB" + }, + "primaryMetric" : { + "score" : 48152.56481009663, + "scoreError" : 21898.37735430538, + "scoreConfidence" : [ + 26254.18745579125, + 70050.942164402 + ], + "scorePercentiles" : { + "0.0" : 46779.243626954725, + "50.0" : 48677.14735186529, + "90.0" : 49001.30345146986, + "95.0" : 49001.30345146986, + "99.0" : 49001.30345146986, + "99.9" : 49001.30345146986, + "99.99" : 49001.30345146986, + "99.999" : 49001.30345146986, + "99.9999" : 49001.30345146986, + "100.0" : 49001.30345146986 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 46779.243626954725, + 49001.30345146986, + 48677.14735186529 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "14KB" + }, + "primaryMetric" : { + "score" : 27073.01492450132, + "scoreError" : 11939.307188984532, + "scoreConfidence" : [ + 15133.707735516788, + 39012.322113485854 + ], + "scorePercentiles" : { + "0.0" : 26693.51327420833, + "50.0" : 26696.844059276376, + "90.0" : 27828.687440019265, + "95.0" : 27828.687440019265, + "99.0" : 27828.687440019265, + "99.9" : 27828.687440019265, + "99.99" : 27828.687440019265, + "99.999" : 27828.687440019265, + "99.9999" : 27828.687440019265, + "100.0" : 27828.687440019265 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 26696.844059276376, + 26693.51327420833, + 27828.687440019265 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "22KB" + }, + "primaryMetric" : { + "score" : 17658.702693584757, + "scoreError" : 9710.591400552981, + "scoreConfidence" : [ + 7948.111293031776, + 27369.29409413774 + ], + "scorePercentiles" : { + "0.0" : 17297.189327814554, + "50.0" : 17409.002970502617, + "90.0" : 18269.915782437103, + "95.0" : 18269.915782437103, + "99.0" : 18269.915782437103, + "99.9" : 18269.915782437103, + "99.99" : 18269.915782437103, + "99.999" : 18269.915782437103, + "99.9999" : 18269.915782437103, + "100.0" : 18269.915782437103 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 17297.189327814554, + 18269.915782437103, + 17409.002970502617 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "30KB" + }, + "primaryMetric" : { + "score" : 13597.244197550019, + "scoreError" : 8791.761252197444, + "scoreConfidence" : [ + 4805.4829453525745, + 22389.005449747463 + ], + "scorePercentiles" : { + "0.0" : 13050.78002316572, + "50.0" : 13779.55780763108, + "90.0" : 13961.394761853255, + "95.0" : 13961.394761853255, + "99.0" : 13961.394761853255, + "99.9" : 13961.394761853255, + "99.99" : 13961.394761853255, + "99.999" : 13961.394761853255, + "99.9999" : 13961.394761853255, + "100.0" : 13961.394761853255 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 13050.78002316572, + 13779.55780763108, + 13961.394761853255 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "50KB" + }, + "primaryMetric" : { + "score" : 8514.169518265386, + "scoreError" : 4716.010715665229, + "scoreConfidence" : [ + 3798.1588026001564, + 13230.180233930616 + ], + "scorePercentiles" : { + "0.0" : 8316.697247593045, + "50.0" : 8419.06031585571, + "90.0" : 8806.750991347402, + "95.0" : 8806.750991347402, + "99.0" : 8806.750991347402, + "99.9" : 8806.750991347402, + "99.99" : 8806.750991347402, + "99.999" : 8806.750991347402, + "99.9999" : 8806.750991347402, + "100.0" : 8806.750991347402 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 8316.697247593045, + 8419.06031585571, + 8806.750991347402 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "70KB" + }, + "primaryMetric" : { + "score" : 6184.7691847023525, + "scoreError" : 1748.9786325614098, + "scoreConfidence" : [ + 4435.790552140943, + 7933.747817263762 + ], + "scorePercentiles" : { + "0.0" : 6101.809768782881, + "50.0" : 6162.775561263162, + "90.0" : 6289.722224061015, + "95.0" : 6289.722224061015, + "99.0" : 6289.722224061015, + "99.9" : 6289.722224061015, + "99.99" : 6289.722224061015, + "99.999" : 6289.722224061015, + "99.9999" : 6289.722224061015, + "100.0" : 6289.722224061015 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 6162.775561263162, + 6101.809768782881, + 6289.722224061015 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "100KB" + }, + "primaryMetric" : { + "score" : 4227.988296980045, + "scoreError" : 786.5438918080725, + "scoreConfidence" : [ + 3441.444405171972, + 5014.532188788117 + ], + "scorePercentiles" : { + "0.0" : 4201.583641952714, + "50.0" : 4204.641518167254, + "90.0" : 4277.7397308201635, + "95.0" : 4277.7397308201635, + "99.0" : 4277.7397308201635, + "99.9" : 4277.7397308201635, + "99.99" : 4277.7397308201635, + "99.999" : 4277.7397308201635, + "99.9999" : 4277.7397308201635, + "100.0" : 4277.7397308201635 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 4204.641518167254, + 4277.7397308201635, + 4201.583641952714 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.github.skjolber.jsonfilter.jmh.CveFilterBenchmark.maxStringLength_jackson", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/usr/lib/jvm/java-25-openjdk-oracle/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Dstdout.encoding=UTF-8", + "-Dstderr.encoding=UTF-8", + "-XX:+ShowCodeDetailsInExceptionMessages" + ], + "jdkVersion" : "25", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "25+36-3489", + "warmupIterations" : 1, + "warmupTime" : "1 s", + "warmupBatchSize" : 1, + "measurementIterations" : 3, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "params" : { + "fileName" : "200KB" + }, + "primaryMetric" : { + "score" : 2088.426479862424, + "scoreError" : 251.60483076114906, + "scoreConfidence" : [ + 1836.821649101275, + 2340.031310623573 + ], + "scorePercentiles" : { + "0.0" : 2072.5717797268753, + "50.0" : 2095.06093083897, + "90.0" : 2097.6467290214255, + "95.0" : 2097.6467290214255, + "99.0" : 2097.6467290214255, + "99.9" : 2097.6467290214255, + "99.99" : 2097.6467290214255, + "99.999" : 2097.6467290214255, + "99.9999" : 2097.6467290214255, + "100.0" : 2097.6467290214255 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 2072.5717797268753, + 2097.6467290214255, + 2095.06093083897 + ] + ] + }, + "secondaryMetrics" : { + } + } +] + + diff --git a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java index 229774e3..c21c83b5 100644 --- a/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java +++ b/benchmark/jmh/src/main/java/com/github/skjolber/jsonfilter/jmh/CveFilterBenchmark.java @@ -226,8 +226,8 @@ public long anon_full_core() throws IOException { public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder() .include(CveFilterBenchmark.class.getSimpleName()) - .warmupIterations(5) - .measurementIterations(5) + .warmupIterations(1) + .measurementIterations(3) .result("target/" + System.currentTimeMillis() + ".json") .resultFormat(ResultFormatType.JSON) .build(); From 345ff4cc1ed3ef2c6f8473973471043c861d5fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Skj=C3=B8lberg?= Date: Sun, 26 Oct 2025 10:56:24 +0100 Subject: [PATCH 7/8] Update readme --- README.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 8ea84fc1..c89330ae 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![codecov](https://codecov.io/gh/skjolber/json-log-filter/graph/badge.svg?token=8mCiHxVFbz)](https://codecov.io/gh/skjolber/json-log-filter) # json-log-filter -High-performance filtering of to-be-logged JSON. Reads, filters and writes JSON in a single step - drastically increasing throughput. Typical use-cases: +High-performance filtering of JSON. Reads, filters and writes JSON in a single step - drastically increasing throughput. Typical use-cases: * Filter sensitive values from logs (i.e. on request-/response-logging) * technical details like passwords and so on @@ -26,14 +26,7 @@ Features: * Limit document size (skip end of document when max size is reached) * Remove whitespace -The library contains multiple filter implementations as to accommodate combinations of the above features with as little overhead as possible. No external dependencies are necessary, except for the opt-in [Jackson] module (see below). - -The equivalent filters are also implemented using [Jackson]: - - * filter + verify document structure in the same operation - * allows dual filter setup: - * trusted (locally produced) JSON: fast filters without strict syntax validation - * untrusted (remotely produced) JSON: slower filter with strict syntax validation +The library contains multiple filter implementations as to accommodate combinations of the above features with as little overhead as possible. No external dependencies are necessary. Bugs, feature suggestions and help requests can be filed with the [issue-tracker]. @@ -106,7 +99,7 @@ api("com.github.skjolber.json-log-filter:jackson:${jsonLogFilterVersion}")
# Usage -Use a `DefaultJsonLogFilterBuilder` or `JacksonJsonLogFilterBuilder` to configure a filter instance (all filters are thread safe): +Use a `DefaultJsonLogFilterBuilder` to configure a filter instance (all filters are thread safe): ```java JsonFilter filter = DefaultJsonLogFilterBuilder.createInstance() @@ -209,12 +202,18 @@ The resulting metrics could be logged as metadata alongside the JSON payload or * Measuring the impact of the filtering, i.e. reduction in data size * Make sure filters are actually operating as intended -## Performance -The `core` processors within this project are faster than the `Jackson`-based processors. This is expected as parser/serializer features have been traded for performance. +### Opt-in Jackson module +The filters have also been implemented using [Jackson], in an opt-in module. -For a typical, light-weight web service, the overall system performance improvement for using the `core` filters over the `Jackson`-based filters will most likely be a few percent. + * filter + verify document structure in the same operation + * allows dual filter setup: + * trusted (locally produced) JSON: fast filters without strict syntax validation + * untrusted (remotely produced) JSON: slower filter with strict syntax validation + +Configure filters from `JacksonJsonLogFilterBuilder`. -Memory use will be at most 8 times the raw JSON byte size; depending on the invoked `JsonFilter` method (some accept `String`, other raw bytes or chars). +## Performance +This project trades parser/serializer features for performance, and runs multiple times faster than a "traditional" parser/writer approach (like when using Jackson). See the benchmark results ([JDK 25](https://jmh.morethan.io/?source=https://raw.githubusercontent.com/skjolber/json-log-filter/master/benchmark/jmh/results/jmh-results-5.0.0.jdk25.json&topBar=off)) and the [JMH] module for running detailed benchmarks. From 1a4981f0c18333d85914b61db65535e72e841935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Skj=C3=B8lberg?= Date: Sun, 26 Oct 2025 10:58:21 +0100 Subject: [PATCH 8/8] Update readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c89330ae..1e2d46f6 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,6 @@ JsonFilter filter = DefaultJsonLogFilterBuilder.createInstance() .withMaxStringLength(127) // cuts long texts .withAnonymize("$.customer.email") // inserts "*" for values .withPrune("$.customer.account") // removes whole subtree - .withMaxPathMatches(16) // halt anon/prune after a number of hits .withMaxSize(128*1024) .build();