File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
plugin/src/test/kotlin/dev/vyp/stringcare/plugin/infrastructure/crypto Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ # Benchmark Results (2026-03-19)
2+
3+ Executed with:
4+
5+ - ` ./gradlew :benchmark:jmh `
6+ - JDK: Corretto 17.0.9
7+ - JMH: 1.36
8+ - Mode: ` avgt ` (` ms/op ` )
9+ - Warmup: 2 iterations
10+ - Measurement: 5 iterations
11+
12+ Results (` benchmark/build/results/jmh/results.json ` ):
13+
14+ | Benchmark | Param | Score (ms/op) | Error |
15+ | --- | --- | ---: | ---: |
16+ | ` EndToEndBenchmark.obfuscateAndRevealBatch ` | ` sampleSize=100 ` | 0.008 | +/- 0.001 |
17+ | ` EndToEndBenchmark.obfuscateAndRevealBatch ` | ` sampleSize=1000 ` | 0.096 | +/- 0.001 |
18+ | ` FileScanningBenchmark.locateAssets ` | ` totalFiles=100 ` | 3.152 | +/- 0.061 |
19+ | ` FileScanningBenchmark.locateAssets ` | ` totalFiles=1000 ` | 31.824 | +/- 0.680 |
20+ | ` FileScanningBenchmark.locateAssets ` | ` totalFiles=10000 ` | 382.744 | +/- 15.108 |
21+ | ` FileScanningBenchmark.locateResources ` | ` totalFiles=100 ` | 3.229 | +/- 0.266 |
22+ | ` FileScanningBenchmark.locateResources ` | ` totalFiles=1000 ` | 32.351 | +/- 0.571 |
23+ | ` FileScanningBenchmark.locateResources ` | ` totalFiles=10000 ` | 359.427 | +/- 16.350 |
24+ | ` XmlParsingBenchmark.parseStringsXml ` | ` stringCount=10 ` | 0.039 | +/- 0.001 |
25+ | ` XmlParsingBenchmark.parseStringsXml ` | ` stringCount=100 ` | 0.061 | +/- 0.002 |
26+ | ` XmlParsingBenchmark.parseStringsXml ` | ` stringCount=1000 ` | 0.279 | +/- 0.028 |
27+
28+ Notes:
29+
30+ - This is the first benchmark snapshot in this repo layout.
31+ - A historical baseline from pre-refactor code is not available in this run, so this file serves as baseline for future regressions.
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package dev.vyp.stringcare.plugin.infrastructure.crypto
33import dev.vyp.stringcare.plugin.internal.Stark
44import dev.vyp.stringcare.plugin.internal.LoadResult
55import org.junit.jupiter.api.Assertions.assertArrayEquals
6+ import org.junit.jupiter.api.Assertions.assertFalse
67import org.junit.jupiter.api.Assertions.assertTrue
78import org.junit.jupiter.api.Assumptions.assumeTrue
89import org.junit.jupiter.api.Test
@@ -17,6 +18,7 @@ class ObfuscationServiceTest {
1718 val appId = " com.example.app"
1819 val obf = svc.obfuscate(key, plain, appId)
1920 assertTrue(obf.isNotEmpty())
21+ assertFalse(obf.contentEquals(plain), " Obfuscated bytes must differ from original bytes" )
2022 val back = svc.reveal(key, obf, appId)
2123 assertArrayEquals(plain, back)
2224 }
You can’t perform that action at this time.
0 commit comments