Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup some leftovers #115

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Cleanup some leftovers #115

merged 1 commit into from
Apr 2, 2024

Conversation

gavlyukovskiy
Copy link
Collaborator

@gavlyukovskiy gavlyukovskiy commented Apr 2, 2024

  • Use JSONPath from the RFC 9535
  • improve test coverage for prefix / negative matches
  • Replace gradle.properties with conditional version Make sure shuffle always uses the same seed to select random JSONPath
  • Use a fixed seed in the benchmarks for JSONPath so that we always select the same keys to become JSONPath keys, it solves a problem when benchmarks were flaky in ~360k / ~415k score
  • Use RFC without dashes

Use JSONPath from the RFC 9535, improve test coverage for prefix / negative matches
Replace gradle.properties with conditional version
Make sure shuffle always uses the same seed to select random JSONPath
Use RFC <number> without dashes
Copy link

github-actions bot commented Apr 2, 2024

Note

These results are affected by shared workloads on GitHub runners. Use the results only to detect possible regressions, but always rerun on more stable machine before making any conclusions!

Benchmark results (pull-request, cb8d5a7)

Benchmark                                (characters)  (jsonPath)  (jsonSize)  (maskedKeyProbability)   Mode  Cnt        Score        Error  Units
BaselineBenchmark.countBytes                  unicode         N/A         1kb                     0.1  thrpt    4  2605165.855 ± 150882.992  ops/s
BaselineBenchmark.jacksonParseAndMask         unicode         N/A         1kb                     0.1  thrpt    4    29667.214 ±    997.004  ops/s
BaselineBenchmark.jacksonParseOnly            unicode         N/A         1kb                     0.1  thrpt    4    50940.602 ±    375.321  ops/s
BaselineBenchmark.regexReplace                unicode         N/A         1kb                     0.1  thrpt    4     5119.205 ±     91.139  ops/s
JsonMaskerBenchmark.jsonMaskerBytes           unicode       false         1kb                     0.1  thrpt    4   464226.631 ±  10773.620  ops/s
JsonMaskerBenchmark.jsonMaskerBytes           unicode        true         1kb                     0.1  thrpt    4   363613.503 ±   8234.333  ops/s
JsonMaskerBenchmark.jsonMaskerString          unicode       false         1kb                     0.1  thrpt    4   241884.717 ±   1239.375  ops/s
JsonMaskerBenchmark.jsonMaskerString          unicode        true         1kb                     0.1  thrpt    4   202416.686 ±   2193.547  ops/s
ValueMaskerBenchmark.maskWithFunctional       unicode         N/A         1kb                     0.1  thrpt    4   610227.160 ±   5219.414  ops/s
ValueMaskerBenchmark.maskWithStatic           unicode         N/A         1kb                     0.1  thrpt    4   719554.925 ±  39453.220  ops/s

Benchmark results (master, 97cae59)

Benchmark                                (characters)  (jsonPath)  (jsonSize)  (maskedKeyProbability)   Mode  Cnt        Score        Error  Units
BaselineBenchmark.countBytes                  unicode         N/A         1kb                     0.1  thrpt    4  2604808.683 ± 131878.638  ops/s
BaselineBenchmark.jacksonParseAndMask         unicode         N/A         1kb                     0.1  thrpt    4    29990.485 ±    971.002  ops/s
BaselineBenchmark.jacksonParseOnly            unicode         N/A         1kb                     0.1  thrpt    4    51105.068 ±   1225.712  ops/s
BaselineBenchmark.regexReplace                unicode         N/A         1kb                     0.1  thrpt    4     5111.346 ±    128.621  ops/s
JsonMaskerBenchmark.jsonMaskerBytes           unicode       false         1kb                     0.1  thrpt    4   461548.622 ±   7539.644  ops/s
JsonMaskerBenchmark.jsonMaskerBytes           unicode        true         1kb                     0.1  thrpt    4   416823.569 ±  10560.161  ops/s
JsonMaskerBenchmark.jsonMaskerString          unicode       false         1kb                     0.1  thrpt    4   244774.662 ±   4934.656  ops/s
JsonMaskerBenchmark.jsonMaskerString          unicode        true         1kb                     0.1  thrpt    4   202132.813 ±   3007.877  ops/s
ValueMaskerBenchmark.maskWithFunctional       unicode         N/A         1kb                     0.1  thrpt    4   647908.746 ±  11125.670  ops/s
ValueMaskerBenchmark.maskWithStatic           unicode         N/A         1kb                     0.1  thrpt    4   739325.046 ±  10980.569  ops/s

Copy link

sonarcloud bot commented Apr 2, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
60.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@gavlyukovskiy gavlyukovskiy merged commit 03d5744 into master Apr 2, 2024
3 of 4 checks passed
@gavlyukovskiy gavlyukovskiy deleted the cleanup branch April 2, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants